plot_inptac_timings: Plot the Timings of the TAC and Arterial Input Function

View source: R/kinfitr_bloodfuncs.R

plot_inptac_timingsR Documentation

Plot the Timings of the TAC and Arterial Input Function

Description

Function to compare the timings of the the TAC and the Arterial Input Function (AIF) to see whether they are aligned. Can be used for assessing the fit of the delay (inpshift).

Usage

plot_inptac_timings(t_tac, tac, input, inpshift, zoomTime = 5)

Arguments

t_tac

Numeric vector of times for each frame in minutes. We use the time halfway through the frame as well as a zero. If a time zero frame is not included, it will be added.

tac

Numeric vector of radioactivity concentrations in the target tissue for each frame. We include zero at time zero: if not included, it is added.

input

Data frame containing the blood, plasma, and parent fraction concentrations over time. This can be generated using the blood_interp function.

inpshift

The number of minutes by which the times of the input data frame should be adjusted.

zoomTime

The number of minutes to show for the close-up of the match between the TAC and AIF.

Value

A ggplot2 object of the plot.

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples

data(pbr28)

t_tac <- pbr28$tacs[[2]]$Times / 60
tac <- pbr28$tacs[[2]]$FC

input <- blood_interp(
  pbr28$procblood[[2]]$Time / 60, pbr28$procblood[[2]]$Cbl_dispcorr,
  pbr28$procblood[[2]]$Time / 60, pbr28$procblood[[2]]$Cpl_metabcorr,
  t_parentfrac = 1, parentfrac = 1
)

plot_inptac_timings(t_tac, tac, input, inpshift = 0.12, zoomTime = 5)

mathesong/kinfitr documentation built on Jan. 15, 2024, 11:07 p.m.