get_half_life_from_radionuclide#
- petpal.utils.image_io.get_half_life_from_radionuclide(meta_data_file_path: str) float#
Extracts the radionuclide half-life in seconds from a nifti metadata file. This function grabs the tracer radionuclide from the metadata and assumes a fixed half-life based on this. Code borrowed from: bilgelm/dynamicpet.
- Parameters:
meta_data_file_path (str) – Path to the nifti metadata file.
- Returns:
float – The radionuclide half-life extracted from the tracer radionuclide.
- Raises:
FileNotFoundError – If the metadata file does not exist at the provided path.
KeyError – If the ‘TracerRadionuclide’ key is not found in the metadata file.