Plotting in 3D volume

Hi,
I have done a mapping and at the end of the mapping I got a <1383x1544x344 double> matrix named M. Now I want to visualize it in 3D volume. But how can I do it?
I saw too many questions about this problem. But I could not make use of any them. Could you please suggest me a basic solution to my problem? I only need to unite all of those 344 slices and plot them in 3D volume.
I will be really grateful for your help.
Regards,
Amadeus

 Accepted Answer

Walter Roberson
Walter Roberson on 11 Dec 2012

0 votes

Should the locations be treated as point-like objects, or should they have a definite volume (e.g., a sphere), or do they represent voxels ?
You have three spacial dimensions and one data dimension (the data value at each location.) How do you want to represent this 4th dimension? Across for x, up for y, perspective for slice number, and what for the data value?

5 Comments

Amadeus
Amadeus on 11 Dec 2012
Edited: Amadeus on 11 Dec 2012
Walter, thank you so much for your detailed reply. Sorry that I will not be able to give you a good, sophisticated answer because of my ignorance, but let me try: What I am doing is, currently I am viewing my mapping slice by slice:
for i=25:50:300
figure, imshow(M(1:maxx,1:maxy,i),[]);
end
and what I want is to be able to unite these slices. These slices will construct a brain mapping. My data dimension is not extremely important unless the value is 0. But it would be fantastic, if I could use it for brightness. For example: if data at (x,y,z) is 0->black, if 1->a dot, if 2->a brighter dot. etc.
Again, thank you so much for your help!
If you want a projection, you can use max() or mean() to get a projection along one of the dimensions. If you want a projection at some weird angle, then that's a lot tougher with MATLAB, but no problem for Avizo.
I could show you how to layer 344 images, but then what? How are you going to make sense of it? The "black" from the top layer is going to block everything underneath. The non-black is also going to block everything underneath. The effect is that you would only be able to see the top image.
Amadeus
Amadeus on 11 Dec 2012
Sorry I did not understand why if I use white (maybe I should say empty?) for (x,y,z)=0 and black if it is different than 0, then everything underneath the top layer would be blocked? If I can rotate the 3D output, I guess I can clearly see everything?
When you use 0 for an image location, that maps into the lowest color of the colormap, what-ever that happens to be. But it is still going to be a color. "transparent" is not a color.
Fortunately, in images you can use Alpha to indicate transparency, using 0 for the alpha to make a location completely transparent. However, images cannot have a Z component.
So what you have to do is create patch() or surface objects, as those can have Z components. And you have to put something image-like on the surface you crated. Which you can do by using texture mapping

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 11 Dec 2012

0 votes

For true volume visualization you'll need a real 3D program meant for that kind of thing, like Avizo http://www.vsg3d.com/avizo/overview. MATLAB does have some primitive things to do certain limited types of volume visualization. They're listed in the help in the section on 3D visualization. For more advanced things you'll need a program like Avizo or similar programs. Avizo blows MATLAB away when it comes to 3D visualization.

Tags

Community Treasure Hunt

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

Start Hunting!