readTiff                package:rtiff                R Documentation

_A _f_u_n_c_t_i_o_n _t_o _l_o_a_d _T_I_F_F _i_m_a_g_e_s _i_n_t_o _a _p_i_x_m_a_p.

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

     Loads a TIFF image from a file and returns the image as a pixmap
     object, with optional scaling.

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

     readTiff(fn, page = 1, reduce = 0)

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

      fn: Filename (the tiff image to load) 

    page: In the case of multi-page tiffs, which page do you want? 

  reduce: Optional scaling factor to improve performance with large
          images,  should be a value between 0 and 1 (i.e. a decimal
          representation of  a percentage).  See details. 

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

     This package is a wrapper around libtiff (www.libtiff.org), on
     which it depends.  By using libtiff's  highlevel TIFFReadRGBAImage
     function, this package inherently support a wide range of image
     formats  and compression schemes (interestingly, thanks to
     libtiff, this package can load a number of TIFF formats  that
     tools like Window's Paint or the open source Gimp application will
     not load).

     High resolution images (by which I mean images that contain a
     "large" number of pixels) will occupy  quite a bit of memory and
     will also plot very slowly.  If you do not need all the resolution
     for your purposes, you scan specify a scaling factor (reduce=x) to
     downsample the image.  The factor is the  amount you want the
     image scaled BY, not TO.  In otherwords, reduce=.90 will reduce
     the image by 90 yielding an image 10 approach is used.  Since we
     are reducing and not enlarging, I hope this will be suitable for
     your  applications.

     For simplicity, an RGB pixmap is generated regardless of the
     colorspace of the original image (including grayscale images, in
     which case the R, G, and B rasters are identical).  The pixmap
     object requires  pixel intensities to be between 0 and 1, so the
     intensities in the orginal image file are scaled  accordingly.

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

     A pixmap object containing the image rasters.

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

     Eric Kort <eric.kort@vai.org>

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

     library(rtiff)
     tif <- readTiff(paste(.path.package("rtiff"), "/tiff/jello.tif", sep=""))
     plot(tif)

