DICOMデータをCSVへ一括変換する。
MRIのT1 mapなどの処理に有用。
% dcm 2 csv main_fd = "DICOMデータが入っているフォルダを指定"; imgs = dir(main_fd); imgs = imgs(3:end); csv_fd = "CSVファイルを保存するフォルダを指定"; for x = 1:length(imgs) img_path = fullfile(main_fd, imgs(x).name); img = dicomread(img_path); nm = split(imgs(x).name,"."); csv_path = fullfile(csv_fd,strcat(nm{1},".csv")); csvwrite(csv_path,img) end