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

**URL:** <https://discourse.slicer.org/t/portable-3d-slicer-for-macos-with-auto-import-dicom-directory/43276>\
**Category:** Support\
**Tags:** dicom, file-export\
**Created:** [June 9, 2025, 7:42pm UTC](https://discourse.slicer.org/t/portable-3d-slicer-for-macos-with-auto-import-dicom-directory/43276 "2025-06-09T19:42:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wyatt\_Gray](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wyatt_gray/32/80374_2.png) [@Wyatt\_Gray](https://discourse.slicer.org/u/Wyatt_Gray)\
**Post date:** [June 9, 2025, 7:42pm UTC](https://discourse.slicer.org/t/portable-3d-slicer-for-macos-with-auto-import-dicom-directory/43276/1 "2025-06-09T19:42:04Z")

</div>

**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** :

```auto
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](mailto:wyatt@earpengineering.com)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 9, 2025, 8:43pm UTC](https://discourse.slicer.org/t/portable-3d-slicer-for-macos-with-auto-import-dicom-directory/43276/2 "2025-06-09T20:43:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ctrueden](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ctrueden/32/79291_2.png) [@ctrueden](https://discourse.slicer.org/u/ctrueden)\
**Post date:** [June 10, 2025, 2:01pm UTC](https://discourse.slicer.org/t/portable-3d-slicer-for-macos-with-auto-import-dicom-directory/43276/3 "2025-06-10T14:01:28Z")

</div>

The [Fiji](https://fiji.sc/) project recently switched to a new launcher I’ve been developing called [Jaunch](https://github.com/apposed/jaunch#readme). It is designed to provide portable cross-platform launching, including a [code-signed+notarized](https://github.com/apposed/jaunch/blob/main/doc/MACOS.md#code-signing) immutable .app bundle for macOS. It can be configured via TOML files to launch either Python or Java code (in this case probably a Python script). This could maybe be useful as the bootstrapping piece of a portable 3D Slicer bundle like this, to pass Gatekeeper including overcoming [Path Randomization](https://github.com/apposed/jaunch/blob/main/doc/MACOS.md#path-randomization).
