plot_srtm_vfit: Plot: Simplified Reference Tissue Model with Blood Volumes

View source: R/kinfitr_srtm_v.R

plot_srtm_vfitR Documentation

Plot: Simplified Reference Tissue Model with Blood Volumes

Description

Function to visualise the fit of the SRTM_V model to data.

Usage

plot_srtm_vfit(srtmvout, roiname = NULL, refname = NULL)

Arguments

srtmvout

The output object of the SRTM fitting procedure.

roiname

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

refname

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

Value

A ggplot2 object of the plot.

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples

# Note: Reference region models, and irreversible binding models, should not
# be used for PBR28 - this is just to demonstrate function

data(pbr28)

t_tac <- pbr28$tacs[[2]]$Times / 60
reftac <- pbr28$tacs[[2]]$CBL
roitac <- pbr28$tacs[[2]]$STR
weights <- pbr28$tacs[[2]]$Weights

input <- pbr28$input[[2]]

newvals <- shift_timings(
  t_tac,
  roitac,
  input,
  inpshift = 0
)

bloodtac <- pracma::interp1(newvals$input$Time, newvals$input$Blood, t_tac)

fit <- srtm_v(t_tac, reftac, roitac, bloodtac, weights)

plot_srtm_vfit(fit)

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