afids_utils.transforms#
Methods for transforming between different coordinate systems
- afids_utils.transforms.afid_world2voxel(afid_world, nii_affine)#
Transform fiducials from world coordinates to voxel coordinates
- Parameters:
afid_world (numpy.ndarray[shape=(3,), dtype=numpy.float_]) – NumPy array containing floating-point spatial coordinates (x, y, z) to transform
nii_affine (numpy.ndarray[shape=(4, 4), dtype=numpy.float_]) – NumPy array containing affine transformation associated with NifTI image
- Returns:
NumPy array containing indices corresponding to voxel location along spatial dimensions
- Return type:
numpy.ndarray[shape=(3,), dtype=numpy.float_]