weighted_sum_computation_over_index_window#

petpal.utils.math_lib.weighted_sum_computation_over_index_window(pet_series: ants.core.ANTsImage | numpy.ndarray, window_start_id: int, window_end_id: int, half_life: float, frame_durations: numpy.ndarray, frame_starts: numpy.ndarray, decay_factors: numpy.ndarray)#

Computes a weighted sum over a specified index window for a 4D PET image series. See weighted_sum_computation() for the computation.

Parameters:
  • pet_series (ants.core.ANTsImage | np.ndarray) – PET image series as an ANTs image or a NumPy array.

  • window_start_id (int) – Start index of the window.

  • window_end_id (int) – End index of the window.

  • half_life (float) – Radioactive tracer’s half-life in seconds.

  • frame_durations (np.ndarray) – Frame durations in seconds corresponding to the PET image series.

  • frame_starts (np.ndarray) – Frame start times in seconds corresponding to the PET image series.

  • decay_factors (np.ndarray) – Decay correction factors for the PET image series.

Returns:

np.ndarray – Weighted sum for the image series over the specified window.