cortex.align.automatic¶
-
cortex.align.
automatic
(subject, xfmname, reference, noclean=False, bbrtype='signed', pre_flirt_args='', use_fs_bbr=False, epi_mask=False)[source]¶ Create an automatic alignment using the FLIRT boundary-based alignment (BBR) from FSL.
If noclean, intermediate files will not be removed from /tmp. The reference image and resulting transform called xfmname will be automatically stored in the database.
It’s good practice to open up this transform afterward in the manual aligner and check how it worked. Do that using the following (with the same subject and xfmname used here, no need for reference): > align.manual(subject, xfmname)
If automatic alignment gives you a very bad answer, you can try giving the pre-BBR FLIRT some hints by passing ‘-usesqform’ in as pre_flirt_args.
- Parameters
- subjectstr
Subject identifier.
- xfmnamestr
String identifying the transform to be created.
- referencestr
Path to a nibabel-readable image that will be used as the reference for this transform. Usually, this is a single (3D) functional data volume.
- nocleanbool, optional
If True intermediate files will not be removed from /tmp (this is useful for debugging things), and the returned value will be the name of the temp directory. Default False.
- bbrtypestr, optional
The ‘bbrtype’ argument that is passed to FLIRT.
- pre_flirt_argsstr, optional
Additional arguments that are passed to the FLIRT pre-alignment step (not BBR).
- use_fs_bbrbool, optional
If True will use freesurfer bbregister instead of FSL BBR.
- epi_maskbool, optional
If True, and use_fs_bbr is True, then the flag –epi-mask is passed to bbregister to mask out areas with spatial distortions. This setting is to be used whenever the reference was not distortion corrected.
- Returns
- Nothing unless noclean is True.