cmind.pipeline.ants_register

utility for calling antsRegistration

Functions

ants_register(fixed, moving, output_dir, ...) utility to call antsRegistration
cmind.pipeline.ants_register.ants_register(fixed, moving, output_dir, output_root, ANTS_path=None, operation_type='both', initial_COM_alignment=True, use_Bspline_SyN=False, registration_mask_fixed=None, registration_mask_moving=None, affine_only=False, rigid_affine=False, concat_transforms=True, dim=3, interp_type='Linear', nopng=False, precision_case='lenient', initial_transform_list=None, verbose=False, logger=None)[source]

utility to call antsRegistration

Parameters:

fixed : str

image filename for the fixed image (registration target)

moving : str

image filename for the moving image

output_dir : str

path to store the output

output_root : str

filenames of the transforms will be ${output_dir}/${output_root}0GenericAffine.mat, etc

ANTS_path : str

path to the ants binaries

operation_type : {“compute”,”apply”,”both”}, optional

compute = compute registration only, apply = apply existing registration only, both = compute & apply registration

initial_COM_alignment : bool, optional

align center of mass of the volumes prior to other registration stages?

use_Bspline_SyN : bool, optional

use B-Spline variant of SyN instead

registration_mask_fixed : str, optional

filename of binary weight mask to be applied to fixed image during registration

registration_mask_moving : str, optional

filename of binary weight mask to be applied to moving image during registration

affine_only : bool, optional

If true, only do a linear, affine transformation

rigid_affine : bool, optional

If true, do only a rigid registration

concat_transforms : bool, optional

concatenate transforms

dim : {2, 3}, optional

number of image dimensions

interp_type : str, optional

interpolation type

nopng : bool, optional

if False, generate overlay images summarizing the registration

precision_case : {‘defacer’,’lenient’,’ants_default’,’strict’}, optional

choose from preset precision levels for the registrations

initial_transform_list : list of str, optional

initialize the registrtion using this list of transforms

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:

warp_file : str

file containing the calculated warp

aff_file : str

file containing the calculated affine transform

output_warped : str

file containing the warped image

Notes

Possible interp_type strings are:
  • HammingWindowedSinc
  • NearestNeighbor
  • BSpline[<order=3>]
  • MultiLabel[<sigma=imageSpacing>,<alpha=4.0>]
  • Gaussian[<sigma=imageSpacing>,<alpha=1.0>]
  • CosineWindowedSinc
  • WelchWindowedSinc
  • HammingWindowedSinc
  • LanczosWindowedSinc
  • “”