下の階層にある大量のフォルダ内にあるdicomファイルを読み込んで、1つのmatファイルに保存したいです。
Afficher commentaires plus anciens
プログラミング初心者です。
myfolderの中の複数のフォルダにある大量のdicomファイルを全て読み込んで、1つのmatファイルにまとめるため以下のようなスクリプトを書いたのですが、「dicomファイルが読み込めません」というエラーが出てきてしまします。
どのようにスクリプトを変えればよいかご教授いただけますと幸いです。
% path to files
pname = '/Volumes/SSD/myfolder/*/'; %
%%
list_dicom = dir([pname,'*.dcm']);
gg=size(list_dicom,1); % N of slices
for j = 1:gg
data(:,:,j) = dicomread([pname,list_dicom(j).name]);
end
save([pname,'all_data.mat'],'data');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!