GrayImage {R.image}R Documentation

The GrayImage class

Description

Package: R.image
Class GrayImage

Object
~~|
~~+--BitmapImage
~~~~~~~|
~~~~~~~+--GrayImage

Directly known subclasses:
MonochromeImage

public static class GrayImage
extends BitmapImage

The class GrayImage represents a grayscale image and inherits from the abstract BitmapImage class.

Usage

GrayImage(gray=NULL)

Arguments

gray A numeric NxK matrix.

Fields and Methods

Fields
gray The gray values.
depth The depth in number of bit layers.

Methods:
as -
as.GrayImage -
as.MonochromeImage Converts a grayscale image to a monochrome image.
as.RGBImage Converts a grayscale image to an RGB image.
dim -
equals -
getColorMap -
getColors -
image -
persp Creates a (3-dimensional) perspective plot of the image.
plot3d Creates a 3-dimensional plot of the image.
writePBM -
writePGM -
writePPM -
writeRGB -

Methods inherited from BitmapImage:
as.character, depth, dim, getColorMap, getColors, height, image, plot, points, read, readJPEG, readUsingExternal, width, write, writeBMP, writeEPS, writeJPG, writePBM, writePGM, writePNG, writePPM, writeRGB

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clone, detach, equals, extend, finalize, gc, getEnvironment, getFields, getInstanciationTime, getStaticInstance, hasField, hashCode, ll, load, objectSize, print, save

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

Examples

gray <- BitmapImage$read("logosm-gray.pgm", path=system.file("images", package="R.image"))

layout(matrix(1:4,ncol=2))
image(gray)
plot3d(gray, theta=190, phi=50, col="blue", cex=0.8)
persp(gray, theta=190, phi=50, col="red")

[Package R.image version 0.2.3 Index]