Effacer les filtres
Effacer les filtres

write dicom rt file

9 vues (au cours des 30 derniers jours)
Luis Isaac
Luis Isaac le 23 Nov 2018
Modifié(e) : Luis Isaac le 24 Nov 2018
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 commentaire
Rik
Rik le 23 Nov 2018
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by