get_half_life_from_meta#

petpal.utils.image_io.get_half_life_from_meta(meta_data_file_path: str)#

Extracts the radionuclide half-life (usually in seconds) from a nifti metadata file.

Parameters:

meta_data_file_path (str) – Path to the nifti metadata file.

Returns:

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

Raises:
  • FileNotFoundError – If the metadata file does not exist at the provided path.

  • KeyError – If the ‘RadionuclideHalfLife’ key is not found in the metadata file.