generate_coordinate_mapping¶
-
nighres.registration.
generate_coordinate_mapping
(reference_image, source_image=None, transform_matrix=None, invert_matrix=False, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]¶ Generate coordiante mapping
Generate a coordinate mapping for the image(s) and linear transformation as used in CBSTools registration and transformation routines.
Parameters: - reference_image (niimg) – Image to generate a coordinate mapping from, listing its X,Y,Z coordinates
- source_image (niimg, optional) – In case the mapping is from a source and target in different coordinate spaces, this image represents the source space
- transform_matrix (niimg, optional) – Whether to use a MIPAV formatted transformation matrix to define the mapping
- invert_matrix (bool) – Whether or not to invert the transformation, if given
- 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): Coordinate mapping of the reference image (_coord-map)
Return type: Notes
Port of the CBSTools Java module by Pierre-Louis Bazin. Currently the transformation amtrix follows the MIPAV conventions.