필터 지우기
필터 지우기

how display a list of dicom images

조회 수: 1 (최근 30일)
jan
jan 2015년 10월 13일
댓글: jan 2015년 10월 13일
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

채택된 답변

Walter Roberson
Walter Roberson 2015년 10월 13일
imshow(I{cnt},'DisplayRange',[]);

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 10월 13일
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
jan
jan 2015년 10월 13일
thanks for your perfect answer

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

카테고리

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