cmind.utils.fsl_mcflirt_opt¶
mcflirt motion correction utility
Functions
fsl_mcflirt_opt (input_name[, cost_type, ...]) |
Utility that tries to improve the robustness of mcflirt by running in 3 stages: |
-
cmind.utils.fsl_mcflirt_opt.
fsl_mcflirt_opt
(input_name, cost_type='normcorr', out_name='', output_dir=None, verbose=False, logger=None)[source]¶ Utility that tries to improve the robustness of mcflirt by running in 3 stages:
Parameters: input_name : str
4D NIFTI or NIFTI-GZ volume to motion correct
cost_type : {‘normcorr’,’mutualinfo’,’woods’,’corratio’,’normmi’,’leastsquares’}, optional
cost function used by mcflirt (default = ‘normcorr’)
out_name : str, optional
output filename to be used for the motion-corrected timeseries
output_dir : str, optional
if None, output will be stored in current working directory via os.getcwd()
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: out_name : str
output filename of the motion-corrected timeseries
Notes
The mcflirt stages run are: 1.) Fast initial registration to an initial frame without sinc interpolation to find the frame closest to the mean position 2.) Rerun mcflirt using this “optimal” reference frame and with sinc interpolation to reduce blurring 3.) Take a timeseries average of registered frames from stage two and run mcflirt a 3rd time using this high SNR timeseries average as the reference mcflirt will duplicate the top and bottom slice during the calculations to allow some corrections to be made to the edge slices
cost_type options are: normcorr (default), mutualinfo, woods, corratio, normmi, leastsquares