Read DICOM images from folder and save them into .mat file?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Erfaneh
am 14 Okt. 2014
Kommentiert: Geoff Hayes
am 16 Okt. 2014
I want to read DICOM images from folder in directory and then save them into mat file in output path. Can any one help me?
0 Kommentare
Akzeptierte Antwort
Geoff Hayes
am 15 Okt. 2014
Assuming you have the Image Processing Toolbox, use dicomread to read the data from file, and then save to save the data to a mat file. Something like
inputFilename = 'myDicomFile.dcm';
inputFolder = '/Users/somePath/dicomFiles';
% read the file
[X,map] = dicomread(fullfile(inputFolder,inputFilename));
% now write to a mat file
outputFilename = 'myMatFile.mat';
outputFolder = '/Users/somePath/matFiles';
save(fullfile(outputFolder,outputFilename),'X','map');
If you have several files to read and write, you can choose an appropriate outputFilename for each.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!