필터 지우기
필터 지우기

Dicom image reading help

조회 수: 2 (최근 30일)
naila
naila 2013년 7월 24일
hi, I have 64 dicom slices in a file as: 001.dcm 002.dcm 003.dcm 004.dcm 005.dcm . . . . .064.dcm
I want to read these from a file one by one for some processing on each individual slice? How can l do it probably by using Loop, Please....?

답변 (1개)

Gareth Thomas
Gareth Thomas 2013년 7월 24일
You will need the Image Processing Toolbox. Here is a reference: http://www.mathworks.nl/help/images/ref/dicomread.html
On this page there is an example:
info = dicominfo('CT-MONO2-16-ankle.dcm');
Y = dicomread(info);
figure, imshow(Y);
imcontrast;
Please note that the image you use can be yours.
I would do something like
a = dir('*.dcm')
for i=1:length(a)
info = dicominfo(a(i).name);
Y = dicomread(info);
figure, imshow(Y);
%%or do some other procesing.
imcontrast;
end
  댓글 수: 1
naila
naila 2013년 7월 26일
Thank you for reply! but it shows nothing when i use it on command window. Okey! I make my question more simple I have a folder named patient in matlab's current directory I want to read all the 64 MR dicom images from it one by one for further processing.

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

카테고리

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