Restructuring

Duplicate frame removal

Detect and drop duplicate frames from a multi-frame object.

Problem

Your dataset contains duplicate DICOM instances — the same SOP Instance UID appears in two different files. This happens when files are copied between folders, when a PACS export includes redundant copies, or when a CD import brings in files already archived. Duplicate SOP Instance UIDs violate DICOM uniqueness constraints and cause PACS import errors.

Steps

  1. Open the files (⌘O) — load the same file twice to simulate duplicates (e.g. test.dcm loaded twice).

  2. Switch to the Files tab in the right rail.

  3. Check the Dedupe button — it shows Dedupe (1) indicating one duplicate was detected. The button is enabled.

  4. Click Dedupe — the duplicate instance is removed. The button updates to Dedupe (0) and becomes disabled (reduced opacity, not-allowed cursor).

  5. Verify — only unique instances remain. The files tree shows the correct count.

When No Duplicates Exist

  • Load a single file with no duplicates.
  • The Dedupe button shows Dedupe (0) and is disabled — you can’t click it when there’s nothing to deduplicate.

Expected Result

  • Duplicate SOP Instance UIDs are detected and flagged with a count.
  • After deduplication, one copy of each unique SOP Instance UID remains.
  • The button is disabled when no duplicates exist, preventing no-op clicks.
  • The first-loaded instance is kept; subsequent copies with the same UID are removed.