parametric_refregion_analysis#

petpal.kinetic_modeling.parametric_images.parametric_refregion_analysis(pTAC_times: numpy.ndarray, pTAC_vals: numpy.ndarray, tTAC_img: numpy.ndarray, t_thresh_in_mins: float, k2_prime: float, analysis_func: collections.abc.Callable) Tuple[numpy.ndarray, numpy.ndarray]#

Generates parametric images for 4D-PET data using the provided analysis method. This function is intended only for use with reference region linear methods, such as Logan w/o arterial input.

This function iterates over each voxel in the given tTAC_img and applies the provided analysis_func to compute analysis values. The analysis_func should be a numba.njit function for optimization and should be following a signature compatible with either of the following: patlak_analysis, logan_analysis, or alt_logan_analysis.

Parameters:
  • pTAC_times (np.ndarray) – A 1D array representing the input TAC times in minutes.

  • pTAC_vals (np.ndarray) – A 1D array representing the input TAC values. This array should be of the same length as pTAC_times.

  • tTAC_img (np.ndarray) – A 4D array representing the 3D PET image over time. The shape of this array should be (x, y, z, time).

  • t_thresh_in_mins (float) – A float representing the threshold time in minutes. It is applied when calling the analysis_func.

  • k2_prime (float) – The population averaged reference region k2 value, passed to analysis_func.

  • analysis_func (Callable) –

    A numba.njit function to apply to each voxel for given PET data. It should take the following arguments:

    • input_tac_values: 1D numpy array for input TAC values

    • region_tac_values: 1D numpy array for regional TAC values

    • tac_times_in_minutes: 1D numpy array for TAC times in minutes

    • t_thresh_in_minutes: a float for threshold time in minutes

    • k2_prime: the population averaged reference region k2 value

Returns:

Tuple[np.ndarray, np.ndarray]

A tuple of two 3D numpy arrays representing the calculated

slope image and the intercept image, each of the same spatial dimensions as tTAC_img.