필터 지우기
필터 지우기

i wanted to read .dcm files for my project from a folder

조회 수: 16 (최근 30일)
andhavarapu lokesh
andhavarapu lokesh 2016년 11월 14일
답변: Mostafa Hussien 2020년 2월 18일
can anyone give me code to read the dicom files from folder and
X = repmat(int16(0), [128 128 1 200]);
dicomFiles = dir('E:\SHIVA BACKUP\THYROID\P1\newcodes\data1\13002\*.dcm');
y=length(dicomFiles)
% Read the series of images.
for p=1:y
%filename = sprintf('IM_%01d.dcm', p);
X(:,:,1,p) = dicomread(dicomFiles);
end
% Display the image stack.
montage(X,[])

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 14일
projectdir = 'E:\SHIVA BACKUP\THYROID\P1\newcodes\data1\13002';
dicomFiles = dir( fullfile(projectdir, '*.dcm' ));
y = length(dicomFiles)
X = zeros(128, 128, 1, y, 'uint8');
% Read the series of images.
for p=1:y
filename = fullfile( projectdir, dicomFiles(p).name );
X(:,:,1,p) = dicomread(filename);
end
% Display the image stack.
montage(X,[])
  댓글 수: 14
andhavarapu lokesh
andhavarapu lokesh 2016년 11월 25일
sir after reading the images i wanted to do volume rendering for the above code how to do please can you give me any code where i need to do find the leftventricle ejection fraction by calculating the end sistole and diastole volumes
Walter Roberson
Walter Roberson 2016년 11월 25일
I suggest you get vol3d v2 from the file exchange to do the volume rendering on each squeeze(X(:, :, :, :, p))
I do not know anything about calculating volume fraction or isolating ventricles. I always fainted when they did the heart rendering where I worked.

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

추가 답변 (1개)

Mostafa Hussien
Mostafa Hussien 2020년 2월 18일
i have a folder its name Brain-Tumor-Progressionon Desktop its dicom file how can i read a file insid this folder called PGBM-001 please answer

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by