Image Processing Toolbox User's Guide |
Syntax
Description
dicomanon(file_in,file_out)
removes confidential medical information from the DICOM file file_in and creates a new file file_out with the modified values. Image data and other attributes are unmodified.
dicomanon(...,'keep',FIELDS)
modifies all of the confidential data except for those listed in FIELDS, which is a cell array of field names. This syntax is useful for keeping metadata that does not uniquely identify the patient but is useful for diagnostic purposes (e.g., PatientAge, PatientSex, etc.).
dicomanon(...,'update',ATTRS)
modifies the confidential data and updates particular confidential data. ATTRS is a structure. The field names of ATTRS are the attributes to preserve, and the structure values are the attribute values. Use this syntax to preserve the Study/Series/Image hierarchy or to replace a specific value with a more generic property (e.g., remove PatientBirthDate but keep a computed PatientAge).
For information about the fields that will be modified or removed, see DICOM Supplement 55 from http://medical.nema.org/.
Examples
Remove all confidential metadata from a file.
dicomanon('tumor.dcm', 'tumor_anon.dcm', ... 'keep', {'PatientAge', 'PatientSex', 'StudyDescription'})
Anonymize a series of images, keeping the hierarchy.
values.StudyInstanceUID = dicomuid; values.SeriesInstanceseriesUID = dicomuid; d = dir('*.dcm'); for p = 1:numel(d) dicomanon(d(p).name, sprintf('anon%d.dcm', p), ... 'update', values) end
See Also
decorrstretch | dicomdict |
© 1994-2005 The MathWorks, Inc.