DecayCorrect ============================================ .. py:class:: petpal.preproc.decay_correction.DecayCorrect(image_loader: Optional[petpal.io.image.ImageLoader] = None) Decay correct or uncorrect each frame in a dynamic PET scan. :ivar image_loader: The image loader to use. :ivar modified_pet_img: The corrected PET image. .. py:method:: apply_factor(input_image_path: str, correction_factor: numpy.ndarray[float]) Apply fix factor to image and write output. :param input_image_path: Path to dynamic PET image. :type input_image_path: str :param correction_factor_path: Path to file with correction factors, one per frame. File must have exactly one column, with a header followed by one scalar per line. :type correction_factor_path: str .. py:method:: save_modified_pet(input_image_path: str, output_image_path: str) Save the modified PET image :param input_image_path: Path to dynamic PET image. :type input_image_path: str :param output_image_path: Path to where corrected image is saved. :type output_image_path: str .. py:method:: decay_correct_factor_from_file(input_image_path: str, output_image_path: str, correction_factor_path: str) Apply a set of correction factors to each frame in a PET image. Provide path to dynamic PET image, path to where corrected image is saved, and path to a file containing factors for each frame. File containing correction factors must have exactly one column, with a header followed by one scalar per line to apply to the corresponding frame in the PET. Reads image and correction factors, applies them, and saves result. :param input_image_path: Path to dynamic PET image. :type input_image_path: str :param output_image_path: Path to where corrected image is saved. :type output_image_path: str :param correction_factor_path: Path to file with correction factors, one per frame. File must have exactly one column, with a header followed by one scalar per line. :type correction_factor_path: str