Code covered by the BSD License  

Highlights from
image3

5.0

5.0 | 2 ratings Rate this file 40 Downloads (last 30 days) File Size: 232.12 KB File ID: #21881
image thumbnail

image3

by Anders Brun

 

24 Oct 2008 (Updated 26 Oct 2008)

Renders a 2-D image in 3-D space using a texture mapped rectangle, with several examples of uses.

| Watch this File

File Information
Description

Using image3 the user can display an image with arbitrary position and orientation in Matlabs 3-D space. It is fast, exact and mimic the well known image and imagesc commands.

The package also includes:

imagesc3, a scaled version of image3
slice3, display slices fast from 3-D volume data
box3, display a box from 3-D volume data
scatterim2, make a 2-D scatter plot using images

I originally created this code to make slices of medical MRI data, to be able to rotate and change them really fast. Since then I have found many uses of them, since image and imagesc are strange and pcolor and surf are usually too slow without modification. I also prefer to control exactly what is plotted and where, without the extra intelligence from Matlab that switches the x- and y-axis from time to time.

Remark: A lot of the code is pixel/voxel centered, instead of vertex centered. And all indices are assumed to start at 1. If you are clever enough to be annoyed by that, I am sure you know also how to add the extra magic to the transformation matrices to make them work the way you want it. A hint is to have a look at the box3.m code.

Acknowledgements
This submission has inspired the following:
myslicer - make mouse-interactive slices of a 3-D volume
MATLAB release MATLAB 7.6 (R2008a)
Other requirements Demo looks better if the data file frew_rawface from http://www.cs.toronto.edu/~roweis/data.html is downloaded.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
26 Oct 2008 Orlando Rodríguez

Wow, what a wonderful tool for image manipulation!
Thanks!

31 Jan 2012 Araz  
Please login to add a comment or rating.
Updates
26 Oct 2008

updated screenshot to make Myaa more justice... :-)

Tag Activity for this File
Tag Applied By Date/Time
image Anders Brun 24 Oct 2008 14:15:21
imagesc Anders Brun 24 Oct 2008 14:15:22
scatter Anders Brun 24 Oct 2008 14:15:22
slice Anders Brun 24 Oct 2008 14:15:22
texture mapping Anders Brun 24 Oct 2008 14:15:22
surf Anders Brun 27 Oct 2008 09:22:02
box Anders Brun 27 Oct 2008 09:22:02
plotting Anders Brun 27 Oct 2008 09:22:02
2d Cristina McIntire 27 Oct 2008 09:36:09
3d Cristina McIntire 27 Oct 2008 09:36:17
2d Anders Brun 27 Oct 2008 11:24:23
3d Anders Brun 27 Oct 2008 11:24:25
plot Anders Brun 28 Oct 2008 14:43:32
transformation Anders Brun 28 Oct 2008 14:44:07
myaa Anders Brun 31 Oct 2008 13:34:55
image Cristina McIntire 10 Nov 2008 10:54:19
texture mapping wang 29 Mar 2009 16:30:44

Contact us at files@mathworks.com