brain_mask_pet#
- petpal.preproc.brain_mask_pet.brain_mask_pet(input_image_path: str, out_image_path: str | None, atlas_image_path: str, atlas_mask_path: str, motion_target_option='weighted_series_sum') ants.ANTsImage#
Apply brain mask to dynamic PET image.
Create target PET image, which is then warped to a provided anatomical atlas. The transformation to atlas space is then applied to transform a provided mask in atlas space into PET space. Mask is applied to input dynamic PET, optionally saved to out_image_path, and returned.
- Parameters:
input_image_path (str) – Path to input 4D PET image.
out_image_path (str) – Path to which brain mask in PET space is written.
atlas_image_path (str) – Path to anatomical atlas image.
atlas_mask_path (str) – Path to brain mask in atlas space.
motion_target_option – Used to determine 3D target in PET space. Default ‘weighted_series_sum’.
- Returns:
pet_masked_image (ants.ANTsImage) – Dynamic PET image masked to brain only.
Note
Requires access to an anatomical atlas or scan with a corresponding brain mask on said anatomical data. FSL users can use the MNI152 atlas and mask available at $FSLDIR/data/standard/.