cmind_normalize(output_dir, T1_volume_nii, ...) Normalize a structural image to MNI space
cmind.pipeline.cmind_normalize.cmind_normalize(output_dir, T1_volume_nii, reg_struct, direct_to_MNI=False, reg_flag='101', ANTS_path=None, MNI_path=None, ANTS_reg_case='SynAff', ANTS_precision='lenient', MNI_resolution='2mm', generate_figures=True, ForceUpdate=False, verbose=False, logger=None)[source]

Normalize a structural image to MNI space


output_dir : str

directory in which structural processing results are stored

T1_volume_nii : str

T1W image (after brain extraction). This is the image to register to standard space

reg_struct : str or dict

filename of the .csv file containing the registration dictionary

direct_to_MNI : bool, optional

if True, bypass study template and register directly to the MNI standard

reg_flag : str or int, optional

string of 3 characters controlling whether FLIRT, FNIRT and/or ANTS registrations of T1 to standard are to be run doFLIRT = 0 or 1 (1 = do the regisration using FLIRT) doFNIRT = 0 or 1 (1 = do the regisration using FNIRT) (NOT CURRENTLY IMPLEMENTED) doANTS = 0, 1 or 2 (0 = skip, 1 = do using Exp, 2 = do using SyN) default = ‘101’ does FLIRT and ANTs (Exp)

ANTS_path : str, optional

path to the ANTs binaries

MNI_path : str, optional

path containing the MNI standard brains

ANTS_reg_case : {‘Aff’,’SyN’,’AffSyn’,’SynAff’}, optional

Type of ANTS registration

ANTS_precision : {‘lenient’,’ants_defaults’,’strict’}, optional

choose from preset precision levels for the registrations (default = ‘lenient’)

MNI_resolution : {‘2mm’,‘1mm’}, optional

resolution of MNI standard space image to register

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)


reg_struct : dict

dictionary corresponding to the registration structure

reg_struct_file : file

filename of the registration structure

output_files : list

list of registered volumes

See also

ants_register, ants_applywarp


ANTS_reg_case values correspond to:
  • ‘Aff’, HR –Affine–> StudyTemplate –Affine(precalculated)–> MNI
  • ‘SyN’, HR –SyN–> StudyTemplate –SyN(precalcalculated)–> MNI
  • ‘AffSyN’, HR –Affine–> StudyTemplate –SyN(precalcalculated)–> MNI
  • ‘SyNAff’, HR –SyN–> StudyTemplate –Affine(precalculated)–> MNI

SyNAff is recommended to avoid overwarping the volumes. This will nonlinearly register each subject’s structural to the StudyTemplate. The StudyTemplate’s precomputed affine transform to MNI space is then applied.


example linear registration of T1 structural to MNI using FLIRT


example non-linear registration of T1 structural to MNI using ANTs SyN