afids_utils.transforms#
Methods for transforming between different coordinate systems
- afids_utils.transforms.world_to_voxel(afid_world, nii_affine)#
Transform fiducials from world coordinates to voxel coordinates
- Parameters:
afid_world (AfidPosition) – AfidPosition containing floating-point spatial coordinates (x, y, z) to transform
nii_affine (ndarray[Any, dtype[float64]]) – NumPy array containing affine transformation associated with NifTI image
- Returns:
Object containing transformed integer voxel coordinates (i, j, k)
- Return type:
- afids_utils.transforms.voxel_to_world(afid_voxel, nii_affine)#
Transform fiducials from world coordinates to voxel coordinates
- Parameters:
- Returns:
Object containing approximate floating-point spatial coordinates (x, y, z)
- Return type:
- afids_utils.transforms.xfm_coord_system(afid_set, new_coord_system='LPS')#
Convert AFID set between RAS and LPS coordinates
- Parameters:
- Returns:
Object containing AFIDs stored in defined coordinate system
- Return type:
- Raises:
ValueError – If invalid coordinate system