How to read and show multiple dicom images?

24 visualizaciones (últimos 30 días)
Arathy Das
Arathy Das el 28 de En. de 2017
Comentada: Walter Roberson el 31 de Dic. de 2020
Can anyone help me to read and show multiple dicom images from a folder...
dicomlist = dir(fullfile(pwd,'Images','*.dcm'));
for cnt = 1 : numel(dicomlist)
I{cnt} = dicomread(fullfile(pwd,'Images',dicomlist(cnt).name));
end
I have tried this code but it is not working... Please help me
  6 comentarios
Shahzanani Senin
Shahzanani Senin el 28 de Dic. de 2020
Hi Maryam,
Can I know how you solve the problem? How you convert them to 3D images?
Walter Roberson
Walter Roberson el 31 de Dic. de 2020
foldername = 'Images_patient001';
dicomlist = dir(fullfile(foldername,'*.dcm'));
for cnt = 1 : numel(dicomlist)
thisfile = fullfile(foldername, dicomlist(i).name);
I{cnt} = dicomread(thisfile);
end
I3D = cat(ndims(I{1})+1, I{:});

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 31 de Dic. de 2020
foldername = 'Images';
dicomlist = dir(fullfile(foldername,'*.dcm'));
for cnt = 1 : numel(dicomlist)
thisfile = fullfile(foldername, dicomlist(i).name);
I{cnt} = dicomread(thisfile);
end

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by