embedded_antsreg_multi

nighres.registration.embedded_antsreg_multi(source_images, target_images, run_rigid=True, rigid_iterations=1000, run_affine=False, affine_iterations=1000, run_syn=True, coarse_iterations=40, medium_iterations=50, fine_iterations=40, cost_function='MutualInformation', interpolation='NearestNeighbor', regularization='High', convergence=1e-06, mask_zero=False, ignore_affine=False, ignore_header=False, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]

Embedded ANTS Registration Multi-contrasts

Runs the rigid and/or Symmetric Normalization (SyN) algorithm of ANTs and formats the output deformations into voxel coordinate mappings as used in CBSTools registration and transformation routines. Uses all input contrasts with equal weights.

Parameters:
  • source_images ([niimg]) – Image list to register
  • target_images ([niimg]) – Reference image list to match
  • run_rigid (bool) – Whether or not to run a rigid registration first (default is False)
  • rigid_iterations (float) – Number of iterations in the rigid step (default is 1000)
  • run_affine (bool) – Whether or not to run a affine registration first (default is False)
  • affine_iterations (float) – Number of iterations in the affine step (default is 1000)
  • run_syn (bool) – Whether or not to run a SyN registration (default is True)
  • coarse_iterations (float) – Number of iterations at the coarse level (default is 40)
  • medium_iterations (float) – Number of iterations at the medium level (default is 50)
  • fine_iterations (float) – Number of iterations at the fine level (default is 40)
  • cost_function ({'CrossCorrelation', 'MutualInformation'}) – Cost function for the registration (default is ‘MutualInformation’)
  • interpolation ({'NearestNeighbor', 'Linear'}) – Interpolation for the registration result (default is ‘NearestNeighbor’)
  • regularization ({'Low', 'Medium', 'High'}) – Regularization preset for the SyN deformation (default is ‘Medium’)
  • convergence (float) – Threshold for convergence, can make the algorithm very slow (default is convergence)
  • mask_zero (bool) – Mask regions with zero value (default is False)
  • ignore_affine (bool) – Ignore the affine matrix information extracted from the image header (default is False)
  • ignore_header (bool) – Ignore the orientation information and affine matrix information extracted from the image header (default is False)
  • save_data (bool) – Save output data to file (default is False)
  • overwrite (bool) – Overwrite existing results (default is False)
  • output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
  • file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)
Returns:

Dictionary collecting outputs under the following keys (suffix of output files in brackets)

  • transformed_source ([niimg]): Deformed source image list (_ants_def0,1,…)
  • mapping (niimg): Coordinate mapping from source to target (_ants_map)
  • inverse (niimg): Inverse coordinate mapping from target to source (_ants_invmap)

Return type:

dict

Notes

Port of the CBSTools Java module by Pierre-Louis Bazin. The main algorithm is part of the ANTs software by Brian Avants and colleagues [1]. Parameters have been set to values commonly found in neuroimaging scripts online, but not necessarily optimal.

References

[1]Avants et al (2008), Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain, Med Image Anal. 12(1):26-41

Examples using nighres.registration.embedded_antsreg_multi