navis.transforms.cmtk.CMTKtransform¶
- class navis.transforms.cmtk.CMTKtransform(regs, directions='forward', threads=None)[source]¶
CMTK transforms of 3D spatial data.
Requires CMTK to be installed.
- Parameters:
regs (str | list of str) – Path(s) to CMTK transformations(s).
directions ("forward" | "inverse" | list thereof) – Direction of transformation. Must provide one direction per
reg
.threads (int, optional) – Number of threads to use.
Examples
>>> from navis import transforms >>> tr = transforms.cmtk.CMTKtransform('/path/to/CMTK_directory.list') >>> tr.xform(points)
Methods
__init__
(regs[, directions, threads])append
(transform[, direction])Add another transform.
check_if_possible
([on_error])Check if this transform is possible.
copy
()Return copy.
from_file
(filepath, **kwargs)Generate CMTKtransform from file.
make_args
([affine_only])Generate arguments passed to subprocess.
parse_cmtk_output
(output[, fail_value])Parse CMTK output.
xform
(points[, affine_only, affine_fallback])Xform data.
xform_image
(im, target[, out, ...])Transform an image using CMTK's reformatx.
Attributes
regargs
Generate regargs.