decay_correct#

petpal.preproc.decay_correction.decay_correct(input_image_path: str, output_image_path: str) ants.ANTsImage#

Recalculate decay_correction for nifti image based on frame reference times.

This function will compute frame reference times based on frame time starts and frame durations (both of which are required by BIDS. These reference times are used in the following equation to determine the decay factor for each frame. For more information, refer to Turku Pet Centre’s materials at https://www.turkupetcentre.net/petanalysis/decay.html

\[decay\_factor = \exp(\lambda*t)\]

where \(\lambda=\log(2)/T_{1/2}\) is the decay constant of the radio isotope and depends on its half-life and t is the frame’s reference time with respect to TimeZero (ideally, injection time).

Note: BIDS ‘DecayCorrectionTime’ is set to 0 (seconds w.r.t. TimeZero) for the image. If this assumption doesn’t

hold, be wary of downstream effects.

Parameters:
  • input_image_path (str) – Path to input (.nii.gz or .nii) image. A .json sidecar file should exist in the same directory as the input image.

  • output_image_path (str) – Path to output (.nii.gz or .nii) output image.

Returns:

ants.ANTsImage – Decay-Corrected Image