write dicom rt file

9 次查看(过去 30 天)
Luis Isaac
Luis Isaac 2018-11-23
编辑: Luis Isaac 2018-11-24
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!
  1 个评论
Rik
Rik 2018-11-23
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 DICOM Format 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by