seg_crop_to_pet_fov#

petpal.preproc.segmentation_tools.seg_crop_to_pet_fov(pet_img: ants.ANTsImage, segmentation_img: ants.ANTsImage, pet_thresh_value: float = np.finfo(float).eps) ants.ANTsImage#

Zero out segmentation values that lie outside of the PET FOV.

Especially applicable to scanners with limited FOV (field of view). PET voxels with values less than 1e-36 are considered outside of the FOV.

Parameters:
  • pet_img (ants.ANTsImage) – PET image in anatomical space used to crop segmentation

  • segmentation_img (ants.ANTsImage) – Segmentation image in anatomical space such as FreeSurfer to which FOV cropping is applied.

  • pet_thresh_value (float) – Lower threshold for the PET image by which the segmentation image is masked. Should be <<1. Default machine epsilon for float.

Returns:

segmentation_masked_img (ants.ANTsImage) – Segmentation image masked to PET FOV.