plotFrame: Plot a frame of the video.

Description Usage Arguments Value See Also Examples

Description

We plot a specified frame of the raw video that we began with in Step 0 of SCALPEL, or the processed video that results from Step 0 of SCALPEL.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotFrame(
  scalpelOutput,
  frame,
  videoType = "processed",
  shrinkLargest = FALSE,
  shrinkCutoff = NULL,
  title = NULL,
  col = grDevices::grey(seq(0, 1, length = 256)),
  addToPlot = FALSE,
  Y = NULL
)

Arguments

scalpelOutput

An object returned by one of the SCALPEL functions: scalpel, scalpelStep0, scalpelStep1, scalpelStep2, or scalpelStep3.

frame

The frame to plot.

videoType

Specify whether to plot the processed data from Step 0 (default; videoType="processed") or raw data (videoType="raw"). This is ignored if Y is provided.

shrinkLargest

Logical value indicating whether the values above shrinkCutoff should be shrunk when plotting. Shrinking these values allows us to better visualize the areas with the largest fluorescence.

shrinkCutoff

The value above which pixel values will be shrunk. By default, this will be chosen as scalpelOutput$lowThreshold if class(scalpelOutput)=="scalpelStep0" or min(scalpelOutput$thresholdVec) otherwise.

title

Label for the title. By default, it is the frame number.

col

Vector of colors to use, which by default is grayscale.

addToPlot

Logical value indicating whether to add to the current plot.

Y

An object of class scalpelY, which results from running the getY function. When not specified, Y is automatically read in, but specifying Y is recommended when the user would like to call this function many times, as this avoids reading the video into memory repeatedly.

Value

None

See Also

scalpelStep0, scalpel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
### many of the functions in this package are interconnected so the
### easiest way to learn to use the package is by working through the vignette,
### which is available at ajpete.com/software

#assumes you have run the example for the "scalpel" function

#simplest example with default parameters:
plotFrame(scalpelOutput = scalpelOutput, frame = 100)

#example with optional parameters:
#plot raw data instead of processed
plotFrame(scalpelOutput = scalpelOutput, frame = 100, videoType = "raw")

#same plot but if you have video data read in already
#using 'getY' function, you can provide it
rawY = getY(scalpelOutput = scalpelOutput, videoType = "raw")
plotFrame(scalpelOutput = scalpelOutput, frame = 100, Y = rawY)

## End(Not run)

scalpel documentation built on Feb. 3, 2021, 9:05 a.m.