scaleBar: Add a scale bar

Description Usage Arguments Value Author(s) Examples

View source: R/scaleBar.R

Description

This function adds a scale bar to the bottom right of an image.

Usage

1
scaleBar(img, col = "white", px = 60)

Arguments

img

An Image class object or a matrix.

col

Color of the bar.

px

Length of the bar.

Value

Returns an Image class object or a matrix.

Author(s)

Yuichiro Hourai, yhourai@gmail.com

Takeo Katsuki, takeo.katsuki@gmail.com

Examples

1
2
3
  nuclei <- readImage(system.file("images/nuclei.tif", package="EBImage"))
  nucleiscale <- scaleBar(nuclei[,,1])
  display(nucleiscale)

tkatsuki/dipr documentation built on April 19, 2021, 7:18 p.m.