Skip to contents

Creates time-resolved images series of tracking data with modifiable parameter mapping. visustat_all is a wrapper function for visustat_frame and visustat_summary. User parameters for both functions can be passed via the lists visustat_frame.list and visustat_summary.list.

Usage

visustat_all(
  df,
  images,
  stack = FALSE,
  frame_range = NULL,
  display_frame = TRUE,
  display_summary = FALSE,
  visustat_frame.list = NULL,
  visustat_summary.list = NULL,
  save = TRUE,
  file_name = NULL,
  width = 2000,
  height = 1200,
  rel_width = 0.66,
  browse = FALSE,
  return = FALSE
)

Arguments

df

dataframe of the form: df(track, time, X, Y, mapping_parameters, ...)

images

vector: filenames of images ordered by frames/time

frame_range

integer: frames to be mapped; default=NULL maps full time/frame range found in df

display_frame

logical: display output from visustat_frame

display_summary

logical: display output from visustat_summary

visustat_frame.list

list: parameters passed to visustat_frame

visustat_summary.list

list: parameters passed to visustat_summary

save

logical: saves tiff-stack or image to ./output/visustatr-date.tiff

width

numeric: width of output tiff in pixels

height

numeric: height of output tiff in pixels

rel_width

numeric: if(display_frame & display_summary), rel_width defines the relative width of the summary plot to the mapped frame

browse

logical: browse output with default system application for tiffs, e.g. imageJ

return

logical: return images-series as magick image-stack

Examples

# import tracking data
data(hiv_motility)
# get image files
images <- hiv_motility_images()
# run visustatR with default settings
visustat_all(hiv_motility, images, save=FALSE)
#> Started VisuStatR: 2022-04-19 09:15:06
#> frame_range not specified, defaulting to maximal frame range found in dataset
#> Running visustat_frame()...
#> Finished analysis: 2022-04-19 09:16:44
#> Creating image stacks...
#> Done.
#> Deleted temp_files.
# run visustatR with visustat_frame and visustat_summary
tracks <- c(34, 125, 199, 205)
summary_pars <- list(par.map='angle', time.unit='min', tracks=tracks)
frame_pars <- list(par.map='angle', par.shape='type', tracks=tracks)
visustat_all(hiv_motility,
 images,
 frame_range = c(1,10),
 display_summary = 1,
 visustat_frame.list = frame_pars,
 visustat_summary.list = summary_pars,
 file_name = 'hiv_tracking_angle',
 save=FALSE
 )
#> Started VisuStatR: 2022-04-19 09:16:45
#> Running visustat_summary()...
#> Running visustat_frame()...
#> Finished analysis: 2022-04-19 09:17:26
#> Creating image stacks...
#> Done.
#> Deleted temp_files.