Film

Diffusion MRI workflows in 3D Slicer. Source code Download video

Native diffusion space

Outputs from SlicerDSpace.

Representative maps, surfaces, pathways and networks from the available analysis routes. Each view highlights a different product in native diffusion space.

Maps, cortical surfaces, fiber bundles and connectomes from the available analysis routes. Open full-size SVG

Choosing routes

Workflow overview.

Workflow overview: dMRI preparation, anatomical priors, microstructure, tractography, fibre bundles and connectomes.
From dMRI preparation to anatomical priors and downstream analyses.

Get started

From installation to your first result.

Install, run and review with your Agent. (Recommended)

  1. Read the Skill

    We provide an install-and-use Skill for SlicerDSpace. Give its SKILL.md to your local Agent to follow the project's setup, analysis and result-review workflow.

    The prompts link to SKILL.md as the entry point. To install the Skill in your Agent, copy the complete slicerdspace folder with its references, scripts and templates.

  2. Install and enable

    Agent prompt
    Read https://github.com/NeuroDMRI/SlicerDSpace/blob/main/.agents/skills/slicerdspace/SKILL.md.
    Install and enable SlicerDSpace in my local 3D Slicer.
    Set up the required dependencies and download the corresponding model weights.

    Your Agent checks storage space and existing resources, waits for your choice and saves the path for later use. It prepares only the selected analyses. Confirm licenses and restarts when requested.

  3. Use an existing installation

    Replace the input and output paths, and choose the methods your study needs. This example requests DDParcel, CSD/ACT tractography and a structural connectome.

    Analysis prompt
    Read https://github.com/NeuroDMRI/SlicerDSpace/blob/main/.agents/skills/slicerdspace/SKILL.md.
    Use SlicerDSpace to run DDParcel brain parcellation, CSD/ACT tractography and structural connectome construction for /path/to/subject; save results to /path/to/results.
    Show me the plan and wait for confirmation before running. Afterwards, summarize the outputs and QC findings.

Or set up manually

  1. Install the module

    Start with 3D Slicer; the protocol reference is version 5.10. Clone the source and create a separate extension installation:

    bash
    git clone https://github.com/NeuroDMRI/SlicerDSpace.git
    cd SlicerDSpace
    python3 scripts/stage_slicer_extension.py \
      --install-root ~/SlicerDSpace-extension --slicer-version 5.10 \
      --link-mode copy

    Replace 5.10 with the major/minor version shown in Slicer’s About dialog. The script stages the module and reports its installation directory.

  2. Add the module path

    Open Edit › Application Settings › Modules › Additional module paths. Add the expanded absolute path of ~/SlicerDSpace-extension/SlicerDSpace/lib/Slicer-5.10/qt-scripted-modules, matching the version you staged.

    Install SlicerDMRI and PyTorch from Slicer’s Extension Manager. Add the separate UKFTractography extension if you plan to use UKF. Restart Slicer, then open Modules › Diffusion › SlicerDSpace.

  3. Prepare the subject inputs

    Enter a Subject ID and Subject root. For prepared inputs, use this layout; the output directory can remain empty to use the subject’s outputs/ folder.

    sub-01/
      input/
        data.nii.gz
        bvals
        bvecs
        nodif_brain_mask.nii.gz   # optional; supply or generate

    DWI and mask must share one voxel grid. The gradient count must match the DWI volume count, and motion-corrected images need the corresponding rotated gradients.

    For DICOM or NRRD/NHDR, use Advanced settings › Regions & input import › Input import / conversion. Preview the import, then prepare the inputs before analysis.

  4. Select methods and prepare their environment

    For a small first run, select only Microstructure, clear the other products and keep DTI in its ... selector. For a fuller route, choose one or several algorithms beside each product. Advanced settings contains the model and tracking parameters.

    Open Environment and installation › Prepare selected analysis environment. Confirm the required tools, models and resource terms. Downloads are checked and cached for reuse. If a restart is requested, restart and select Prepare again to continue.

    Offline model resources, repair and manual path overrides are under More options. An existing reviewed mask avoids installing a mask-generation backend for the DTI-only route.

  5. Run and inspect

    Click Run SlicerDSpace. Missing fields are highlighted, and the log reports progress or a specific correction. Successful key products load automatically; DTI supplies FA and MD for inspection.

    In Results and QC, select the run to inspect its checks and reload or replace products without duplicating scene nodes. Review mask coverage, alignment and method-specific QC before accepting results.

Command-line execution and cohort processing

From the checkout, use Slicer’s Python to check a DTI-only route. Replace the two absolute paths below:

bash
export SLICER_LAUNCHER="/path/to/Slicer"
export SUBJECT_ROOT="/path/to/sub-01"
"$SLICER_LAUNCHER" --launch PythonSlicer run_subject_pipeline.py \
  --subject-root "$SUBJECT_ROOT" --subject-id sub-01 --no-user-config \
  --targets microstructure --microstructure-stages dti --doctor

Repeat with --plan to inspect the processing plan, then --execute to run it. Keep the same method options for all three commands.

For example, --microstructure-stages dti,noddi selects two models; --tractography-backend csd_act,ukf selects two tracking variants; and --bundle-backend wmql,wma selects two bundle methods. Their input and dependency checks still apply.

For independent subjects, use scripts/run_batch_pipeline.py --batch-root /path/to/study --jobs 2 with your chosen analysis options. The GUI processes the current subject; the batch CLI manages separate outputs and logs.

Run times

Recorded run times, per module.

One row per algorithm, with CPU circles and open CUDA diamonds on a shared log-time axis. Aligned CPU and CUDA columns give both recorded times; the title names the repeat hardware.
Scoped stage times on a shared Linux host. Each algorithm occupies one row, with aligned CPU/CUDA time columns; seven routes have both device observations. A dash means no measurement for that device. Thread budgets differ by method and the devices are shared, so these are not controlled device speed ratios. Rows are not summed. SAF re-filters 100,000 existing tracks; TractCloud uses 50,000 tracks.

Performance

Runtime optimizations.

Measured comparisons for each operation, with its scope and implementation details.

Catalogue updated 30 October 2026

Download measurement data (JSON)
Different models and scopes are not ranked against each other. Ratios are reference time divided by optimized time.
Computation / scopeType of changeReferenceOptimizedMeasured ratio
Full brain / record 2026-10-29Same-method implementation15.64 min11.89 min1.32x23.99% less time
Complete module / record 2026-10-20Same-method implementation102.10 min74.22 min1.38x27.31% less time
Full brain / record 2026-10-20Native threads29.15 min5.19 min5.61x82.19% less time
64-voxel numeric chunk / record 2026-10-22Python-port computation1.73 s1.09 s1.58x36.70% less time
64-voxel numeric chunk / incremental QR change / record 2026-10-29Python-port computation1.19 s1.06 s1.13x11.26% less time
Native 24-cubed ROI / record 2026-10-22Existing upstream capability37.11 s11.47 s3.24x69.09% less time
Native 24-cubed ROI / record 2026-10-20Workflow scheduling43.95 s24.63 s1.78x43.96% less time
Single substage / record 2026-10-20Same-method implementation134.29 s2.48 s54.06x98.15% less time
1728-voxel ROI / record 2026-10-21Same-method implementation12.47 s5.17 s2.41x58.50% less time
1000 fibers x 15 points / record 2026-10-21Same-method implementation24.6 ms0.322 ms76.31x98.69% less time
20000 fibers x 15 points / record 2026-10-21Same-method implementation0.59 s12.8 ms45.84x97.82% less time
Three preparation calls / record 2026-10-20Same-method implementation8.90 min3.01 min2.96x66.17% less time
Four left-hemisphere overlays / record 2026-10-20Inherited upstream optimization13.38 s3.52 s3.80x73.70% less time
Three slabs / record 2026-10-20Compressed data I/O37.25 s17.08 s2.18x54.15% less time

Read the complete optimization report

Methods & resources

What is integrated

Choose one or several methods beside each product. The workflow checks acquisition suitability, resolves dependencies and reuses shared preparation.

Methods, implementation and resources for the selected analysis routes.
StageMethodHow it is integratedRuntime / accessPapers
InputDICOM / NIfTI / NRRDConversion, gradient validation and spatial checks.dcm2niix or Slicer DWIConvert; supplied masks accepted[36] [27] [28]
Brain maskPNL CNN (default)Author diffusion-CNN brain masking and registration.Managed PNL runtime, weights and ANTs[37] [38]
Brain maskSynthStripBrain extraction with the author model.Isolated runtime and weights[32]
Brain maskMRtrix3 dwi2maskNative diffusion-volume masking.MRtrix3[29]
PreprocessingMP-PCARandom-matrix denoising and noise estimation.DIPY or MRtrix3 dwidenoise[39] [52] [53] [29] [30]
PreprocessingLocal PCAOvercomplete local-PCA denoising.DIPY; optional denoising choice[40] [30]
PreprocessingPatch2SelfSelf-supervised diffusion-volume denoising.DIPY; optional denoising choice[41] [30]
PreprocessingGibbs removalLocal subvoxel-shift ringing correction.DIPY or MRtrix3 mrdegibbs[42] [29] [30]
PreprocessingVolume registrationBetween-volume motion correction and gradient rotation.DIPY; does not perform FSL eddy correction[30]
PreprocessingFSL eddyEddy-current and motion correction.MRtrix3 dwifslpreproc; FSL[43] [29]
PreprocessingFSL topupSusceptibility-distortion estimation and correction.FSL; reverse-phase data and acquisition metadata[44] [29]
MicrostructureDTI (default)LS/WLS tensor fitting; FA, MD, AD, RD, eigenvalues and trace.SlicerDMRI[45] [27] [28]
MicrostructureFree waterFree-water fraction and tissue-corrected FA/MD; WLS or NLS fitting.DIPY; suitable multi-shell sampling[4] [5] [6] [30]
MicrostructureNODDI / AMICONDI, ODI, IsoVF and fit residuals.AMICO; suitable multi-shell sampling[7] [31]
MicrostructureDKIWLS/OLS fitting; MK, AK, RK, KFA, MKT, RTK and validity masks.DIPY; shell, direction and design-rank checks[8] [30]
MicrostructureMK-CurveCorrection curves, corrected kurtosis maps and metric-specific validity.Bundled Python backend; DKI eligibility checks[9]
Anatomical priorDDSegTissue labels and probabilities from converted PyTorch models.PyTorch; DDSeg weights[2]
Anatomical priorDDParcelAnatomical region inference with author-derived models.PyTorch; weights and registration template[3]
Anatomical priorDDSurferNative white and pial mesh reconstruction.PyTorch; DDSurfer weights[1]
Anatomical priorBRAINSFit registrationTemplate registration for eligible anatomical routes.Slicer BRAINSFit / BRAINSResample[51] [27]
Anatomical priorSurface post-processingThickness, curvature, spherical registration and DK/Destrieux atlas mapping.Licensed native component runtime; full suite optional[33] [47] [48] [49]
TractographyResponse estimationDhollander three-tissue response estimation.MRtrix3[12] [13] [29]
TractographyCSD / MSMT-CSDSingle- or multi-tissue fibre-orientation distributions.MRtrix3; selected acquisition route[11] [46] [10] [29]
TractographyMulti-tissue normalizationLog-domain intensity and inhomogeneity normalization.MRtrix3 mtnormalise[17] [18] [29]
TractographyiFOD2 / ACT (default)Probabilistic tracking with DDSeg-derived tissue constraints.MRtrix3; reviewed anatomical priors[14] [15] [29]
TractographyDTI deterministicTensor-based direction tracking with stopping criteria.SlicerDMRI; DIPY[45] [28] [30]
TractographyUKF two-tensorAutomatic invocation of the official tracking CLI.UKFTractography extension; SlicerDMRI[19] [28]
TractographySAFSurface-constrained short-association tracking and geometric filtering.MRtrix3; post-processed native surfaces[20]
Fiber bundlesWMQL (default)Official bundle queries; optional subsets and regional cerebellar selections.Author tract_querier; DDParcel labels[21]
Fiber bundlesWMAORG, East-West or NABA atlas registration and clustering; automatic UKF handoff.WMA; selected atlas; UKF reference route[22] [23] [24] [26] [54] [55]
Fiber bundlesTractCloudAuthor learned tract parcellation and bundle export.PyTorch backend; model and centroids[25] [22]
ConnectomeStreamline countEndpoint assignment to DDParcel nodes.Python or eligible MRtrix3 backend[50] [29]
ConnectomeSIFT2-weighted countFOD-informed weighting and matrix construction with matched tracks.MRtrix3; corresponding tractogram and weights[16] [29] [50]
ConnectomeScalar / length summariesMean FA, MD, ODI or another scalar; mean and total streamline length.Python API; matched maps, nodes and tracks[50] [29] [30]
Regional analysisSelected-region analysisReuse maps for ROI statistics, filter tracks and extract node submatrices.Advanced settings; workflow utility using completed outputs[3] [30] [50]

Defaults: DTI, CSD/ACT and WMQL. Detailed parameters are in Advanced settings; selected dependencies are prepared separately under Environment and installation. External tools and model assets are not installed silently.

Implementation provenance and validation records document the backend versions and individual test scopes.