1 2 3 4
the way of displaying images. Defaults to
arguments to be passed to the specialized display functions; for details see the sections on individual display methods.
method used for displaying images depends on whether called from and interactive R session. If
TRUE images are displayed with the
"browser" method, otherwise the
"raster" method is used. This dynamic behavior can be overridden by setting
options("EBImage.display") to either
plot.Image S3 method is a wrapper for
logical(1), include images in the document as data URIs. Defaults to
TRUE in non-interactive context (e.g. static R Markdown documents), otherwise to
character(1), file path for storing any temporary image files. Defaults to
arguments passed to
createWidget, such as fixed
height (in CSS units),
"raster" method displays images as R raster graphics. The user coordinates of the plotting region are set to the image pixel coordinates with the origin
(0, 0) in the upper left corner.
By default only the first frame of an image stack is shown; a different
frame can also be specified. When
all=TRUE the whole image stack is rendered and the frames are automatically positioned next to each other in a grid. The grid layout can be modified through
This method provides to following additional arguments to
a logical vector (or scalar) indicating whether to apply linear interpolation to the image when drawing.
a numeric indicating the frame number to display; only effective when
all = FALSE.
logical, defaulting to
FALSE. If set to
TRUE, all frames of a stacked image are displayed arranged in a grid, otherwise (default) just a single frame specified in
frame is displayed. The grid layout can be controlled by
a logical indicating whether to draw grid lines between individual frames. Defaults to
spacing is non-zero. Line color, type and width can be specified through graphical parameters
lwd, respectively; see
par for details.
integer. Specifies the number images in a row. Negative numbers are interpreted as the number of images in a column, e.g. use
-1 to display a single row containing all the frames.
numeric. Specifies the separation between frames as a fraction of frame dimensions (positive numbers <1) or in pixels (numbers >=1). It can be either a single number or a vector of length 2, in which case its elements correspond to the horizontal and vertical spacing, respectively.
numeric. Specifies the outer margins around the image, or a grid of images. Similarly as for
spacing, different horizontal and vertical margins can be defined by providing a vector.
graphical parameters passed to
Andrzej Oles, [email protected], 2012-2017
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
## Display a single image x = readImage(system.file("images", "sample-color.png", package="EBImage"))[257:768,,] display(x) ## Display a thresholded sequence ... y = readImage(system.file("images", "sample.png", package="EBImage"))[366:749, 58:441] z = lapply(seq(from=0.5, to=5, length=6), function(s) gblur(y, s, boundary="replicate") ) z = combine(z) ## ... using the interactive viewer ... display(z) ## ... or using R's build-in raster device display(z, method = "raster", all = TRUE) ## Display the last frame display(z, method = "raster", frame = numberOfFrames(z, type = "render")) ## Customize grid appearance display(z, method = "raster", all = TRUE, nx = 2, spacing = 0.05, margin = 20, bg = "black")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.