下の階層にある大量のフォルダ内にあるdicomファイルを読み込んで、1つのmatファイルに保存したいです。
Show older comments
プログラミング初心者です。
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');
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!