Portable 3D Slicer for macOS with Auto-Import DICOM Directory

Introduction:
I’m an engineer and have been tasked with sharing a patient’s DICOM dataset with a macOS-based Dr. (expert). The imaging location provided a DICOM directory and an application but users report errors opening the exported media/application (e.g., crashes, “cannot open” messages). This is something I experience quite frequently and I would like to simply this.

Objective:
Create a self-contained macOS and Windows package that includes 3D Slicer and a DICOM directory (that I receive from imaging locations) where the user can download slicer from the folder and launching Slicer automatically imports and loads all valid DICOM series (e.g., CT/MRI, segmentations if present) from the directory into the scene, with visibility enabled, requiring no user interaction (e.g., no manual DICOM import or load steps).

Folder Structure:

PATIENT IMAGING/
  ├── DICOM_INFO/ (*.dcm files)
  ├── Slicer.app/ (extracted from Slicer-5.8.1-macosx-amd64.dmg)
  └── README.txt

Requirements:

  • Auto-Import: On Slicer launch, the DICOM_INFO directory is scanned, valid series are imported into the DICOM database, and loaded into the scene without user input.
  • Error Handling: Common DICOM errors (e.g., “Invalid DICOM file,” “Missing metadata”) are handled silently, loading only valid data.
  • Visibility: All loaded data (e.g., volumes, segmentations) is visible by default (eye icons enabled in Subject Hierarchy).
  • Portability: Package includes Slicer.app and any required extensions (e.g., QuantitativeReporting for segmentations) offline, with no external downloads.
  • macOS Compatibility: Supports Ventura/Sonoma, Intel/ARM, with macOS security warnings handled (e.g., Gatekeeper bypass instructions).
  • HIPAA Compliance: Assumes anonymized DICOM files; package remains offline.

Questions:

  1. Does Slicer 5.8.1 have a built-in feature or configuration to auto-import a DICOM directory on launch and load all series into the scene?
  2. Can a Python script automate this process (e.g., using slicer.modules.dicom to scan DICOM_INFO and load series)? If so, please share an example script or reference.

Additional Info:

  • DICOM data likely includes CT/MRI; segmentations/RT objects possible but unconfirmed.
  • Anonymized sample DICOM files can be shared via secure link if needed.
  • Solution must minimize user interaction for non-technical macOS and Windows users.

Request:
Seeking confirmation of an existing Slicer 5.8.1 feature or a script/workflow to create a portable macOS package that auto-imports and displays DICOM_INFO data on launch. Example scripts, configuration steps, or extension bundling instructions are appreciated. Willing to test solutions and provide feedback.

Thank you,
Wyatt
wyatt@earpengineering.com

Hi - welcome. This all sounds very feasible with a (fairly) simple python script. I don’t see anything on your list that doesn’t already exist, so it would just be a matter of putting the pieces together and iterating to make the behavior comfortable for your target users.

Are you able to make your solution open source?