visumot_frame: visumot_frame

Description Usage Arguments Details Value Examples

View source: R/visumot_frame.R

Description

With visumot_frame, continous and discrete parameters can be mapped individually on color, shape and size for one timepoint.

Usage

1

Arguments

df

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

image

character: filename of image

stack

logical: default: FALSE, single image file provided if time-resolved imagestack is used, set: TRUE

image.depth

numeric: set image bit-depth; just important if Z-projections are calculated

image.normalize

logical: normalize image

frame

integer: frame to be mapped

tracks

vector: defining tracks to be displayed

par.map

character: specifying parameter in df to be visualized by color

par.shape

character: specifying parameter in df to be mapped on shape

par.display

display option for mapping; default: TRUE, mapping is disable with: FALSE

par.max

numeric: defining upper range of color mapping

par.min

numeric: defining lower range of color mapping

par.unit

character: unit of the numeric mapped parameter

crop

logical: option for cropping images; default: FALSE

sub.img

logical: option for creating sub-images from specified tracks or pre-filtered df; default: FALSE

sub.window

numeric: size of the sub-images in pixels

sub.col

numeric: number of columns in which sub-images are arranged

tracks.size

numeric: size of tracks

tracks.alpha

numeric: transparency of tracks

tracks.length

numeric: length of tracks (in frames)

tracks.label

logical: when sub.img is used, display or hide track label

tracks.label.x

numeric: when sub.img is used, set x-position of label

tracks.label.y

numeric: when sub.img is used, set y-position of label

points.size

numeric: size of points

points.alpha

numeric: transparency of points

points.stat

character: display statistic; default: 'echo', for blurring; without blurring 'identity'

points.shape

numeric: set shape from ggplot2 shape palette

axis.tick

numeric: axis ticks in px

axis.display

logical: display axis

axis.labs

logical: display labs

unit

character: setting name of unit; default: 'px'

scaling

numeric: scaling factor for unit; default: 1

dimensions

numeric: specify whether the images are 2D or 3D. If 3D is selected the data is assumed to be in the form: df(track, time, X, Y, Z, mapping paramters, ...)

manual.z

numerice: specify Z-plane to be visualized if no projection or sub windows are used

scale.bar

logical: show scalebar; default: FALSE

scale.width

numeric: width of scalebar; default: 40

scale.height

numeric: height of scalebar; default: 10

scale.x

numeric: distance from left border of the image towards scalebar

scale.y

numeric: distance from bottom border of the image towards scalebar

scale.color

character: specify color from R-color palette or hexcode

interactive

logical: return the plot as an interactive plotly object. Not supported when using sub.img or crop modes.

Details

To be written...

Value

returns a ggplot2 plot-object which can be further modified

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# import tracking data
df <- read.csv('hiv_tracking.csv')
# get image files
images <- list.files(pattern='.tif')
# run visumot_frame with default settings
visumot_frame(df, image=images[1], frame=1) 
# run visumot_frame with specified settings
visumot_frame(df,
 image= images[1],
 frame = 1,
 tracks = c(34, 125, 199, 205),
 scale.bar = TRUE, 
 scale.bar.color = 'red',
 par.map='speed',
 par.shape='contact'
 )

grrchrr/VisumotR documentation built on March 3, 2021, 11:15 a.m.