金马扬名导出CT的seriesID不是一致的,所以一个患者CT导入itk-snap会被分成一个,如下进行更改seriesID。MR这钟方法不可行,需借助notebook++.
patient_path = 'C:\Users\MrXie\Desktop\CMR148167-CCT374784';
patient_outpath = [patient_path, '_out'];
if ~exist(patient_outpath, 'dir')
mkdir(patient_outpath)
end
names = dir(patient_path);
info_standard = dicominfo(fullfile(patient_path, names(3).name));
for i = 3: length(names)
name = names(i).name;
info = dicominfo(fullfile(patient_path, name));
img = dicomread(info);
info.SeriesInstanceUID = info_standard.SeriesInstanceUID;
dicomwrite(img, fullfile(patient_outpath, name), info);
end