apply_coordinate_mappings

nighres.registration.apply_coordinate_mappings(image, mapping1, mapping2=None, mapping3=None, mapping4=None, interpolation='nearest', padding='closest', save_data=False, overwrite=False, output_dir=None, file_name=None)[source]
Apply a coordinate mapping (or a succession of coordinate mappings) to
a 3D or 4D image.
Parameters:
  • image (niimg) – Image to deform
  • mapping1 (niimg) – First coordinate mapping to apply
  • mapping2 (niimg, optional) – Second coordinate mapping to apply
  • mapping3 (niimg, optional) – Third coordinate mapping to apply
  • mapping4 (niimg, optional) – Fourth coordinate mapping to apply
  • interpolation ({'nearest', 'linear'}) – Interpolation method (default is ‘nearest’)
  • padding ({'closest', 'zero', 'max'}) – Image padding method (default is ‘closest’)
  • 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)

  • result (niimg): Result image (_def-img)

Return type:

dict

Notes

Original Java module by Pierre-Louis Bazin

Examples using nighres.registration.apply_coordinate_mappings