Automation

Fix a tag across a folder

Set, replace or remove named tags in a corrected copy of a folder, after a preview of what each file holds now.

Desktop app only, 1.6.0 or newerdcmage pro

Problem

One value is wrong in hundreds of files: a misspelled Study Description, an institution name that changed, a tag a receiving system rejects. Opening each file takes too long, and a script can do a lot of damage before anyone notices.

Steps

  1. Choose Fix a Tag Across a Folder… on the start screen or in the session menu.

  2. Choose the folder to fix and an empty folder for the corrected copy.

  3. Enter the tag by keyword, name or number: StudyDescription, Study Description or 0008,1030.

  4. Choose what to do. Set writes the value in every file and adds the tag where it is missing. Replace changes only the files whose whole value matches. Remove deletes the tag. Add more tags if the same run should fix them too.

  5. Preview. dcmage reads every file and lists what they hold now, how many files hold each value, and which of them would change. It writes nothing.

  6. Write corrected copy. Each file is written at the same path inside the output folder. A file with nothing to change is copied byte for byte.

Limits

  • The copy is not anonymized. It still identifies the patient.
  • A tag inside a sequence is not changed.
  • A private tag, a UID, a sequence, a tag that describes the image layout, the character set and the de-identification tags cannot be changed this way.
  • A file that holds the tag as a 32-bit float is not written if the new value would read back as zero or infinity. The preview says which.
  • This run writes no signed record. The audit log holds the tag numbers and the counts.
  • Setting or removing Patient ID, Patient Name, Accession Number or Study ID where the files differ or hold more than one patient needs a confirmation, because it makes separate records read as one.

Result

A corrected copy of the folder, with a result for every file. The source folder is only read.