dicomanon
Anonymize DICOM file meta data by removing or replacing fields.
Attention: Valid only with Altair DICOM Extension.
Syntax
dicomanon(infilename,outfilename)
dicomanon(infilename,outfilename, name, value)
Inputs
- infilename
- Path of the input DICOM file.
- outfilename
- Path of the output DICOM file.
- name
- Valid values are 'keep','update'.
- value
- if 'name' is 'keep' then the 'value' is a cell of strings representing fields to keep.
Example
dicomanon example to remove sensitive fields.
dicomanon('Path/To/File/0015.DCM', 'Path/To/File/0015_anon.DCM')
original_info=dicominfo('Path/To/File/0015.DCM')
anon_info=dicominfo('Path/To/File/0015_anon.DCM')
original_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
PatientBirthDate:
PatientID: 13-15-81
PatientName: ABCD
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]
anon_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]
dicomanon example to remove sensitive fields.
dicomanon('Path/To/File/0015.DCM', 'Path/To/File/0015_anon.DCM', 'keep',{'PatientID', 'PatientName'})
original_info=dicominfo('Path/To/File/0015.DCM')
anon_info=dicominfo('Path/To/File/0015_anon.DCM')
original_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
PatientBirthDate:
PatientID: 13-15-81
PatientName: ABCD
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]
anon_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
PatientID: 13-15-81
PatientName: ABCD
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]
dicomanon example to remove sensitive fields.
dicomanon('Path/To/File/0015.DCM', 'Path/To/File/0015_anon.DCM','update',struct('PatientName','SR'))
original_info=dicominfo('Path/To/File/0015.DCM')
anon_info=dicominfo('Path/To/File/0015_anon.DCM')
original_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
PatientBirthDate:
PatientID: 13-15-81
PatientName: ABCD
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]
anon_info = struct [
AccessionNumber:
AcquisitionDate: 19960308
AcquisitionDeviceProcessingDescription: 10 OUT OF 20. 0=LOW, 20=HIGH CONVOLUTION KERNEL
AcquisitionTime: 105650
.....
PatientName: SR
.....
TransferSyntaxUID: 1.2.840.10008.1.2.1
WindowCenter: 127
WindowWidth: 255
XRayTubeCurrent: 0
]