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.
Type: string
outfilename
Path of the output DICOM file.
Type: string
name
Valid values are 'keep','update'.
Type: string
value
if 'name' is 'keep' then the 'value' is a cell of strings representing fields to keep.
if 'name' is 'update' then the 'value' is a struct where key represents fields to update.
Type: struct | cell

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
]