View License

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

» Watch video

Highlights from
Interactive DICOM 3D Viewer

3.7 | 3 ratings Rate this file 52 Downloads (last 30 days) File Size: 78.6 KB File ID: #28353 Version: 1.4
image thumbnail

Interactive DICOM 3D Viewer


Eric Johnston (view profile)


01 Aug 2010 (Updated )

Viewer allows user to look through cross sections of a dicom image set.

| Watch this File

File Information

The interactive viewer allows a user to select a folder with one set of dicom images. The viewer assembles the images in order and displays them as one 3D dataset. User can then scroll through and look at axial, sagittal, and coronal views. A zoom feature and measuring tool have also been added.


This file inspired Dicom Operator Esme Process.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Other requirements Large image sets may run into memory problems.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
15 Oct 2016 Muhammad Usman Saleem

plz tell me how can i use this? When i 'dcm3DViewer' in matlab and give this function to path it runs and dispaly a window showing three sub window. I am adding floder to them but there is not any any further working of button ahead? How can i add images to them?

Comment only
24 Jun 2016 joanna kosior

19 Jan 2016 Muhammad Arif


I need to display brain scans sagittal, axial and coronal views. I have run 3DViewer but it throws the error msg that 'You selected a folder that does not contain .dcm images'. Please guide me through this!

Comment only
21 Aug 2015 Patrice Burke


After having made the changes suggested by Kallie, I am still getting the same " You selected a folder that does not contain .dcm images" error. It seems that line 412 in the gatherImages function:
threedarray = zeros(size(topimage,1),size(topimage,2),size(d,1));
is throwing up an "out of memory" error. I'm not running anything else, so surely there is enough memory to display a dicom image...

Any suggestions please?

Comment only
22 Apr 2014 Kallie Brown

Those functions are indeed the issue. the files should use array indexing instead of structure indexing.
in sortDirectory :
d = dir('*.dcm'); instead of ls
metadata = dicominfo(d(i).name);

in gatherImages:
topimage = dicomread(d(1).name);
metadata = dicominfo(d(1).name);

Cool submission! Thank you

03 Oct 2013 mat

mat (view profile)

Thank you.
I have the same problem as Ghizelda agerweij.

Comment only
17 Jun 2011 medical imaging

thank you
i've the same probleme as Ghizelda agerweij

Comment only
13 Jun 2011 Eric Johnston

Eric Johnston (view profile)

Hi Ghizelda,
The .dcm images are sorted by instance number. I'm guessing that the file might contain sets of images that are not compatible (maybe they have overlapping instance numbers?) As a test you could copy out my "sortDirectory" function and "gatherImages" function and see if they work on your folder.

Comment only
10 May 2011 Ghizelda lagerweij

Thanks for the nice file for 3d DICOM viewer. There is only one problem. After compiling the file, I get an error: " You selected a folder that does not contain .dcm images"

Why? I am current that I have .dcm images. All the images are PET/CT scan images. Are there different .dcm images/files?

I think that the problem is between lines 86-119.

Comment only
02 Dec 2010 Crtistian Capannini

How can i convert into matlab gui? thanks!

01 Dec 2010 Crtistian Capannini

Ehm i want find a mode to convert *.m to a gui interface but i can't do it.

Comment only
05 Aug 2010 1.2

Bug removed: axial, coronal views can now scroll through entire set without ever hitting an error.

13 Jun 2011 1.3

Can Capture a an image as a figure.

12 Sep 2012 1.4

Updated to include an App file for R2012b

Contact us