Skip to contents

Plot raw image annotation layer

Usage

plotImage.Region(
  region,
  markers,
  colors = NULL,
  background = "black",
  zoom.level = NULL,
  rescale = list(NULL),
  trim = list(c(0.01, 0.99)),
  window = NULL,
  text_size = 20,
  scalebar = 0,
  gg.output = TRUE,
  bucket = NULL,
  connection = con,
  schema = "CORE_DATA",
  ds = -1,
  ...
)

Arguments

region

A Region object

markers

The markers to plot

colors

The colors to use. Must be same length as markers input

background

Specify the background color (black or white)

zoom.level

Specify a zoom level corresponding to the Enable Visualizer tilebucket. Higher is more zoomed out

rescale

Thresholds for rescaling. Must be given as a list of length-2 vectors of threshold values, min and max, per marker (or NULL, for auto-thresholding) in the form below. If only one list entry is given, it will be applied to all markers uniformly: list( c(min.val, max.val), NULL, ...)

trim

Whether to trim the color scale. Applied after dynamic thresholding. Must be given as a list of length-2 vectors of quantiles, low and high, per marker (or NULL, for no trimming) in the form below. If only one list entry is given, it will be applied to all markers uniformly: list( c(trim.low, trim.high), NULL, ...)

window

Optional filtering by position (0-indexed) in the form: list( c(x_min, x_max), c(y_min, y_max) )

text_size

The text size for the overlay indicating marker colors. This will appear in the bottom right corner of the image. Set to 0 for no text.

scalebar

Length of the scale bar (in microns) to overlay. This will appear in the bottom left corner of the image. Set to 0 for no scale bar.

gg.output

Whether or not to use ggplot2 to render the output. This can be clunky or slow for larger images, which are rastered on the fly.

bucket

Deprecated. Image tiles are now pulled via Portal instead of S3.

connection

The database connection object

schema

The database schema name

ds

A date-stamp of today plus ds (an integer) is used to filter Snowflake queries.

...

Additional arguments

Value

A raster image or ggplot image object, depending on the value passed to gg.output

Scroll to top