detection
detection
¶
Automatic arterial input function detection.
This module implements automatic AIF detection from DCE-MRI data using signal characteristics to identify vascular voxels.
GPU/CPU agnostic using the xp array module pattern. NO scipy dependency - uses custom implementations for filtering and labeling.
References
Mouridsen K et al. (2006). Automatic selection of arterial input function using cluster analysis. Magn Reson Med 55(3):524-531.
Peruzzo D et al. (2011). Automatic selection of arterial input function on dynamic contrast-enhanced MR images. Comput Methods Programs Biomed 104(3):e148-e157.
AIFDetectionParams
dataclass
¶
AIFDetectionParams(
min_peak_enhancement=3.0,
max_fwhm=15.0,
early_arrival_percentile=10.0,
n_candidates=100,
cluster_size=3,
use_mask=True,
smoothing_sigma=0.5,
)
Parameters for automatic AIF detection.
| ATTRIBUTE | DESCRIPTION |
|---|---|
min_peak_enhancement |
Minimum peak enhancement ratio relative to baseline.
TYPE:
|
max_fwhm |
Maximum full-width at half-maximum (seconds).
TYPE:
|
early_arrival_percentile |
Percentile for early arrival time selection.
TYPE:
|
n_candidates |
Number of candidate voxels to consider.
TYPE:
|
cluster_size |
Minimum cluster size for valid AIF region.
TYPE:
|
AIFDetectionResult
dataclass
¶
AIFDetectionResult(
aif,
voxel_mask,
voxel_indices=list(),
quality_score=0.0,
detection_params=AIFDetectionParams(),
)
Result of automatic AIF detection.
| ATTRIBUTE | DESCRIPTION |
|---|---|
aif |
Detected arterial input function.
TYPE:
|
voxel_mask |
Binary mask of voxels used for AIF.
TYPE:
|
voxel_indices |
List of (x, y, z) indices of selected voxels.
TYPE:
|
quality_score |
Quality metric for the detected AIF (0-1).
TYPE:
|
detection_params |
Parameters used for detection.
TYPE:
|
MultiCriteriaAIFDetector
¶
Bases: BaseAIFDetector
Multi-criteria AIF detection algorithm.
detect
¶
Detect AIF using multi-criteria approach.
| PARAMETER | DESCRIPTION |
|---|---|
dataset
|
Input dataset.
TYPE:
|
params
|
Detection parameters.
TYPE:
|
roi_mask
|
ROI mask to restrict search.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AIFDetectionResult
|
Detection result. |
detect_aif
¶
Automatically detect AIF from DCE-MRI data.
Uses a multi-criteria approach: 1. High peak enhancement 2. Early arrival time 3. Narrow peak width (short FWHM) 4. Spatial clustering
| PARAMETER | DESCRIPTION |
|---|---|
dataset
|
DCE-MRI dataset with shape (x, y, z, t) or (x, y, t).
TYPE:
|
params
|
Detection parameters.
TYPE:
|
roi_mask
|
Region of interest mask to restrict search.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AIFDetectionResult
|
Detection result with AIF and quality metrics. |
| RAISES | DESCRIPTION |
|---|---|
AIFError
|
If AIF detection fails. |