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.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.6.0
File Size Uploaded Provenance
asl_mri_utils-0.6.0.tar.gz 155.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 192.5 kB

Release files / asl_mri_utils-0.6.0.tar.gz

Download URL asl_mri_utils-0.6.0.tar.gz
Size 155.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bcc58323225a2c3e09b524e5e43f8fa7c44766b2b6801a3799d63c587af64de7
BLAKE2b-256 checksum
How to use checksums
1f849dc5ead82b80b8928aee4ba77a4f3b92f4074f631dc32f61febe69542efc
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.0-py3-none-any.whl

Download URL asl_mri_utils-0.6.0-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56b7cf8f34b8b7f91c0e9625d8ac6cc7b75461c236c1a905486b50be43324041
BLAKE2b-256 checksum
How to use checksums
18d84483a67deb58e9fe8c8d90594fa63762b5cae776b7323a3258d018644109
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.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.6.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