AI / ML

Label injection (custom private tags)

Write ground-truth labels into custom private tags for model training.

Problem

You need to inject custom metadata labels across all instances in a DICOM study — e.g. add a Clinical Trial Protocol ID to every file, or inject private tags with custom vendor-specific data. Manually editing every instance is impractical for studies with hundreds of slices. Batch label injection applies the same tag and value to every instance in one operation.

Steps

Standard Tag Injection

  1. Open the DICOM file (⌘O) and switch to Edit mode (⌘3).

  2. Open the Batch Label Injection modal — ⌘K → type “inject” → select the command.

  3. Add a row — enter the tag ID (0012,0020) (Clinical Trial Protocol ID) and value PROTO-7.

  4. Verify the Inject button is enabled and click it.

  5. Verify the injected tag — filter for (0012,0020). The tag is present with value PROTO-7 and gold highlighting.

Private Tag Injection

  1. Set a Private Creator ID — enter ACME in the creator field.

  2. Add a private tag — enter (0019,1001) and value PRIVATE-VAL.

  3. Click Inject.

  4. Verify both elements — filter for (0019,1001) → value is PRIVATE-VAL. Filter for (0019,0010) → the Private Creator element is auto-created with value ACME (per DICOM PS3.5 §7.8.1).

Validation

  1. Attempt an invalid value — add a row with tag (0008,0020) (Study Date, DA VR) and value NOTADATE. A validation error (“8 digits”) appears and the Inject button is disabled.

Expected Result

  • Standard tags are injected across all instances with gold highlighting.
  • Private tags automatically create their Private Creator reservation element.
  • VR validation catches invalid values before injection (invalid date → “8 digits” error, button disabled).
  • The dirty counter reflects the number of injected tags.