cmind_baselineCBF_preprocess(output_dir, CBF_nii) BaselineCBF preprocessing (motion correction, intensity normalization &
cmind.pipeline.cmind_baselineCBF_preprocess.cmind_baselineCBF_preprocess(output_dir, CBF_nii, max_percent_diff=3.0, ANTS_bias_cmd=None, UCLA_flag=False, fsl_motion_outliers_cmd=None, discard_outliers=True, generate_figures=True, ForceUpdate=False, verbose=False, logger=None)[source]

BaselineCBF preprocessing (motion correction, intensity normalization & outlier rejection)


output_dir : str

directory in which to store the output

CBF_nii : str

nifti image containing the 4D ASL timeseries

max_percent_diff : float, optional

any control-tag frames greater than this percentage will be automatically considered outliers. Used to intially remove high motion frames. Note: For background-suppressed ASL data, this should be set to None or 100.0. Will not be used if `discard_outliers`=False

ANTS_bias_cmd : str, optional

path to the bias field correction command to use. if None, assumes /usr/lib/ants/N4BiasFieldCorrection

UCLA_flag : bool, optional

if True, assumes order is “tag”,”control”,”tag”,... if False, assumes order is “control”, “tag”, “control”... if true, generate summary images

fsl_motion_outliers_cmd : str, optional

path to the fsl_motion_outliers_cmd_v2 shell script. If not specified will try to guess it relative to the python script location.

discard_outliers : bool, optional

unless False, will detect and discard outliers

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)


BaselineCBF_mcf_percent_change : str

filename of the average control-tag percent change image

BaselineCBF_mcf_control_mean_N4 : str

filename of the average N4 bias-corrected control image

BaselineCBF_Meansub : str

filename of the average N4 bias-corrected control-tag image

BaselineCBF_timepoints_kept : str

textfile listing the control-tag timepoints that were kept

BaselineCBF_mcf_masked : str

filename of the ASL subtracted timeseries

BaselineCBF_N4Bias : str

filename of the N4 bias field computed from the mean control image

BaselineCBF_relmot : str

filename of the relative motion parameters during coregistration (motion-correction)



Mean (tag-control) image after bias correction and outlier rejection