as.raster: Support for converting ImageJ images to raster images

Description Usage Arguments Value Author(s) See Also Examples

Description

Support for converting ImageJ images to raster images.

Usage

1
2
## S3 method for class 'jobjRef'
as.raster(x, ...)

Arguments

x

A java reference of class ij.ImagePlus.

...

Not used.

Value

A raster object. See as.raster.

Author(s)

Contributed by Paul Murrell http://www.stat.auckland.ac.nz/~paul/

See Also

as.raster, raster

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Load an image in ImageJ
logo <- system.file("images", "R.jpg", package = "RImageJ")
image <- IJ$openImage(logo)
## Use this image in a R plot
plot(c(100, 250), c(300, 450), type = "n", xlab = "", ylab = "")
rasterImage(image, 100, 300, 150, 350, interpolate = FALSE)
rasterImage(image, 100, 400, 150, 450)
rasterImage(image, 200, 300, 200 + xinch(.5), 300 + yinch(.3), interpolate = FALSE)
rasterImage(image, 200, 400, 250, 450, angle = 15, interpolate = FALSE)

## End(Not run)

RImageJ documentation built on May 2, 2019, 5:53 p.m.