get_half_life_from_nifti#

petpal.utils.image_io.get_half_life_from_nifti(image_path: str)#

Retrieves the radionuclide half-life from a nifti image file.

This function first checks if the provided nifti image file exists. It then derives the corresponding metadata file path using _gen_meta_data_filepath_for_nifti() and finally retrieves the half-life from the metadata using get_half_life_from_meta().

Parameters:

image_path (str) – Path to the nifti image file.

Returns:

float – The radionuclide half-life extracted from the metadata file.

Raises:

FileNotFoundError – If the nifti image file does not exist at the provided path.