GrayImage              package:R.image              R Documentation

_T_h_e _G_r_a_y_I_m_a_g_e _c_l_a_s_s

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

     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.

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

     GrayImage(gray=NULL)

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

    gray: A 'numeric' NxK 'matrix'.

_F_i_e_l_d_s _a_n_d _M_e_t_h_o_d_s:

     *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

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

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

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

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

