navis.transforms.ElastixTransform¶
- class navis.transforms.ElastixTransform(file, copy_files=[])[source]¶
Elastix transforms of 3D spatial data.
Requires Elastix. Based on code by Jasper Phelps (https://github.com/jasper-tms/pytransformix).
Note that elastix transforms can not be inverted!
- Parameters:
file (str) – Filepath to elastix transformation file.
copy_files (filepath | list, optional) – Any files that need to be copied into the temporary directory where we perform the transform. These are typically files supplemental to the main transform file (e.g. defining an additional affine transform).
Examples
>>> from navis import transforms >>> tr = transforms.ElastixTransform('/path/to/transform/transform') >>> tr.xform(points)
Methods
__init__
(file[, copy_files])append
(other)Append another transform to this one.
check_if_possible
([on_error])Check if this transform is possible.
copy
()Return copy.
read_output_file
(filepath)Load output file.
write_input_file
(points, filepath)Write a numpy array in format required by transformix.
xform
(points[, return_logs])Xform data.