How to produce isosurfaces
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi there!
My problem is simple enough, but somehow I just can't get it working. I have a 129 x 256 x 256 double 3D-image of a brain with only 1s and 0s in it (it is not a logical though, I have just segmented the white matter). Now I want to produce an isosurface of this image (I have to use the isosurface fnction, not any other contour function). What I did is simply type
isosurface(image,1)
but the only thing I get is a 3D-coordinate system with 0:1-axes (shouldn't they be 0:129 and 0:256, if I understood the help isosurface text correctly?) but no surface. I also tried to insert my image array in place of the image array used in the help browser's Example 1, but that didn't work either. What is it that I do wrong?
Best regards,
Mikael
0 Kommentare
Akzeptierte Antwort
Sven
am 26 Sep. 2012
Hi Mikael, you're almost there. Isosurface cuts the data above the isovalue you provide. You need to change your value to, say, 0.5.
bw = zeros(50,50,50); bw(25,25,25) = 1;
D1 = bwdist(bw);
image = double(D1<15)
figure, patch(isosurface(image,1),'faceColor','b')
figure, patch(isosurface(image,0.5),'faceColor','b')
Did this sort the problem out?
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!