parametric_refregion_analysis ======================================================================= .. py:function:: 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. :param pTAC_times: A 1D array representing the input TAC times in minutes. :type pTAC_times: np.ndarray :param pTAC_vals: A 1D array representing the input TAC values. This array should be of the same length as `pTAC_times`. :type pTAC_vals: np.ndarray :param tTAC_img: A 4D array representing the 3D PET image over time. The shape of this array should be (x, y, z, time). :type tTAC_img: np.ndarray :param t_thresh_in_mins: A float representing the threshold time in minutes. It is applied when calling the `analysis_func`. :type t_thresh_in_mins: float :param k2_prime: The population averaged reference region k2 value, passed to `analysis_func`. :type k2_prime: float :param analysis_func: 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 :type analysis_func: Callable :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`.