pytomography.io.PET.clinical#

Module Contents#

Functions#

get_detector_info(scanner_name)

Obtains the PET geometry information for a given scanner.

get_tof_meta(scanner_name)

Obtains the PET TOF metadata for a given scanner

modify_tof_events(TOF_ids, scanner_name)

Modifies TOF indices based on the scanner name

get_detector_ids_hdf5(listmode_file, scanner_name)

Returns the detector indices obtained from an HDF5 listmode file

get_weights_hdf5(correction_file)

Obtain the multiplicative weights from an HDF5 file that correct for attenuation and sensitivty effects for each of the detected listmode events.

get_additive_term_hdf5(correction_file)

Obtain the additive term from an HDF5 file that corrects for random and scatte effects for each of the detected listmode events.

get_sensitivity_ids_hdf5(corrections_file, scanner_name)

Obtain the detector indices corresponding to all valid detector pairs (nonTOF): this is used to obtain the sensitivity weights for all detector pairs when computing the normalization factor.

get_sensitivity_ids_and_weights_hdf5(corrections_file, ...)

Obtain the detector indices and corresponding detector weights for all valid detector pairs (nonTOF).

pytomography.io.PET.clinical.get_detector_info(scanner_name)[source]#

Obtains the PET geometry information for a given scanner.

Parameters:

scanner_name (str) – Name of the scanner

Returns:

PET geometry dictionary required for obtaining lookup table

Return type:

dict

pytomography.io.PET.clinical.get_tof_meta(scanner_name)[source]#

Obtains the PET TOF metadata for a given scanner

Parameters:

scanner_name (str) – Name of the scanner

Returns:

PET TOF metadata

Return type:

PETTOFMeta

pytomography.io.PET.clinical.modify_tof_events(TOF_ids, scanner_name)[source]#

Modifies TOF indices based on the scanner name

Parameters:
  • TOF_ids (torch.Tensor) – 1D tensor of TOF indices

  • scanner_name (str) – Name of scanner

Returns:

Modified TOF indices

Return type:

torch.Tensor

pytomography.io.PET.clinical.get_detector_ids_hdf5(listmode_file, scanner_name)[source]#

Returns the detector indices obtained from an HDF5 listmode file

Parameters:
  • listmode_file (str) – Path to the listmode file

  • scanner_name (str) – Name of the PET scanner

Returns:

Listmode form of the detector IDS for each event

Return type:

torch.Tensor

pytomography.io.PET.clinical.get_weights_hdf5(correction_file)[source]#

Obtain the multiplicative weights from an HDF5 file that correct for attenuation and sensitivty effects for each of the detected listmode events.

Parameters:

correction_file (str) – Path to the correction file

Returns:

1D tensor that contains the weights for each listmode event.

Return type:

torch.Tensor

pytomography.io.PET.clinical.get_additive_term_hdf5(correction_file)[source]#

Obtain the additive term from an HDF5 file that corrects for random and scatte effects for each of the detected listmode events.

Parameters:

correction_file (str) – Path to the correction file

Returns:

1D tensor that contains the additive term for each listmode event.

Return type:

torch.Tensor

pytomography.io.PET.clinical.get_sensitivity_ids_hdf5(corrections_file, scanner_name)[source]#

Obtain the detector indices corresponding to all valid detector pairs (nonTOF): this is used to obtain the sensitivity weights for all detector pairs when computing the normalization factor.

Parameters:
  • corrections_file (str) – Path to the correction file

  • scanner_name (str) – Name of the scanner

Returns:

Tensor yielding all valid detector pairs

Return type:

torch.Tensor[2,N_events]

pytomography.io.PET.clinical.get_sensitivity_ids_and_weights_hdf5(corrections_file, scanner_name)[source]#

Obtain the detector indices and corresponding detector weights for all valid detector pairs (nonTOF).

Parameters:
  • corrections_file (str) – Path to the correction file

  • scanner_name (str) – Name of the scanner

Returns:

Tensor yielding all valid detector pairs and tensor yielding corresponding weights.

Return type:

torch.Tensor[2,N_events], torch.Tensor[N_events]