cmind.pipeline.cmind_baselineCBF_quantitative

Functions

calcCBF_Wang2002(deltaM, maskim, cbf_lambda, ...)
Parameters:
calcflash(a, TR, T1[, err])
Parameters:
cmind_baselineCBF_quantify(output_dir, ...) Quantify CBF
cmind_baselineCBF_quantitative(output_dir, ...) Quantify CBF
cmind.pipeline.cmind_baselineCBF_quantitative.calcCBF_Wang2002(deltaM, maskim, cbf_lambda, R1a, R1app, delta, delta_art, w, t, TR, alpha, M0_blood)[source]
Parameters:

deltaM : ndarray

average (control-tag) ASL subtraction image

maskim : ndarray

boolean mask over which to perform the computation

cbf_lambda : float, optional

blood-brain partition coefficient

R1a : float

R1 relaxation rate of arterial blood (1/seconds)

R1app : float

apparent R1 relaxation rate (1/seconds)

delta : float

transit time (to capillary compartment) (seconds)

delta_art : float

arterial transit time (seconds)

w : float

post-labeling delay (seconds)

t : float

label duration (seconds)

TR : float

TR (seconds)

alpha : float

inversion efficiency

M0_blood : float

M0 of blood (usually estimated from WM or CSF)

Notes

Quantify CBF using the model of Wang et. al.

cmind.pipeline.cmind_baselineCBF_quantitative.calcflash(a, TR, T1, err=0.01)[source]
Parameters:

a : float

flip angle

TR : float

TR (ms)

T1 : float

T1 (ms) (should be in same time units as TR)

err : float

will calculate number of pulses needed to get within this amount of the steady state

Examples

(Source code, png, hires.png, pdf)

../_images/cmind-pipeline-cmind_baselineCBF_quantitative-1.png
cmind.pipeline.cmind_baselineCBF_quantitative.cmind_baselineCBF_quantify(output_dir, BaselineCBF_mcf_masked, N4BiasCBF, BaselineCBF_timepoints_kept, alpha_file, WMpve, T1_map_reg2CBF, alpha_const=0.75, HRtoLR_affine=None, HRtoLR_warp=None, relmot=None, relmot_thresh=1.5, cbf_lambda=0.9, R1a=0.625, delta=1.5, delta_art=1.3, w=1.4, tau=2.0, TR=4.0, T2star_wm=45.0, T2star_arterial_blood=53.0, TE=11.5, generate_figures=True, ForceUpdate=False, verbose=False, logger=None)

Quantify CBF

Parameters:

output_dir : str

directory in which to store the output

BaselineCBF_mcf_masked : str

masked, motion-corrected BaselineCBF volume

N4BiasCBF : str

BaselineCBF N4Bias field

BaselineCBF_timepoints_kept : str

Timepoints kept during BaselineCBF preprocessing

alpha_file : float or str

inversion efficiency or a text file containing the inversion efficiency

WMpve : str

white matter partial volume estimate

T1_map_reg2CBF : str or float, optional

T1map that has been registered to BaselineCBF_mcf_masked

alpha_const : float, optional

if alpha_file was specified, also repeat the CBF mapping using this value of alpha instead

HRtoLR_affine : str or None, optional

affine from highres (structural) to lowres space

HRtoLR_warp : str or None, optional

warp from highres (structural) to lowres space

relmot : str, optional

relative motion .rms file from mcflirt

relmot_thresh : float, optional

relative motion threshold (mm) for discarding timepoints

cbf_lambda : float, optional

blood-brain partition coefficient

R1a : float, optional

R1 relaxation rate of arterial blood (1/seconds)

delta : float, optional

transit time (to capillary compartment) (seconds)

delta_art : float, optional

arterial transit time (seconds)

w : float, optional

post-labeling delay (seconds)

tau : float, optional

label duration (seconds)

TR : float, optional

TR (seconds)

T2star_wm : float, optional

transverse relaxation rate of white matter

T2star_arterial_blood : float, optional

transverse relaxation rate of arterial blood

TE : float, optional

echo time of the ASL acquisition

generate_figures : bool, optional

if true, generate additional summary images

ForceUpdate : bool,optional

if True, rerun and overwrite any previously existing results

verbose : bool, optional

print additional output (to terminal and log)

logger : logging.Logger or str, optional

logging.Logger object (or string of a filename to log to)

Returns:

CBF_Wang_file : str

filename of the quantitative CBF image using alpha from alpha_file

CBF_Wang_alphaconst_file : str

filename of the quantitative CBF image using alpha = alpha_const

Notes

../_images/IRC04H_06M008_P_1_CBF_Wang2002.png

Quantitative CBF volume

cmind.pipeline.cmind_baselineCBF_quantitative.cmind_baselineCBF_quantitative(output_dir, BaselineCBF_mcf_masked, N4BiasCBF, BaselineCBF_timepoints_kept, alpha_file, WMpve, T1_map_reg2CBF, alpha_const=0.75, HRtoLR_affine=None, HRtoLR_warp=None, relmot=None, relmot_thresh=1.5, cbf_lambda=0.9, R1a=0.625, delta=1.5, delta_art=1.3, w=1.4, tau=2.0, TR=4.0, T2star_wm=45.0, T2star_arterial_blood=53.0, TE=11.5, generate_figures=True, ForceUpdate=False, verbose=False, logger=None)[source]

Quantify CBF

Parameters:

output_dir : str

directory in which to store the output

BaselineCBF_mcf_masked : str

masked, motion-corrected BaselineCBF volume

N4BiasCBF : str

BaselineCBF N4Bias field

BaselineCBF_timepoints_kept : str

Timepoints kept during BaselineCBF preprocessing

alpha_file : float or str

inversion efficiency or a text file containing the inversion efficiency

WMpve : str

white matter partial volume estimate

T1_map_reg2CBF : str or float, optional

T1map that has been registered to BaselineCBF_mcf_masked

alpha_const : float, optional

if alpha_file was specified, also repeat the CBF mapping using this value of alpha instead

HRtoLR_affine : str or None, optional

affine from highres (structural) to lowres space

HRtoLR_warp : str or None, optional

warp from highres (structural) to lowres space

relmot : str, optional

relative motion .rms file from mcflirt

relmot_thresh : float, optional

relative motion threshold (mm) for discarding timepoints

cbf_lambda : float, optional

blood-brain partition coefficient

R1a : float, optional

R1 relaxation rate of arterial blood (1/seconds)

delta : float, optional

transit time (to capillary compartment) (seconds)

delta_art : float, optional

arterial transit time (seconds)

w : float, optional

post-labeling delay (seconds)

tau : float, optional

label duration (seconds)

TR : float, optional

TR (seconds)

T2star_wm : float, optional

transverse relaxation rate of white matter

T2star_arterial_blood : float, optional

transverse relaxation rate of arterial blood

TE : float, optional

echo time of the ASL acquisition

generate_figures : bool, optional

if true, generate additional summary images

ForceUpdate : bool,optional

if True, rerun and overwrite any previously existing results

verbose : bool, optional

print additional output (to terminal and log)

logger : logging.Logger or str, optional

logging.Logger object (or string of a filename to log to)

Returns:

CBF_Wang_file : str

filename of the quantitative CBF image using alpha from alpha_file

CBF_Wang_alphaconst_file : str

filename of the quantitative CBF image using alpha = alpha_const

Notes

../_images/IRC04H_06M008_P_1_CBF_Wang2002.png

Quantitative CBF volume