This model is used to estimate cbf, att, abat, and abv for multi-PLD PCASL
data.
Parameters:
cbf (float) – Cerebral blood flow.
Used for deltam_tiss calculation.
Estimated by the model.
att (float) – Arterial transit time.
Used for deltam_tiss calculation.
Estimated by the model.
abat (float) – The arterial bolus arrival time, describing the first arrival of the labeled blood
water in the voxel within the arterial vessel. Used for deltam_art calculation.
Estimated by the model.
abv (float) – Arterial blood volume.
The fraction of the voxel occupied by the arterial vessel.
Used for deltam_art calculation.
Estimated by the model.
X (numpy.ndarray of shape (n_plds/tis, 6)) – Dependent variables: labeleff, t1blood, m0_a, m0_b, tis, ti1s.
Labeling efficiency.
In the case of background suppression, this combines alpha and alpha_bs,
so we don’t need a separate term for alpha_bs.
Used for both deltam_tiss and deltam_art calculation.
Equilibrium magnetization of tissue, calculated as M0a = SIpd / lambda,
where SIpd is a proton density weighted image and lambda is the tissue/blood partition
coefficient.
SIpd is also already scaled by any user-provided scaling factor.
Used for deltam_tiss calculation.
This model is used to estimate cbf, att, abat, and abv for multi-PLD PCASL
data.
Parameters:
cbf (float) – Cerebral blood flow.
Used for deltam_tiss calculation.
Estimated by the model.
att (float) – Arterial transit time.
Used for deltam_tiss calculation.
Estimated by the model.
abat (float) – The arterial bolus arrival time, describing the first arrival of the labeled blood
water in the voxel within the arterial vessel. Used for deltam_art calculation.
Estimated by the model.
abv (float) – Arterial blood volume.
The fraction of the voxel occupied by the arterial vessel.
Used for deltam_art calculation.
Estimated by the model.
X (numpy.ndarray of shape (n_plds, 6)) – Dependent variables: labeleff, t1blood, m0_a, m0_b, plds, taus.
Labeling efficiency.
If background suppression was performed, then this is already adjusted and combines
alpha_bs as well.
Used for both deltam_tiss and deltam_art calculation.
Equilibrium magnetization of tissue, calculated as M0a = SIpd / lambda,
where SIpd is a proton density weighted image and lambda is the tissue/blood partition
coefficient.
Used for deltam_tiss calculation.
Estimate arterial transit time using the weighted average method.
The weighted average method comes from Dai et al.[1].
Parameters:
deltam_arr (numpy.ndarray of shape (S, D)) – Delta-M array, averaged by PLD.
plds (numpy.ndarray of shape (S, D)) – Post-labeling delays. w in Dai 2012.
In case of a 2D acquisition, PLDs may vary by slice, and thus the plds array will vary
in the spatial dimension.
For 3D acquisitions, or 2D acquisitions without slice timing info, plds will only vary
along the second dimension.
lds (numpy.ndarray) – Labeling durations. tau in Dai 2012.
This function was originally written in MATLAB by Jianxun Qu and William Tackett.
It was translated to Python by Taylor Salo.
Taylor Salo modified the code to loop over voxels, in order to account for slice timing-shifted
post-labeling delays.
The code could probably be improved by operating on arrays, rather than looping over voxels.
It is also overkill for 3D acquisitions, where PLD doesn’t vary by voxel.
License
MIT License
Copyright (c) 2023 willtack
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
deltam_arr (numpy.ndarray of shape (S, P)) – Control-label values for each voxel and PLDs.
S = sample (i.e., voxel).
P = Post-labeling delay (i.e., volume).
scaled_m0data (numpy.ndarray of shape (S,)) – The M0 volume, after scaling based on the M0-scale value.
plds (numpy.ndarray of shape (S, P)) – Post-labeling delays. One value for each volume in deltam_arr.
tau (numpy.ndarray of shape (P,) or (0,)) – Label duration. May be a single value or may vary across volumes/PLDs.
t1blood (float) – The longitudinal relaxation time of blood in seconds.
t1tissue (float) – The longitudinal relaxation time of tissue in seconds.
unit_conversion (float) – The factor to convert CBF units from mL/g/s to mL/ (100 g)/min. 6000.
partition_coefficient (float) – The brain/blood partition coefficient in mL/g. Called lambda in the literature.
Returns:
att_arr (numpy.ndarray of shape (S,)) – Arterial transit time map.
cbf (numpy.ndarray of shape (S,)) – Estimated cerebrospinal fluid map, after estimating for each PLD and averaging across
PLDs.
Notes
Delta-M values are first averaged over time for each unique post-labeling delay value.
Arterial transit time is estimated on a voxel-wise basis according to
Dai et al.[1].
CBF is then calculated for each unique PLD value using the mean delta-M values and the
estimated ATT.
CBF is then averaged over PLDs according to Juttukonda et al.[2],
in which an unweighted average is calculated for each voxel across all PLDs in which
PLD + tau > ATT.
Estimate the relaxation rates of blood and gray matter based on magnetic field strength.
t1blood is set based on the scanner’s field strength,
according to Zhang et al.[3], Alsop et al.[4].
If recommended values from these publications cannot be used
(i.e., if the field strength isn’t 1.5T, 3T, 7T),
then the formula from Zhang et al.[3] will be applied.
t1tissue is set based on the scanner’s field strength as well,
according to Wright et al.[5].
At the moment, field strengths other than 1.5T, 3T, and 7T are not supported and will
raise an exception.
Parameters:
metadata (dict) – Dictionary of metadata from the ASL file.
Returns:
t1blood (float) – Estimated relaxation rate of blood based on magnetic field strength.
t1tissue (float) – Estimated relaxation rate of gray matter based on magnetic field strength.
scaled_m0data (numpy.ndarray of shape (n_voxels,)) – M0 data, after any scaling requested by the user.
plds (numpy.ndarray of shape (n_voxels, n_volumes)) – Post-labeling delay values. This uses the TI values for PASL data.
labeleff (float) – Labeling efficiency, also referred to as alpha.
In the case of background suppression, this combines alpha and alpha_bs,
so we don’t need a separate term for alpha_bs.
t1blood (float) – Longitudinal relaxation time of arterial blood in seconds.
Used for both deltam_tiss and deltam_art calculation.
partition_coefficient (float) – Brain partition coefficient (lambda in Alsop 2015). Generally 0.9.
tau (float or numpy.ndarray or None, optional) – Label duration. May be a single value or may vary across volumes/PLDs.
Only defined for (P)CASL data.
ti1 (float or None, optional) – TI1. Only defined for PASL data.
Returns:
cbf (numpy.ndarray of shape (n_voxels,)) – Cerebral blood flow.
att (numpy.ndarray of shape (n_voxels,)) – Arterial transit time.
abat (numpy.ndarray of shape (n_voxels,)) – Arterial bolus arrival time.
abv (numpy.ndarray of shape (n_voxels,)) – Arterial blood volume.
failures (numpy.ndarray of shape (n_voxels,)) – Boolean array indicating whether the model fit failed for each voxel.
False indicates success, True indicates failure.
Notes
This model does not include a separate term for T1,tissue, but we could expand it to do so
in the future.