How to create slices of a 3D Volume?

5 visualizaciones (últimos 30 días)
Layla
Layla el 21 de Mzo. de 2014
Comentada: Sean de Wolski el 26 de Mzo. de 2014
Hi everyone,
I have 14 sets of 3D points where each set represents a sub-nucleus of a region in the brain. I'd like to do two things with this data:
1. Create volumes (not surfaces!) of each sub-nuclei data set
2. Plot all 14 volumes at once, and view (orthogonal) slices at whatever X-value (for YZ, or Sagittal Images), Y-value (for XZ, or Coronal Images), or Z-value (for XY, or Axial images) I choose.
So far, I've done this by generating Delaunay Triangulations, and changing the limits of the axes. However, the resulting plots are quite messy. I dislike being able to see the lines that show the triangles. The sub-nuclei are color-coded, so I'd rather not see any connectivity lines. Is there a cleaner, smoother way of doing this?
Thanks!
  1 comentario
Layla
Layla el 21 de Mzo. de 2014
I have edited the code for simplicity to demonstrate what I'm doing:
for i = 1:14
%Generate the Delaunay Triangulation for each nucleus
Nuclei(i,1).Delaunay = delaunay(Nuclei(i).XCoordinates, Nuclei(i).YCoordinates, Nuclei(i).ZCoordinates);
%Specify color for each nucleus from a pre-defined Colormap cell
Nuclei(i,1).Color = Colormap{i};
%Plot all nuclei
tri = trisurf(Nuclei(i).Delaunay, Nuclei(i).XCoordinates, Nuclei(i).YCoordinates, Nuclei(i).ZCoordinates);
set(tri, 'FaceColor', Nuclei(i,1).Color)
end
%View this plot at roughly Z = 4 for an Axial projection
axis([3,28,-23,5,3.95,4.0])
I've attached a picture of what the result looks like. It's messy. I wish I could get rid of the black lines! Maybe there's a different way of generating volumes out of this XYZ-coordinate data though?

Iniciar sesión para comentar.

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 21 de Mzo. de 2014
Editada: Sean de Wolski el 21 de Mzo. de 2014
Well I can help you with the lines, set the 'edgecolor' to 'none'
[x,y] = meshgrid(1:15,1:15);
tri = delaunay(x,y);
z = peaks(15);
h=trisurf(tri,x,y,z);
set(h,'EdgeColor','none')
  2 comentarios
Layla
Layla el 21 de Mzo. de 2014
Thanks Sean! That certainly makes the slices look nicer.
Would a Delaunay Triangulation be your choice for creating the 3D volume in the first place?
Sean de Wolski
Sean de Wolski el 26 de Mzo. de 2014
That really depends on your end goal. For just viewing it? Sure!
For more complicated analysis, I would probably first voxelize it and then work on it as a three dimensional image (at least to get started).

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by