svd
svd
¶
SVD-based deconvolution for DSC-MRI.
This module implements Singular Value Decomposition (SVD) based deconvolution methods for estimating the residue function, cerebral blood flow (CBF, OSIPI: Q.PH1.003), mean transit time (MTT, OSIPI: Q.PH1.006), and arterial delay (Ta, OSIPI: Q.PH1.007) from DSC-MRI concentration data.
GPU/CPU Agnostic: Uses xp.linalg.svd where xp is numpy or cupy depending on input. When input arrays are CuPy arrays, all computations including SVD run on GPU. Results are returned on the same device as input.
NO scipy dependency - uses xp.linalg for SVD (numpy.linalg or cupy.linalg).
For general-purpose deconvolution operations, see also:
- osipy.common.convolution.deconv: Matrix-based deconvolution with TSVD/Tikhonov
- osipy.common.convolution.convmat: Convolution matrix construction
- osipy.common.convolution.invconvmat: Regularized matrix inversion
References
.. [1] OSIPI CAPLEX, https://osipi.github.io/OSIPI_CAPLEX/ .. [2] Ostergaard L et al. (1996). High resolution measurement of cerebral blood flow using intravascular tracer bolus passages. Part I: Mathematical approach and statistical analysis. Magn Reson Med 36(5):715-725. .. [3] Wu O et al. (2003). Tracer arrival timing-insensitive technique for estimating flow in MR perfusion-weighted imaging using singular value decomposition with a block-circulant deconvolution matrix. Magn Reson Med 50(1):164-174. .. [4] Dickie BR et al. MRM 2024. doi:10.1002/mrm.30101
SVDDeconvolutionParams
dataclass
¶
SVDDeconvolutionParams(
method="oSVD",
threshold=0.2,
oscillation_index=0.035,
block_circulant=True,
regularization="truncation",
)
Parameters for SVD deconvolution.
| ATTRIBUTE | DESCRIPTION |
|---|---|
method |
Deconvolution method: 'sSVD', 'cSVD', or 'oSVD'.
TYPE:
|
threshold |
SVD truncation threshold (fraction of max singular value). Default 0.2 for standard SVD.
TYPE:
|
oscillation_index |
Target oscillation index for oSVD. Default 0.035.
TYPE:
|
block_circulant |
Use block-circulant matrix (for cSVD/oSVD). Default True for cSVD/oSVD methods.
TYPE:
|
regularization |
Regularization method: 'truncation' or 'tikhonov'.
TYPE:
|
DeconvolutionResult
dataclass
¶
Result of deconvolution.
| ATTRIBUTE | DESCRIPTION |
|---|---|
residue_function |
Estimated residue function R(t), shape (..., n_timepoints).
TYPE:
|
cbf |
Cerebral blood flow (OSIPI: Q.PH1.003), max of scaled R(t), shape (...). Units depend on input scaling.
TYPE:
|
mtt |
Mean transit time (OSIPI: Q.PH1.006), area/max of R(t), shape (...). Units are same as time input.
TYPE:
|
delay |
Arterial delay Ta (OSIPI: Q.PH1.007) relative to AIF, shape (...).
TYPE:
|
threshold_used |
Actual SVD threshold used.
TYPE:
|
StandardSVDDeconvolver
¶
Bases: BaseDeconvolver
Standard SVD (sSVD) deconvolution strategy.
Uses a lower-triangular Toeplitz matrix for causal convolution. Sensitive to bolus arrival time delays.
CircularSVDDeconvolver
¶
Bases: BaseDeconvolver
Circular SVD (cSVD) deconvolution strategy.
Uses a block-circulant matrix to make deconvolution insensitive to bolus arrival time delays (OSIPI: Q.PH1.007).
OscillationSVDDeconvolver
¶
Bases: BaseDeconvolver
Oscillation-index SVD (oSVD) deconvolution strategy.
Automatically selects the SVD truncation threshold to minimize oscillations in the residue function while preserving CBF (OSIPI: Q.PH1.003) estimates.
deconvolve_oSVD
¶
Oscillation-index SVD (oSVD) deconvolution.
The oSVD method automatically selects the SVD truncation threshold to minimize oscillations in the residue function while preserving the CBF estimate.
GPU/CPU agnostic - uses xp.linalg.svd where xp matches input arrays.
| PARAMETER | DESCRIPTION |
|---|---|
concentration
|
Tissue concentration curves.
TYPE:
|
aif
|
Arterial input function.
TYPE:
|
time
|
Time points in seconds.
TYPE:
|
mask
|
Brain mask.
TYPE:
|
params
|
Deconvolution parameters.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DeconvolutionResult
|
Deconvolution results. |
deconvolve_cSVD
¶
Circular SVD (cSVD) deconvolution.
Uses block-circulant matrix to make deconvolution insensitive to bolus arrival time delays.
GPU/CPU agnostic - uses xp.linalg.svd where xp matches input arrays.
| PARAMETER | DESCRIPTION |
|---|---|
concentration
|
Tissue concentration curves.
TYPE:
|
aif
|
Arterial input function.
TYPE:
|
time
|
Time points in seconds.
TYPE:
|
mask
|
Brain mask.
TYPE:
|
params
|
Deconvolution parameters.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DeconvolutionResult
|
Deconvolution results. |