Plotting images in plot3 fashion
Show older comments
I'd like to visualize an image sequence in a plot3 fashion (that is, enabling the user to rotate the plot and use other plot3 functionality).
I currently have an (m x n x d) matrix where I'd like to plot an (m x n) image for each integer (1,...,d). Is there any way I can do this using image/imagesc within the plot3 environment?
I've easily been able to plot every point using plot3 with a square marker colored according to the intensity value. This is really suboptimal since (1) the borders of the square markers aren't touching and (2) the size of the square marker will change based on m & n.
Any suggestions?
Answers (2)
Image Analyst
on 26 Aug 2013
0 votes
Do you mean the surf function? See the clown demo in the help.
2 Comments
Image Analyst
on 3 Sep 2013
Why don't you just show them as images, which you say they kind of are? Use image(), imshow(), or slice().
By the way, you have a volumetric image with x, y, z (or time), and a value. That is 3D data, NOT 4D data. The value is not, repeat not, an independent dimension.
Walter Roberson
on 3 Sep 2013
0 votes
image() and imshow() are not suitable for plots that may be rotated around something other than the Z axis, as the images produced are represented as completely 2D and will pretty much vanish when there is any tilt. Likewise, image() and imshow() images literally do not have a Z axis so they cannot be stacked.
In order to draw an image that is rotatable or stackable in 3D you need to use texture mapping, either by using a surface graph (e.g., surf) or by using patch().
There is a volume (voxel) rendering program in the File Exchange.
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!