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

