cmind.pipeline.cmind_DTI_HARDI_QA

Functions

cmind_DTI_HARDI_QA(DTI_input_source, ...[, ...]) Utility to run DTIPrep for quality control of DTI/HARDI image series
cmind_plot_DTI_coverage(bvecs_orig, ...[, ...]) Generate summary image of the DTI directions before and after quality
cmind.pipeline.cmind_DTI_HARDI_QA.cmind_DTI_HARDI_QA(DTI_input_source, gradient_table_file, gradient_bval_file, output_dir, case_to_run, DTIPrep_command, DTIPrep_xmlProtocol, DWIConvert_command=None, Flip_ap=False, isSiemens=False, isOblique=False, Slicer_path=None, Slicer_denoise_module=None, ForceUpdate=False, denoise_case='jointLMMSE', generate_figures=True, verbose=False, logger=None, env_dict={})[source]

Utility to run DTIPrep for quality control of DTI/HARDI image series

Parameters:

DTI_input_source : str

raw, 4D DTI nifti-1 volumes (can be gzipped) Alternatively, this can point to a DICOM directory

gradient_table_file : str

three column text file containing the pre-QC diffusion direction vectors

gradient_bval_file : str

text file containing the pre-QC b values

output_dir : str

directory in which to store the output

case_to_run : {‘DTI_QA_DN_process’,’HARDI_QA_DN_process’,’DTI_QA_process’,’HARDI_QA_process’}

choose which processing case to run. “DN” in names means use 3D slicer to denoise

DTIPrep_command : str

path to DTIPrep

DTIPrep_xmlProtocol : str or None

path to the xml protocol to be used by DTIPrep

DWIConvert_command : str or None, optional

path to DWIConvert (used for NIFTI<->NRRD conversions)

isSiemens : bool, optional

currently must be False

isOblique : bool, optional

currently must be False

Slicer_path : str or None, optional

path to 3D Slicer, must be specified if case_to_run contains ‘DN’

Slicer_denoise_module : str or None, optional

path to the 3D Slicer denoising module to use, must be specified if case_to_run contains ‘DN’

denoise_case : {‘LMMSE’,’jointLMMSE’,’UnbiasedNLMeans’}, optional

the denoising case corresponding to Slicer_denoise_module

generate_figures : bool, optional

if True, generate 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)

env_dict : dict, optional

dictionary of environment variables to add to os.environ when calling shell commands via log_cmd(). e.g. could use to add appropriate LD_LIBRARY_PATH, etc for Slicer

Returns:

QCd_nii_file : file

filename of Quality Controled DTI/HARDI 4D volume

QCd_bval_file : file

filename of b-values corresponding to the data in QCd_nii_file

QCd_bvec_file : file

filename of b-vectors corresponding to the data in QCd_nii_file

cmind.pipeline.cmind_DTI_HARDI_QA.cmind_plot_DTI_coverage(bvecs_orig, bvecs_QC, output_img, isSiemens=False, silent_flag=False)[source]

Generate summary image of the DTI directions before and after quality control (QC)

Parameters:

bvecs_orig : file

three column text file containing the pre-QC b vectors

bvecs_QC : file

three column text file containing the post-QC b vectors

output_img : file

filename of the output image

isSiemens : bool, optional

if True, negates the values in bvecs_orig and bvecs_QC before plotting

silent_flag : bool, optional

if True, silently generate the figures without display