to display multiple images on a single frame

1 visualización (últimos 30 días)
REHANA M.B
REHANA M.B el 10 de En. de 2012
I tried to display a X-Ray image .. and it successfully working. the code is below..
Y = dicomread('C:\Users\Rehana\Desktop\dicom\test.DCM');
imshow(Y);
imcontrast;
but getting error in the below code, here i am trynig to display multiple images on a single frame .. please help me..
load dicom
[X2,map2] = imread('C:\Program Files\MATLAB\images\'test'*.DCM');
subplot(1,2,1), subimage(X,map)
subplot(1,2,2), subimage(X2,map2)
in this case 'images' is one folder where i stored test1.DCM, test2.DCM,test3.DCM,test4.DCM ( samples of x-ray images )files.

Respuesta aceptada

Chandra Kurniawan
Chandra Kurniawan el 10 de En. de 2012
Hi,
It seem you tried to display multiple dicom files in a folder but you use wrong syntax.
And please don't use imread to read dicom file. Use dicomread instead.
Assume that I have 4 dicom files in folder named 'New Folder'.
files = dir(fullfile(pwd,'New Folder\*.dcm'));
for i = 1 : numel(files)
[X map] = dicomread(fullfile(pwd,'New Folder',files(i).name));
if ~isempty(map)
subplot(2,2,i);
subimage(X,map);
else
subplot(2,2,i);
imshow(X,[]);
end
end
  13 comentarios
REHANA M.B
REHANA M.B el 11 de En. de 2012
Mr.Chandra do you know any text books or any references, sites for learning displaying images in different ways on matlab?? (image processing on matlab).
let me know please..
i hit google for that but unable to get a good one.
REHANA M.B
REHANA M.B el 16 de En. de 2012
Hey please tell me how do i display it on GUI with pushbutton??

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 10 de En. de 2012
Instead of posting another copy of your question, answer the query put to you in your existing copy.
Your duplicate copy has been deleted.

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by