View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
imshow3D (3D imshow) - new version released: see "imshow3Dfull"

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.9 | 16 ratings Rate this file 197 Downloads (last 30 days) File Size: 2.74 KB File ID: #41334 Version: 1.5
image thumbnail

imshow3D (3D imshow) - new version released: see "imshow3Dfull"


Maysam Shahedi (view profile)


16 Apr 2013 (Updated )

imshow3D:(3D imshow) Displays 3D images slice by slice.Intensity adjusting & slice browsing by mouse

| Watch this File

File Information

imshow3D displays 3D grayscale or RGB images in slice by slice fashion with mouse based slice browsing and window and level adjustment control.
 imshow3D ( Image )
 imshow3D ( Image , [] )
 imshow3D ( Image , [LOW HIGH] )
Image: 3D image MxNxKxC (K slices of MxN images) C is either 1 (for grayscale images) or 3 (for RGB images)
[LOW HIGH]: display range that controls the display intensity range of a grayscale image (default: the widest available range)
Use the scroll bar or mouse scroll wheel to switch between slices. To adjust window and level values keep the mouse right button pressed and drag the mouse up and down (for level adjustment) or right and left (for window adjustment). Window and level adjustment control works only for grayscale images.
"Auto W/L" button adjust the window and level automatically for grayscale images.

While "Fine Tune" check box is checked the window/level adjustment gets 16 times less sensitive to mouse movement, to make it easier to control display intensity rang.

Note: The sensitivity of mouse based window and level adjustment is set based on the user defined display intensity range; the wider the range the more sensitivity to mouse drag.
Note: IMSHOW3DFULL is a newer version of IMSHOW3D (also available on MathWorks) that displays 3D grayscale or RGB images from three perpendicular views (i.e. axial, sagittal, and coronal).
       % Display an image (MRI example)
       load mri
       Image = squeeze(D);

       % Display the image, adjust the display range
       imshow3D(Image,[20 100]);

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.4 (R2014b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (25)
01 Dec 2016 mouna lahouidheg

can help me how imshow image 3D on ghraphic interface (GUI) just code simple .
thank you answer me please on this mail:

Comment only
04 Nov 2016 faisal aziz

i need a code to 3d visualization from brain mri multiple slices can any one help me??

Comment only
14 Jul 2016 Maqlin Paramanandam  
30 May 2016 MB

MB (view profile)

Just a waste of time. Better use figure;imagesc.

Comment only
26 May 2016 Michael  
04 Mar 2016 Moamen Abdelwahed  
29 Jan 2016 Mattia Chini  
13 Jan 2016 BENZAIT Zakaria

how can i get this file please ??

Comment only
13 Jan 2016 BENZAIT Zakaria


Comment only
04 Jan 2016 Nazanin Makkinejad  
15 Dec 2015 Majid Sabbagh


15 Dec 2015 Majid Sabbagh  
10 Nov 2015 Fereshteh  
27 Aug 2015 Maysam Shahedi

Maysam Shahedi (view profile)

Hi Matthew,
Thank you for your interest in imshow3D. You need to input your image as a 3D matrix (e.g. Img) as follows:


You can also follow this example in Matlab to test it:

load mri
Image = squeeze(D);

Hope it works for you

Comment only
26 Aug 2015 Matthew Bourn

I am new to Matlab and I'm having difficulty using this function. where exactly do I input my image? I keep getting 'undefined function or variable 'Img''.

Comment only
07 Jan 2015 Zahra

Zahra (view profile)

Great work! thanks!

26 Aug 2014 Erfaneh

Thank you, It was very useful for me.

Comment only
26 Aug 2014 Erfaneh  
20 Aug 2014 Lukas

Lukas (view profile)

simplest usage and absolute intuitive! Very nice, thank you very much!

11 Jul 2014 Zhaoheng Xie

Fantastic work! Very useful~

26 Sep 2013 Nathan

Nathan (view profile)

20 Apr 2013 Jehan Ziad Ghafuri

Well done, I have tried it and it is awsome

19 Apr 2013 Maysam Shahedi

Maysam Shahedi (view profile)

Hi Mohammad,

if you mean to control the display intensity range of the image, yes, you can do it by pressing the right button of the mouse on the image and dragging the mouse to left and right or up and down.

By the way, in the next update (in few days) an option will be added to the function for calling the function with a specific display intensity range, similar to what we have for "imshow" function.

Hope it addressed your question. Please feel free to contact me if you have any further question about it.

Comment only
19 Apr 2013 Mohammad Azizian

is there a way to scale matrices in color map using this function?

18 Apr 2013 Jehan Ziad Ghafuri  
18 Apr 2013 1.1

This function needs image processing toolbox too.

19 Apr 2013 1.3

Display intensity range option has been added.
Minor bugs have been fixed.
It is more similar to Matlab imshow function now.
One example has been added to the help page.

07 Aug 2014 1.4

New Version of imshow3D has been released under imshow3Dfull name. It displays 3 orthogonal views (axial, sagittal, and coronal views) one by one.

22 Sep 2016 1.5

Now it can also display 3D RGB images.

Contact us