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> [<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.6.1

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.6.1
File Size Uploaded Provenance
asl_mri_utils-0.6.1.tar.gz 157.0 kB With provenance Details

Built distribution (wheel)

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

Total release size: 194.6 kB

Release files / asl_mri_utils-0.6.1.tar.gz

Download URL asl_mri_utils-0.6.1.tar.gz
Size 157.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bb8ffb2a29c7257327aa5c22685920c2384e41a8d4526f7816de2742bc9e79fb
BLAKE2b-256 checksum
How to use checksums
7f04c53b1ecc56adc19a318d2dd1db2dc27b1c3ea862af57c846787f421f6cec
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.6.1-py3-none-any.whl

Download URL asl_mri_utils-0.6.1-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a860ee5b864cc841357c84b5c6cda8ccb5b2e0db0365946ba285eabab7ce7499
BLAKE2b-256 checksum
How to use checksums
a2c4227037ec305907d27638b9d5df63aac852ea84fc894713cebb541b80bd48
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.6.1

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.6.1.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