Borrar filtros
Borrar filtros

how display a list of dicom images

1 visualización (últimos 30 días)
jan
jan el 13 de Oct. de 2015
Comentada: jan el 13 de Oct. de 2015
Hi every body here is the code that i used to fill a list by reading a certain number of dicom images. My question is how can i display this list the last command imshow .. dosn't work. thanks!
if true
dicomlist = dir(fullfile('data\folder','*.dcm'));
for cnt = 1 : numel(dicomlist)
I{cnt} = dicomread(fullfile('data\folder',dicomlist(cnt).name));
imshow(I,'DisplayRange',[]);
pause(3)
end
end

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Oct. de 2015
imshow(I{cnt},'DisplayRange',[]);

Más respuestas (1)

Image Analyst
Image Analyst el 13 de Oct. de 2015
Unless you need to store all the images after the loop exits, I would not use an index on I.
for k = 1 : numel(dicomlist)
filename = fullfile('data\folder', dicomlist(k).name);
theImage = dicomread(filename);
imshow(theImage, []);
title(filename, 'FontSize', 24);
drawnow;
pause(3);
end
  1 comentario
jan
jan el 13 de Oct. de 2015
thanks for your perfect answer

Iniciar sesión para comentar.

Categorías

Más información sobre DICOM Format 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