Dicom files to one 2d matrix

조회 수: 2 (최근 30일)
Madi khad
Madi khad 2020년 1월 8일
답변: Selva Karna 2020년 1월 9일
Hello ,
I have dicom files with 210 slices. I would like to use dicom read to read all slices then I would like to have a matrix with slice spacing in the y axe and all HU numbers in the width for each slice.
any help?
Thank you

채택된 답변

Selva Karna
Selva Karna 2020년 1월 9일
clc
clear all;
close all;
warning off
myFolder='your dicom root';
filePattern = fullfile(myFolder,'*.dcm');
dcmfiles = dir(filePattern);
flen=length(dcmfiles);
for k = 1:flen
baseFileName =dcmfiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
a = dicomread(fullFileName);
dcm_vlm(:,:,k)=a;
end
%% To view 3d volume
volshow(squeeze(dcm_vlm));

추가 답변 (0개)

카테고리

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