mean_value_in_region#
- petpal.utils.stats.mean_value_in_region(input_img: ants.ANTsImage, seg_img: ants.ANTsImage, mappings: int | list[int]) float#
Calculate the mean value in a 3D PET image over a region based on one or more integer mappings corresponding to regions in a segmentation image.
- Parameters:
input_img (ants.ANTsImage) – 3D PET image over which to calculate the mean.
seg_img (ants.ANTsImage) – Segmentation image in same space as input_img.
mappings (int | list[int]) – One or more mappings to mask input_image over.
- Returns:
region_mean (float) –
- Mean PET value over voxels in the regions corresponding to
mappings.