image,Image-method {EBImage} | R Documentation

## Generic methods for objects of class Image

### Description

`Image` supports all (or almost all) operations that are defined for `array`. However, the default behavior of some generics was redefined in the package to better suit the class. Those are:

### Generic methods

`show(object)`
  Prints a summary of image and properties (as described in 'Accessor methods' section). Prints also an excerpt of data keeping it to the minimum just to have a visual control over the atomic data type. Use`imageData(x)` to print or assign the full dataset. If image was put through the object detection algorithm a summary of detected objects will be printed instead of data.
`as.array(x)`
  Removed to avoid incompatibilities with R < 2.5. Use `imageData` instead.
`as.matrix(x, ...)`
  Removed to avoid incompatibilities with R < 2.5. Use `as.matrix(imageData(x))` instead.
`hist(x, ...)`
  A histogramme method.
`median(x, na.rm=FALSE)`
  `stats:median` redefinition for images (bug workaround: without it `median` takes forever to execute without no apparent reason)
`image(x, ...)`
  Draws image data using `graphics::image` keeping image aspect ratio.
`[`
  Redefined versions (multiple signatures) of the `array` subsetting operator. These return objects of class `Image` without dropping dimensions.
`Arith`
  Redefined arithmetic operators acting on any combination of `Image` with another `Image` or `array` will return an object of class `Image`.
`as.Image)(x, ...)`
  S4 method for the signature `x=array`. Is equivalent to `Image(x)` when `x` is `array`.

Other important methods that directly applicable due to inheritance from the `array` class, just to stress that they can and should be used:

`dim(x)` and `dim(x) <- value`
  Gets and sets image dimensions.
`fft(z, inverse = FALSE)`
  Performs the Fast Fourier Transformation on an Image.
`sqrt(x)` etc.
  Miscellaneous mathematical functions.

### Author(s)

Oleg Sklyar, osklyar@ebi.ac.uk, 2006-2007

### See Also

`Image, IndexedImage`

[Package EBImage version 2.6.0 Index]