# dcmedit¶

## Synopsis¶

Edit DICOM file in-place

## Usage¶

dcmedit [ options ]  file

• file: the DICOM file to be edited.

## Description¶

Note that this command simply replaces the existing values without modifying the DICOM structure in any way. Replacement text will be truncated if it is too long to fit inside the existing tag.

WARNING: this command will modify existing data! It is recommended to run this command on a copy of the original data set to avoid loss of data.

## Options¶

• -anonymise remove any identifiable information, by replacing the following tags: - any tag with Value Representation PN will be replaced with ‘anonymous’ - tag (0010,0030) PatientBirthDate will be replaced with an empty stringWARNING: there is no guarantee that this command will remove all identiable information, since such information may be contained in any number of private vendor-specific tags. You will need to double-check the results independently if you need to ensure anonymity.
• -id text replace all ID tags with string supplied. This consists of tags (0010, 0020) PatientID and (0010, 1000) OtherPatientIDs
• -tag group element newvalue (multiple uses permitted) replace specific tag.

### Standard options¶

• -info display information messages.
• -quiet do not display information messages or progress status; alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
• -debug display debugging messages.
• -force force overwrite of output files (caution: using the same file as input and output might cause unexpected behaviour).