plot_inptac_fit: Plot the Timings of the TAC and Arterial Input Function from...

View source: R/kinfitr_bloodfuncs.R

plot_inptac_fitR Documentation

Plot the Timings of the TAC and Arterial Input Function from a Fit Object

Description

Function to compare the timings of the the TAC and the Arterial Input Function (AIF) to see whether they are aligned from a kinetic fit object. The fit needs to be a model utilising AIF (i.e. cannot be a reference region)

Usage

plot_inptac_fit(fitout, roiname = NULL, zoomTime = 5)

Arguments

fitout

The output object of a fitting procedure which utilises arterial input function, e.g. twotcm.

roiname

Optional. The name of the Target Region to see it on the plot.

zoomTime

Optional. The number of minutes to show for the match between the TAC and AIF. Default is 5.

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
weights <- pbr28$tacs[[2]]$Weights

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
)

twotcmout <- twotcm(t_tac, tac, input, weights, frameStartEnd = c(1, 25))

plot_inptac_fit(twotcmout)

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