View License

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

» Watch video

Highlights from
Dicom Import GUI

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.8 | 7 ratings Rate this file 28 Downloads (last 30 days) File Size: 20.3 KB File ID: #41912 Version: 1.4
image thumbnail

Dicom Import GUI



23 May 2013 (Updated )

Sorts DICOM files into series and lets you select the series you want to load in a GUI

| Watch this File

File Information

DICOM files are usually quite chaotic to handle. This little tool helps you to find the datasets (DICOM series) you want to load. It sorts the DICOM files in a folder and optionally in all of its sub-folders into series of images and displays them in a GUI with a preview of the each series. Select the series you need and press <ENTER> to load the selected series alon with some header information.
NOTE: Use the mouse wheel or up-and down-keys to navigate through the series if there are more than 8 series. Close the GUI and load the sereis by pressing ENTER.


Read Medical Data 3 D inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.0 (R2012b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (20)
03 Oct 2016 Cedric Devivier

Typo in 336:
if numel(SThisData(1).ImageOrientationPatient == 6)

Should be:
if numel(SThisData(1).ImageOrientationPatient) == 6

26 Feb 2016 Christian Wuerslin

Hi Ivan,

you can select multiple datasets at once using the shift- and control-keys as if you would do in you file browser.

Comment only
11 Nov 2015 Fritz

Fritz (view profile)

Typo in 314: fprintf(1, 'Loading slected DICOM files...');

01 Jul 2015 Ivan Shorokhov

I would be very grateful, if you could add an extra question dialog (questdlg), such as: "Would you like select any other set of data before closing GUI?". And then give a name for new/extra data-sets, or simply "DI1", "DI2", "DI3".

As in my case I have 6 different MRI data-sets, and had to run GUI 6 times to get all the data saved.

It also would be very useful, if you made a mistake while choosing data.

If explanation is unclear, please let me know.

30 Jun 2015 Ivan Shorokhov

Dear Christian,

Now everything working fine.
Thanks you a lot, you have done a great job!

Best Regards,

Comment only
17 Apr 2015 Pradeep Gowda

i guess it would be help full if u could provide some data set of mri .

Comment only
09 Apr 2015 Christian Wuerslin

What you see in this GUI is only a thumbnail preview of the DICOM series. Click on it and press enter to actually load the whole series. See the documentation of DicomInfo for details. If you want an image viewer, try "imagine".

Comment only
09 Apr 2015 Pradeep Gowda

HI i have the series 8 test report . but when i select it all 60 images are not being displayed , instead it shows only 1 image and says 60 images in attributes. how to display all 60 images ?

Comment only
09 Apr 2015 Pradeep Gowda

hii i have the series 8 test report . but when i select it all 60 images are notbeing displayed , instead it shows only 1 image and says 60 images in atributes. how to display all 60 images ?

Comment only
09 Apr 2015 Christian Wuerslin

OK, seems like there is no (valid) patient orientation information in your DICOM. I've uploaded a version which checks for that and skips the orientation adjustment in that case.

Comment only
09 Apr 2015 Kamil Dimililer

>> DicomImport
Scanning for DICOM files...done.
Creating thumbnails...done.
Found 1 files in 1 datasets!
Loading slected DICOM files...Error using reshape
To RESHAPE the number of elements must not change.

Error in DicomImport (line 329)
dImageOrientation = reshape(SThisData(1).ImageOrientationPatient, [3,
2])'; % Should be the same for a volume

Comment only
08 Apr 2015 Christian Wuerslin

Hi Kamil,
try to load the latest version and see if it works. DicomImport definitely found your DICOMS, otherwise it would have exited before even showing the GUI.

Comment only
08 Apr 2015 Kamil Dimililer

Dear Ivan,
I tried to load a folder that there are .dcm files inside but i received this error.

Error while evaluating Figure WindowButtonMotionFcn

Undefined function or variable "iStartSeries".

Error in DicomImport/fWindowMouseMoveFcn (line
iSeriesInd = iAxisInd + iStartSeries -1;

Thank you

Comment only
07 Apr 2015 Christian Wuerslin

Hi Ivan,

I uploaded a new version that fixed the error you encountered. Thanks for letting me know!

Comment only
23 Mar 2015 Ivan Shorokhov

I have following error, when I'm trying to load single DICOM image.

Attempted to access d3rdDimInd(2); index out of bounds because numel(d3rdDimInd)=1.

Error in DicomImport (line 314)
SDataOut(i).Aspect(3) = abs(d3rdDimInd(2) - d3rdDimInd(1));

Could you recommend me please how I can fix it?

12 Mar 2015 Christian Wuerslin

Hi Matthew,

unfortunately, I can't replicate your problem and I'm kinda jealous of your setup! Thanks for the hotfix.

- Christian

Comment only
09 Mar 2015 Matthew

on my 4 monitor tree, the figure 'Position' calculation does not work..... the resulting window ends up being off-screen on the bottom.....

if you have this problem, just set the x,y positions to 0 in both the try and the catch

'Position' , [0*(dScreenSize(3) - dFigureWidth )./2, ...
0*(dScreenSize(4) - dFigureHeight)./2, ...
dFigureWidth, dFigureHeight], ...

02 Apr 2014 Brent Foster  
23 Dec 2013 Earl DuBack

When I run apple version, I get figure consisting of 3 images because there are 3 sets of DICOM images. The text "Dicom Import [press enter to confirm] is there. The number of images in each set is 74,74,28. I suspect the figure is supposed to have all thumbnails in a set behind one another? that I am supposed to be able to move through using mouse or up/down arrow keys. BUT figure is frozen with no way to view any other images in set.

Comment only
23 Sep 2013 Matt J

Matt J (view profile)

Seems to work pretty well!

Just as a minor thing, it would be nice if the GUI had a scroll bar to move among the different series and to see better where you are within the list.

04 Jun 2013 1.1

Fixed the error that occurred when dicomread returned an empty aray (e.g. for MR spectro data).

07 Apr 2015 1.2

- Added slider
- Fixed the bug described by Ivan
- Added two buttons

08 Apr 2015 1.3

I hope, I fixed the multiscreen issue and problems with callbacks during startup

09 Apr 2015 1.4

Fixed the case where no valid orientation information is given

26 Feb 2016 1.4

Hey, I totally forgot to take into account the rescale slope and rescale intersect and no one ever complained! Fixed now.

Contact us