locatorStack: Select Frames from a Plotted Image Stack

View source: R/locatorStack.R

locatorStackR Documentation

Select Frames from a Plotted Image Stack

Description

Identify and select frames in a plotted image stack.

Usage

locatorStack(
  x,
  labels,
  nx,
  col = "red",
  asImage = FALSE,
  offset = c(0.05, 0.05),
  adj = c(0, 1),
  combine = TRUE,
  ...
)

Arguments

x

An Image object or array of such objects

labels

Optional labels to be added to each selected frame. If missing, the number of each frame will serve as the label otherwise the argument will be adjusted with as.graphicsAnnot

nx

The number of frames in the x-direction of the image stack. If missing, a square tile of images will be assumed

col

Color of the label to be added

asImage

logical value (default of FALSE) indicating whether the function returns the selection as Image(s) or as a numeric vector of found frames (see Details)

offset

A numeric vector of length 2 specifying the relative position of the label in each frame

adj

One or two values in [0, 1] which specify the x (and optionally y) adjustment of the labels. See the function text for further details

combine

logical value (default of TRUE) to return the selected frames combined as a single image rather than a list

...

Additional values passed to text for labeling

Details

The locator function will be called to interactively to identify frames in the plotted image stack. Selected frames will be labeled on the image and a count of the unique selected frames will be reported in a running tally on the console. Selection is stopped by pressing any mouse button other than the primary button or by pressing the ESC key. The selected frames, in the order that they were selected, will be returned as a vector of integers if asImage = FALSE. If asImage = TRUE, the selected images will be returned as a list of separate frames if combine = FALSE or as a single image if combine = TRUE.

Value

A numeric vector of the selected frames if asImage = FALSE or either a list of selected Images frames or combined Image frames in the order that they were selected.

See Also

plotStack, which allows for automatically labeling the plotted image and labelStack, that places custom labels on each frame of the image stack.


ornelles/EBImageExtra documentation built on Aug. 10, 2022, 11:44 p.m.