Effacer les filtres
Effacer les filtres

Dicom files to one 2d matrix

2 vues (au cours des 30 derniers jours)
Madi khad
Madi khad le 8 Jan 2020
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

Réponse acceptée

Selva Karna
Selva Karna le 9 Jan 2020
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));

Plus de réponses (0)

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by