Sometimes it is easier to try to separate the image data from the other dicom fields in binary, and then put them back together after processing (with fread etc). However, I have never worked with rtdose data, so I don't know how feasible that strategy is.
write dicom rt file
11 次查看(过去 30 天)
显示 更早的评论
Dear
I woul like to anonymize an dicom rt file, but rather than remove the patient IDs I would like to change them to have a control number
For example if the info.PatientName is John i would like to change to Something_01 or Something_53
For dicom images the is no problem:
info=dicominfo(fileDCM);
info.PatientName.FamilyName=NewSurname;
info.PatientName.GivenName=NewName;
info.PatientID=NewID;
img = dicomread(fileDCM);
dicomwrite(img,fileDCM,info)
For rtstructs and rtplan I can do something similar
info=dicominfo(fileDCM);
info.PatientName.FamilyName=NewSurname;
info.PatientName.GivenName=NewName;
info.PatientID=NewID;
dicomwrite([ ],fileDCM,info,'CreateMode', 'Copy')
But for rtdose the code for images does not work, matlab report an error:
Writing multiple frames to one file requires a 'CreateMode' value of 'copy' or an object type of 'Secondary Capture Image Storage'
I think that the problem is that now img is an 4-D matrix and dicomwrite expect a 2-D matrix, but I do not know.
Any sugestion?
Thanks in advanced!
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!