Skip to main content

asl-mri-utils

A repository of utilities for ASL data post-processing.

Utilities for Siemens arterial spin labeling (ASL) DICOM processing:

  • Volume-order analysis (asl-mri-utils order): recovers the true LABEL/CONTROL/M0/TI acquisition order of a multi-TI, single- or multi-echo Siemens enhanced-DICOM ASL series directly from per-frame DICOM tags (ASL Context, Siemens private ordering tag), independent of filenames or protocol names.
  • DICOM-to-NIfTI conversion (asl-mri-utils convert): wraps a locally installed dcm2niix/dcm2niix_afni binary to convert a Siemens ASL series directory to NIfTI, then merges the per-echo output into a single, oxasl-ready *_asl.nii.gz (label/control volumes, chronologically ordered) and *_mzero.nii.gz (M0 volumes), with a matching *_aslcontext.tsv and an *_oxasl_params.json recording the (iaf, order, tis, tes, rpts) shape for oxasl/oxasl_multite. Volume counts are checked against the DICOM-derived order at every step.
  • Perfusion subtraction (asl-mri-utils subtract): computes CONTROL-LABEL difference images per TI using standard pairwise, surround, or sinc subtraction (Liu & Wong 2005, NeuroImage 24:207-215). --recommend block|event_related picks a single method per the paper's design-dependent guidance instead of listing --methods by hand. --sinc-interp swaps the sinc method's estimator for an alternative bidirectional interpolator (windowed-sinc, FFT, Gaussian process regression, or a Kalman filter/RTS smoother; see docs/interpolate.md).
  • Series discovery (asl-mri-utils discover): finds candidate DICOM series directories under a root.

Siemens-only by design: this package relies on the standard ASL DICOM tags plus a Siemens private tag for TI ordering, and fails loudly (specific exceptions) rather than guessing when expected tags are absent.

Contents

Requirements

A local dcm2niix or dcm2niix_afni installation is required for asl-mri-utils convert (not bundled). Locate it via --dcm2niix-path, the ASL_MRI_UTILS_DCM2NIIX environment variable, or PATH.

Install

pip install asl-mri-utils

For local development, from a clone of this repository:

pip install -e .

Usage

asl-mri-utils order <dicom_series_dir> [<dicom_series_dir> ...] [--outdir DIR]
asl-mri-utils order --all [ROOT] [--outdir DIR]
asl-mri-utils convert <dicom_series_dir> --outdir DIR [--dcm2niix-path PATH] [--overwrite]
asl-mri-utils subtract <nii> <order_tsv> [--ti N ...] [--methods standard surround sinc] [--recommend block|event_related] [--sinc-interp truncated|windowed_sinc|fft|gp|kalman] [--outdir DIR]
asl-mri-utils discover [ROOT]

Metadata

Release files for asl-mri-utils 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asl-mri-utils 0.5.0
File Size Uploaded Provenance
asl_mri_utils-0.5.0.tar.gz 153.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asl-mri-utils 0.5.0
File Interpreter ABI Platform
asl_mri_utils-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 188.8 kB

Release files / asl_mri_utils-0.5.0.tar.gz

Download URL asl_mri_utils-0.5.0.tar.gz
Size 153.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b039f12c2866534b452eecfe0a78214fdd2eb608e13cbcec724c591881521d17
BLAKE2b-256 checksum
How to use checksums
e1473c29c8666ccc9e098c294cae6fc923ff7992ff8889873776d465be1130ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / asl_mri_utils-0.5.0-py3-none-any.whl

Download URL asl_mri_utils-0.5.0-py3-none-any.whl
Size 35.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
242acf1845fd58cd7242d9850aaf72f39455a04aa8c2b07476c74764d58744b0
BLAKE2b-256 checksum
How to use checksums
c9fde8f2f98722c16532a9cf8d56d45ae54be5f364e28bcf109c4e34c02f012d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Security for asl-mri-utils 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asl_mri_utils-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page