write_tacs#
- petpal.preproc.regional_tac_extraction.write_tacs(input_image_path: str, label_map_path: str, segmentation_image_path: str, out_tac_dir: str, out_tac_prefix: str = '', verbose: bool = False)#
Function to write Tissue Activity Curves for each region, given a segmentation, 4D PET image, and label map. Computes the average of the PET image within each region. Writes a JSON for each region with region name, frame start time, and mean value within region.
- Parameters:
input_image_path (str) – Path to the 4D PET image from which regional TACs will be extracted.
label_map_path (str) – Path to the dseg file linking regions to their mappings in the segmentation image.
segmentation_image_path (str) – Path to the segmentation image containing ROIs. Must be in the same space as input_image.
out_tac_dir (str) – Path to the directory where regional TACs will be written to.
out_tac_prefix (str) – Prefix for output TAC files. Typically the participant ID.
verbose (bool) – Set to True to print processing info. Default False.