display {EBImage} | R Documentation

## Interactive image display

### Description

Display images on the screen of a local or remote display.

### Usage

      display(x, no.GTK=FALSE, ...)

      ## S4 method for signature 'Image':
      animate(x, ...)        ## not available on Windows
      ## S4 method for signature 'IndexedImage':
      animate(x, ...) ## not available on Windows
      ## S4 method for signature 'array':
      animate(x, ...)        ## not available on Windows

### Arguments

`x` | An object of `Image`, `IndexedImage` or `array`.
`no.GTK` | A logical value, if `TRUE` an ImageMagick display will be used instead of the GTK display (read details below). On Windows the ImageMagick display is not available.
`...` | Reserved.

### Details

The argument `main` can be used with the GTK display to substitute the default window title. By default, the GTK display shows the expression used in call to `display` for the window title.

When used with `IndexedImage` `display` additionally accepts a `colorize` argument. If it is provided with any value of any class, then objects are mapped on the display using random RGB colors.

If available the `GTK` display will be used by default. This mode allows display of multiple images simultaneously. If the `GTK` mode is not used, an `ImageMagick`-internal display function, is used. This mode is for compatibility purposes only and should not be used if `GTK` is available. Because `ImageMagick` does not provide any programmatic ways to control and close display windows, the display in this mode is limited to one it time. The display window must be explicitly closed before a new image can be displayed. If `EBImage` was installed without `GTK` support, the function will fall back to the `ImageMagick` display automatically. In this case there is no need to supply `no.GTK` argument.

So far `animate` uses the `AnimateImages` function from `ImageMagick`, which behavior is analogous to that of the `ImageMagick` display. This function is not available on Windows due to the lack of support in the `ImageMagick` API.

`GTK` display does not use `GTK` widgets available from other `R` packages, the functionality is coded in `EBImage`. Therefore, the package must be compiled with `GTK` support in order to enable it.

### Value

An invisible `NULL`.

### Author(s)

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

### References

ImageMagick: http://www.imagemagick.org; GTK: http://www.gtk.org; GTK on Windows: http://gladewin32.sf.net

### See Also

`Image, IndexedImage, Image, readImage, writeImage`

### Examples

      ## load images of nuclei (seed points later)
      f <- paste( system.file(package="EBImage"), "images/Gene1_G.tif", sep="/" )
      ii = readImage(f)
      ## normalize images
      ii = normalize(ii, separate=TRUE)
      ## segment
      mask = thresh(ii, 25, 25, 0.02)
      ## refine segmentation with morphology filters
      mk3 = morphKern(3)
      mk5 = morphKern(5)
      mask = dilate(erode(closing(mask, mk5), mk3), mk5)
      ## index objects with 'watershed'
      io = watershed( distmap(mask), 1.5, 1)
      if (interactive()) {
        display(io)
        display(io, main="Watershed segmentation", colorize=T)
      }

[Package EBImage version 2.4.0 Index]