Access routes and source navigation

What this guide provides

Find the implementation behind each interface and processing step. Start with an access route; use the source links when inspecting or adapting a particular operation.

Access routes

Use Installation and Quick start for the Python CLI, Run Docker directly for direct Docker, Singularity / Apptainer for cluster execution, or Use ITK-SNAP with the remote DSS service for a compatible remote service.

Active implementations

Component

Source

Python command-line interface

pkg_src/purple_mri/cli.py

Docker command construction

pkg_src/purple_mri/containers.py

Model/stage selection and default image

pkg_src/purple_mri/workflows.py

Container dispatcher

commands_nnunet_inference.sh

Surface-stage orchestration

run_exvivo_surface.sh

Hemisphere-specific surface preparation

prepare_segm_files.sh

White/pial surfaces and cortical atlases

parcellation.sh

Paired registration

registration_exvivo_invivo_greedy_v3.sh

Population templates

scripts/intensity_template/

Group analyses

glm/

ITK-SNAP service integration

purple-dss

Left and right hemispheres

Choose --hemi lh or --hemi rh for the actual anatomical side. In the active container source, docker/docker_files/surface/prepare_segm_files.sh selects the corresponding FreeSurfer anatomical codes before surface reconstruction. Gray matter uses 3/42 and white matter uses 2/41 for left/right, respectively; deep structures and ventricles also use the matching side. The pseudo-MRI intensity scheme is identical for both hemispheres.

The standalone purple_mri/ scripts and the older native scripts under pkg_src/purple_mri/scripts/ are historical workflows with different input contracts. They are not the container implementation; see Legacy native surface workflow. Editing a repository file does not modify an already published Docker image or SIF. Container rebuilds and package publication are separate release operations.

Model identifiers

A task is an nnU-Net dataset/model identifier used to select trained weights and their input/output conventions. It is not a subject ID, anatomical code or job number. segmentation and tissue merging introduces the task IDs used by the processing pipeline; Command reference lists the available stage names.