asl_pipeline
asl_pipeline
¶
ASL analysis pipeline.
This module provides an end-to-end ASL analysis pipeline, integrating M0 calibration and CBF quantification following the OSIPI ASL Lexicon conventions.
References
.. [1] OSIPI ASL Lexicon, https://osipi.github.io/ASL-Lexicon/ .. [2] Suzuki Y et al. MRM 2024;91(4):1411-1421.
ASLPipelineConfig
dataclass
¶
ASLPipelineConfig(
labeling_scheme=PCASL,
pld=1800.0,
label_duration=1800.0,
t1_blood=1650.0,
labeling_efficiency=0.85,
m0_method="single",
output_dir=None,
)
Configuration for ASL pipeline.
| ATTRIBUTE | DESCRIPTION |
|---|---|
labeling_scheme |
ASL labeling scheme.
TYPE:
|
pld |
Post-labeling delay in milliseconds.
TYPE:
|
label_duration |
Labeling duration in milliseconds (for pCASL/CASL).
TYPE:
|
t1_blood |
Blood T1 in milliseconds.
TYPE:
|
labeling_efficiency |
Labeling efficiency.
TYPE:
|
m0_method |
M0 calibration method: 'single', 'voxelwise', or 'reference_region'.
TYPE:
|
output_dir |
Output directory for results.
TYPE:
|
ASLPipelineResult
dataclass
¶
Result of ASL pipeline.
| ATTRIBUTE | DESCRIPTION |
|---|---|
cbf_result |
CBF quantification results.
TYPE:
|
m0_map |
M0 values used.
TYPE:
|
config |
Pipeline configuration used.
TYPE:
|
ASLPipeline
¶
End-to-end ASL analysis pipeline.
This pipeline performs: 1. ASL difference computation (label - control) 2. M0 calibration 3. CBF quantification
Examples:
>>> from osipy.pipeline import ASLPipeline, ASLPipelineConfig
>>> from osipy.asl import LabelingScheme
>>> config = ASLPipelineConfig(
... labeling_scheme=LabelingScheme.PCASL,
... pld=1800.0,
... )
>>> pipeline = ASLPipeline(config)
>>> result = pipeline.run(label_images, control_images, m0_image)
Initialize ASL pipeline.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Pipeline configuration.
TYPE:
|
run
¶
Run ASL analysis pipeline.
| PARAMETER | DESCRIPTION |
|---|---|
label_data
|
Label images, shape (...) or (..., n_averages).
TYPE:
|
control_data
|
Control images, shape (...) or (..., n_averages).
TYPE:
|
m0_data
|
M0 calibration image or single value.
TYPE:
|
mask
|
Brain mask.
TYPE:
|
progress_callback
|
Callback for progress updates.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ASLPipelineResult
|
Pipeline results. |
run_from_alternating
¶
run_from_alternating(
asl_data,
m0_data,
label_control_order="label_first",
mask=None,
progress_callback=None,
)
Run ASL pipeline from interleaved label/control data.
| PARAMETER | DESCRIPTION |
|---|---|
asl_data
|
Interleaved ASL data, shape (..., n_pairs*2).
TYPE:
|
m0_data
|
M0 calibration data.
TYPE:
|
label_control_order
|
Order: 'label_first' or 'control_first'.
TYPE:
|
mask
|
Brain mask.
TYPE:
|
progress_callback
|
Progress callback.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ASLPipelineResult
|
Pipeline results. |