display               package:EBImage               R Documentation

_I_n_t_e_r_a_c_t_i_v_e _i_m_a_g_e _d_i_s_p_l_a_y

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

       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

_A_r_g_u_m_e_n_t_s:

       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. 

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     An invisible 'NULL'.

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

     _ImageMagick_: <URL: http://www.imagemagick.org>; _GTK_:  <URL:
     http://www.gtk.org>; _GTK on Windows_: <URL:
     http://gladewin32.sf.net>

_S_e_e _A_l_s_o:

     ' Image, IndexedImage, Image,  readImage, writeImage '

_E_x_a_m_p_l_e_s:

       ## 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)
       }

