image2lz               package:fields               R Documentation

_S_o_m_e _s_i_m_p_l_e _f_u_n_c_t_i_o_n_s _f_o_r _s_u_b_s_e_t_t_i_n_g _i_m_a_g_e_s

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

     These function help in subsetting a image or reducing it size by
     averaging adjecent cells.

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

     crop.image(obj, loc=NULL,...)
     half.image(obj)
     get.rectangle()

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

     obj: A list in image format with the usual x,y  defining the grid
          and z a matrix of image values.

     loc: A 2 column matrix of locations within the image region that
          define the subset. If not specified then the image is plotted
          and the rectangle can be specified interactively.

     ...: Graphics arguments passed to image.plot. This is only
          relevant when loc is NULLand the locator function is called. 

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

     If loc has more than 2 rows then the largest rectangle containing
     the locations is used.

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

     Doug Nychka

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

     drape.plot, image.plot

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

     data(RMelevation)

     loc<- rbind( c(-106.5, 40.8),
                  c(-103.9, 37.5))

     # extract elevations for just CO frontrange.
     FR<- crop.image(RMelevation, loc)
     #  check:   image.plot( FR)

     # average cells  4 to 1 by doing this twice!
      half.image( RMelevation)-> temp
      half.image( temp)-> temp

     # extract the this averaged image
      FR2<- crop.image(temp, loc)
      zr<- range( FR$z)
      set.panel( 1,2)
      image.plot( FR, zlim =zr, horizontal=TRUE)
      image( FR2, zlim =zr, col=tim.colors())
        

