resample_segmentation ======================================================= .. py:function:: petpal.preproc.segmentation_tools.resample_segmentation(input_image_path: str, segmentation_image_path: str, out_seg_path: str, verbose: bool) Resamples a segmentation image to the resolution of a 4D PET series image. Takes the affine information stored in the PET image, and the shape of the image frame data, as well as the segmentation image, and applies NiBabel's ``resample_from_to`` to resample the segmentation to the resolution of the PET image. This is used for extracting TACs from PET imaging where the PET and ROI data are registered to the same space, but have different resolutions. :param input_image_path: Path to a .nii or .nii.gz file containing a 4D PET image, registered to anatomical space, to which the segmentation file is resampled. :type input_image_path: str :param segmentation_image_path: Path to a .nii or .nii.gz file containing a 3D segmentation image, where integer indices label specific regions. :type segmentation_image_path: str :param out_seg_path: Path to a .nii or .nii.gz file to which the resampled segmentation image is written. :type out_seg_path: str :param verbose: Set to ``True`` to output processing information. :type verbose: bool