addScaleBar: Image Scale Bar Incrustation

View source: R/addScaleBar.R

addScaleBarR Documentation

Image Scale Bar Incrustation

Description

Adds scale bar to image

Usage

addScaleBar(
  image,
  size = 7,
  style = c("dash", "line")[1],
  color = "white",
  pix = c(0.3, 0.5, 1)[1],
  xoff = 0,
  yoff = 0
)

Arguments

image

a [0,1] image.

size

positive integer. Scale's bar size in micro-meter. Default is 7.
This parameter can't be lesser than 6px and higher than image width + scale text.

style

a character string. Scale's bar style, either "dash" or "line". Default is "dash".

color

a character string. Color of the scale. Default is "white" .

pix

positive numeric. Size of one pixel in micro-meter. Default is 0.3 for 60x magnification, use 0.5 for 40x and 1 for 20x.

xoff

positive integer. x offset in image to draw scale, starting from bottom left corner. Default is 0.

yoff

positive integer. y offset in image to draw scale, starting from bottom left corner. Default is 0.

Value

an image with scale added to the bottom left corner.


gitdemont/IFC documentation built on June 11, 2025, 9:23 p.m.