Restructuring

Corrupted instance drop

Identify and discard unreadable or corrupted instances from a study.

Problem

You’re loading a folder of DICOM files, and some are corrupted — truncated files, zero-byte placeholders, non-DICOM text files accidentally mixed in, or files with bad DICOM headers. You don’t want the entire load to fail because of one bad file. The app should skip corrupted files, load everything valid, and report which files were skipped.

Steps

Partial Failure (Happy Path)

  1. Open a mixed set of files (⌘O) — e.g. test.dcm (valid) + corrupted.dcm (bad header).

  2. The valid file loads successfully. The metadata sidebar is visible, and the Files tree shows only the valid study.

Complete Failure (All Files Corrupted)

  1. Open only corrupted files — e.g. corrupted.dcm alone.

  2. The metadata sidebar does not appear. An error message is displayed: “Load failed” / “Invalid DICOM file, expected header is missing”.

Skip Non-DICOM Files

  1. Load valid DICOMs + non-DICOM files — e.g. test.dcm, sr-test.dcm, and notes.txt (plain text) or empty.dcm (zero bytes).

  2. Both valid files load. The Files tree shows two study headers. The invalid files are silently skipped with console errors logged.

Result

On a mixed load, valid files open and corrupted or non-DICOM files are skipped, so the study tree shows only good entries; if everything is corrupt you get a clear “Load failed” message and no half-built UI. Each skipped file — zero-byte, non-DICOM, or bad header — is logged by name.