Setting the value of an existing attribute

64 views
Skip to first unread message

James Allsopp

unread,
Jun 7, 2016, 11:59:47 AM6/7/16
to Fellow Oak DICOM
Hi,
I want to anonymise a Dicom file using fo-dicom, and I can read values from the dicom file, save it, and deal with the image, but I don't know how to either blank or delete an existing tag. There doesn't seem to be an equivalent matching Dataset.Set<T> method.

If anyone's got any ideas, that would be great.
Thanks,
James

Anders Gustafsson Cureos AB

unread,
Jun 7, 2016, 3:02:11 PM6/7/16
to Fellow Oak DICOM
Hi James,

Somewhat non-intuitively, the DicomDataset.Add<T> method is what you are looking for. In practice, Add works as an AddOrReplace method.

Best regards,
Anders @ Cureos

James Allsopp

unread,
Jun 9, 2016, 4:33:20 AM6/9/16
to Fellow Oak DICOM
Thanks for the answer and the speedy reply!
James


Reply all
Reply to author
Forward
Message has been deleted
0 new messages