write_tacs ================================================= .. py:function:: 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. :param input_image_path: Path to the 4D PET image from which regional TACs will be extracted. :type input_image_path: str :param label_map_path: Path to the dseg file linking regions to their mappings in the segmentation image. :type label_map_path: str :param segmentation_image_path: Path to the segmentation image containing ROIs. Must be in the same space as input_image. :type segmentation_image_path: str :param out_tac_dir: Path to the directory where regional TACs will be written to. :type out_tac_dir: str :param out_tac_prefix: Prefix for output TAC files. Typically the participant ID. :type out_tac_prefix: str :param verbose: Set to True to print processing info. Default False. :type verbose: bool