필터 지우기
필터 지우기

How to read and show multiple dicom images?

조회 수: 6 (최근 30일)
Arathy Das
Arathy Das 2017년 1월 28일
댓글: Walter Roberson 2020년 12월 31일
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
Shahzanani Senin
Shahzanani Senin 2020년 12월 28일
Hi Maryam,
Can I know how you solve the problem? How you convert them to 3D images?
Walter Roberson
Walter Roberson 2020년 12월 31일
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{:});

댓글을 달려면 로그인하십시오.

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by