core/vil1/vil1_pixel.h

Go to the documentation of this file.
00001 // This is core/vil1/vil1_pixel.h
00002 #ifndef vil1_pixel_h_
00003 #define vil1_pixel_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Convenient descriptions of format combinations
00010 // \author awf@robots.ox.ac.uk
00011 
00012 class vil1_image;
00013 
00014 //: Common combinations of component format, bits, planes and components.
00015 enum vil1_pixel_format_t
00016 {
00017   VIL1_PIXEL_FORMAT_UNKNOWN,
00018   VIL1_BYTE,       /*!< 1 x W x H x 1 of UINT x 8*/
00019   VIL1_RGB_BYTE,   /*!< 1 x W x H x 3 of UINT x 8*/
00020   VIL1_RGBA_BYTE,  /*!< 1 x W x H x 4 of UINT x 8*/
00021   VIL1_RGB_UINT16, /*!< 1 x W x H x 3 of UINT x 16*/
00022   VIL1_RGB_FLOAT,  /*!< 1 x W x H x 3 of IEEE_FLOAT x 32*/
00023   VIL1_RGB_DOUBLE, /*!< 1 x W x H x 3 of IEEE_DOUBLE x 64*/
00024   VIL1_UINT16,     /*!< 1 x W x H x 1 of UINT x 16*/
00025   VIL1_UINT32,     /*!< 1 x W x H x 1 of UINT x 32*/
00026   VIL1_FLOAT,      /*!< 1 x W x H x 1 of IEEE_FLOAT x 32*/
00027   VIL1_DOUBLE,     /*!< 1 x W x H x 1 of IEEE_DOUBLE x 64*/
00028   VIL1_COMPLEX     /*!< 1 x W x H x 1 of COMPLEX x 64*/
00029 };
00030 
00031 inline
00032 const char* vil1_print(vil1_pixel_format_t f)
00033 {
00034   switch (f)
00035   {
00036     case VIL1_PIXEL_FORMAT_UNKNOWN: return "VIL1_PIXEL_FORMAT_UNKNOWN";
00037     case VIL1_BYTE: return "VIL1_BYTE";
00038     case VIL1_RGB_BYTE: return "VIL1_RGB_BYTE";
00039     case VIL1_RGBA_BYTE: return "VIL1_RGBA_BYTE";
00040     case VIL1_RGB_UINT16: return "VIL1_RGB_UINT16";
00041     case VIL1_RGB_FLOAT: return "VIL1_RGB_FLOAT";
00042     case VIL1_RGB_DOUBLE: return "VIL1_RGB_DOUBLE";
00043     case VIL1_UINT16: return "VIL1_UINT16";
00044     case VIL1_UINT32: return "VIL1_UINT32";
00045     case VIL1_FLOAT: return "VIL1_FLOAT";
00046     case VIL1_DOUBLE: return "VIL1_DOUBLE";
00047     case VIL1_COMPLEX: return "VIL1_COMPLEX";
00048     default: return "VIL1_PIXEL_FORMAT_INVALID";
00049   }
00050 }
00051 
00052 //: Returns one of the `vil1_pixel_format's.
00053 // A standard RGB RGB RGB image has pixel_type() == VIL1_RGB_BYTE
00054 vil1_pixel_format_t vil1_pixel_format(vil1_image const &);
00055 
00056 #endif // vil1_pixel_h_

Generated on Mon Mar 8 05:09:33 2010 for core/vil1 by  doxygen 1.5.1