Automation

Transactional undo & audit log

Roll back batched changes and review a timestamped log of every modification.

Problem

During a DICOM editing session, you make a mistake — you accidentally modify the wrong tag or apply an anonymization profile you didn’t intend to. You need a reliable undo system that tracks every edit as a transaction, lets you revert step-by-step, and supports redo in case you undo too far. The dirty counter in the top bar tracks the net number of uncommitted modifications.

Steps

Edit → Undo → Redo Cycle

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

  2. Edit a tag — double-click Patient Name, change it to EDITED^PATIENT, save. The row turns gold, dirty counter shows “1 modified”.

  3. Undo — click the Undo button (⌘Z) in the metadata toolbar. The tag reverts to its original value, gold highlight disappears, dirty counter clears.

  4. Redo — click the Redo button (⌘Shift+Z). The edit is re-applied, gold highlight and counter return.

SQ Sequence Edits

  1. Remove a sequence item — in an RTSTRUCT file, filter for (FFFE,E000) (item delimiter rows), click ✕ on an item to remove it.

  2. Undo — the removed item is restored. Item count returns to the original value.

  3. Add a sequence item — click + on an SQ row. The item count increments (e.g. “1 items” → “2 items”).

  4. Undo — the added item is removed, count reverts.

Dirty Counter

  1. The dirty counter in the top bar (next to the command palette button) shows the net number of modifications. It appears when dirty > 0 and disappears on full undo.

Expected Result

  • Every tag edit, SQ item add/remove, structural change (split/merge), and anonymization application creates an undoable transaction.
  • Undo (⌘Z) steps backward through the history stack.
  • Redo (⌘Shift+Z) steps forward through previously undone actions.
  • The dirty counter accurately reflects the net modification count.
  • Undo/Redo buttons show tooltips: “Undo (Cmd+Z)” / “Redo (Cmd+Shift+Z)” when actions are available.
  • Undo maintains referential integrity — e.g. undoing a study split restores the original Study Instance UID.