Create a montage of dicom images

2 views (last 30 days)
Siddharth
Siddharth on 28 Mar 2014
Commented: Siddharth on 29 Mar 2014
I have a folder which contains around 32 dicom images.can somebody please tell me how do i create a montage which will display all the images in one figure.The code that i have written creates 32 figures.I want to display only one figure which will contain all the 32 images in 8 rows and 4 columns.
Code:--
clc
clear all
dcmFiles = dir('*.dcm');
for k = 1:length(dcmFiles)
X = dcmFiles(k).name;
I=dicomread(X);
figure, montage(I, 'Size',[8 4], ...
'DisplayRange', []);
end
  2 Comments
Marta Salas
Marta Salas on 28 Mar 2014
This may help: http://www.mathworks.es/es/help/images/ref/montage.html Look at the example: "Create Montage from Series of Files"
Siddharth
Siddharth on 29 Mar 2014
I took the given example as a reference but i'm unable to understand whats the error in my code

Sign in to comment.

Answers (0)

Categories

Find more on DICOM Format 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!