read.ijroi: Read an ImageJ ROI file

Description Usage Arguments Value Author(s) See Also Examples

View source: R/read.ijroi.R

Description

Read an ImageJ ROI file. This returns a structure containing the ImageJ data.

Usage

1
read.ijroi(file, verbose = FALSE)

Arguments

file

Name of ImageJ ROI file to read

verbose

Whether to report information

Value

A structure of class ijroi containing the ROI information

Author(s)

David Sterratt

See Also

plot.ijroi for plotting single ROI objects.

read.ijzip for reading several ROI objects from .zip files.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(png)
path <- file.path(system.file(package = "RImageJROI"), "extdata", "ijroi")
im <- as.raster(readPNG(file.path(path, "imagej-logo.png")))
plot(NA, NA, xlim=c(0, ncol(im)), ylim=c(nrow(im), 0), asp=1)
rasterImage(im, 0,  nrow(im), ncol(im), 0, interpolate=FALSE)
r <- read.ijroi(file.path(path, "rect.roi"))
plot(r, TRUE)
r <- read.ijroi(file.path(path, "polygon.roi"))
plot(r, TRUE)
r <- read.ijroi(file.path(path, "oval.roi"))
plot(r, TRUE)

RImageJROI documentation built on March 24, 2021, 1:09 a.m.