core/vil1/vil1_image_as.h

Go to the documentation of this file.
00001 // This is core/vil1/vil1_image_as.h
00002 #ifndef vil1_image_as_h_
00003 #define vil1_image_as_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Set of vil1_image_as functions
00010 // \author fsm
00011 
00012 #include <vil1/vil1_image.h>
00013 
00014 //: \brief Converts to a different pixel type.
00015 //
00016 // There is no scaling performed, so beware of clamping effects. Sample usage:
00017 // \code
00018 //   out = vil1_image_as<int>( in );
00019 // \endcode
00020 // or, on compilers that require the arguments to specify the templates:
00021 // \code
00022 //   out = vil1_image_as( in , (int*)0 );
00023 // \endcode
00024 // Converting a RGB buffer to greyscale will do a RGB->luminance
00025 // conversion. That is, different weights will be applied to each of
00026 // the R, G and B values to obtain the resulting grey value.
00027 
00028 template<class T>
00029 vil1_image vil1_image_as(vil1_image const & i, T* dummy /* = 0 */);
00030 
00031 //: \brief Converts to a greyscale image with byte (8bit unsigned) pixels. \sa{vil1_image_as}
00032 vil1_image vil1_image_as_byte(vil1_image const & i);
00033 
00034 //: \brief Converts to a greyscale image with 16bit unsigned pixels. \sa{vil1_image_as}
00035 vil1_image vil1_image_as_uint16(vil1_image const &image);
00036 
00037 //: \brief Converts to a greyscale image with integer (32bit) pixels. \sa{vil1_image_as}
00038 vil1_image vil1_image_as_int(vil1_image const & i);
00039 
00040 //: \brief Converts to a grayscale image with float pixels. \sa{vil1_image_as}
00041 vil1_image vil1_image_as_float(vil1_image const & i);
00042 
00043 //: \brief Converts to a greyscale image with integer double pixels. \sa{vil1_image_as}
00044 vil1_image vil1_image_as_double(vil1_image const & i);
00045 
00046 //: \brief Converts to a rgb image with 8 bits per component. \sa{vil1_image_as}
00047 vil1_image vil1_image_as_rgb_byte(vil1_image const & i);
00048 
00049 //: \brief Converts to a rgb image with 16 bits per component. \sa{vil1_image_as}
00050 vil1_image vil1_image_as_rgb_uint16(vil1_image const & i);
00051 
00052 //: \brief Converts to a rgb image with float components. \sa{vil1_image_as}
00053 vil1_image vil1_image_as_rgb_float(vil1_image const & i);
00054 
00055 #endif // vil1_image_as_h_

Generated on Mon Oct 6 05:08:15 2008 for core/vil1 by  doxygen 1.5.1