Classes | Defines | Typedefs | Enumerations | Functions
core/vil/vil_pixel_format.h File Reference
#include <vil/vil_rgb.h>
#include <vil/vil_rgba.h>
#include <vxl_config.h>
#include <vcl_iosfwd.h>
#include <vcl_complex.h>

Go to the source code of this file.

Classes

struct  vil_pixel_format_type_of< pix_type >
 The C++ type corresponding to a pixel format enumeration. More...

Defines

#define vil_pixel_format_macro(T, C, V)
 Get the vil_pixel_format value for a given type.

Typedefs

typedef void * vil_pixel_format_invalid_type
 The C++ type corresponding to an invalid pixel format.

Enumerations

enum  vil_pixel_format {
  VIL_PIXEL_FORMAT_UNKNOWN = 0, VIL_PIXEL_FORMAT_UINT_32 = 3, VIL_PIXEL_FORMAT_INT_32 = 4, VIL_PIXEL_FORMAT_UINT_16 = 5,
  VIL_PIXEL_FORMAT_INT_16 = 6, VIL_PIXEL_FORMAT_BYTE = 7, VIL_PIXEL_FORMAT_SBYTE = 8, VIL_PIXEL_FORMAT_FLOAT = 9,
  VIL_PIXEL_FORMAT_DOUBLE = 10, VIL_PIXEL_FORMAT_BOOL = 12, VIL_PIXEL_FORMAT_RGB_UINT_32 = 15, VIL_PIXEL_FORMAT_RGB_INT_32 = 16,
  VIL_PIXEL_FORMAT_RGB_UINT_16 = 17, VIL_PIXEL_FORMAT_RGB_INT_16 = 18, VIL_PIXEL_FORMAT_RGB_BYTE = 19, VIL_PIXEL_FORMAT_RGB_SBYTE = 20,
  VIL_PIXEL_FORMAT_RGB_FLOAT = 21, VIL_PIXEL_FORMAT_RGB_DOUBLE = 22, VIL_PIXEL_FORMAT_RGBA_UINT_32 = 26, VIL_PIXEL_FORMAT_RGBA_INT_32 = 27,
  VIL_PIXEL_FORMAT_RGBA_UINT_16 = 28, VIL_PIXEL_FORMAT_RGBA_INT_16 = 29, VIL_PIXEL_FORMAT_RGBA_BYTE = 30, VIL_PIXEL_FORMAT_RGBA_SBYTE = 31,
  VIL_PIXEL_FORMAT_RGBA_FLOAT = 32, VIL_PIXEL_FORMAT_RGBA_DOUBLE = 33, VIL_PIXEL_FORMAT_COMPLEX_FLOAT = 35, VIL_PIXEL_FORMAT_COMPLEX_DOUBLE = 36,
  VIL_PIXEL_FORMAT_ENUM_END = 37
}
 Describes the type of the concrete data. More...

Functions

template<class T >
vil_pixel_format vil_pixel_format_of (T)
 The pixel format enumeration corresponding to the C++ type.
 vil_pixel_format_macro (vxl_uint_32, vxl_uint_32, VIL_PIXEL_FORMAT_UINT_32)
 vil_pixel_format_macro (vxl_int_32, vxl_int_32, VIL_PIXEL_FORMAT_INT_32)
 vil_pixel_format_macro (vxl_uint_16, vxl_uint_16, VIL_PIXEL_FORMAT_UINT_16)
 vil_pixel_format_macro (vxl_int_16, vxl_int_16, VIL_PIXEL_FORMAT_INT_16)
 vil_pixel_format_macro (vxl_byte, vxl_byte, VIL_PIXEL_FORMAT_BYTE)
 vil_pixel_format_macro (vxl_sbyte, vxl_sbyte, VIL_PIXEL_FORMAT_SBYTE)
 vil_pixel_format_macro (float, float, VIL_PIXEL_FORMAT_FLOAT)
 vil_pixel_format_macro (double, double, VIL_PIXEL_FORMAT_DOUBLE)
 vil_pixel_format_macro (bool, bool, VIL_PIXEL_FORMAT_BOOL)
 vil_pixel_format_macro (vil_rgb< vxl_uint_32 >, vxl_uint_32, VIL_PIXEL_FORMAT_RGB_UINT_32)
 vil_pixel_format_macro (vil_rgb< vxl_int_32 >, vxl_int_32, VIL_PIXEL_FORMAT_RGB_INT_32)
 vil_pixel_format_macro (vil_rgb< vxl_uint_16 >, vxl_uint_16, VIL_PIXEL_FORMAT_RGB_UINT_16)
 vil_pixel_format_macro (vil_rgb< vxl_int_16 >, vxl_int_16, VIL_PIXEL_FORMAT_RGB_INT_16)
 vil_pixel_format_macro (vil_rgb< vxl_byte >, vxl_byte, VIL_PIXEL_FORMAT_RGB_BYTE)
 vil_pixel_format_macro (vil_rgb< vxl_sbyte >, vxl_sbyte, VIL_PIXEL_FORMAT_RGB_SBYTE)
 vil_pixel_format_macro (vil_rgb< float >, float, VIL_PIXEL_FORMAT_RGB_FLOAT)
 vil_pixel_format_macro (vil_rgb< double >, double, VIL_PIXEL_FORMAT_RGB_DOUBLE)
 vil_pixel_format_macro (vil_rgba< vxl_uint_32 >, vxl_uint_32, VIL_PIXEL_FORMAT_RGBA_UINT_32)
 vil_pixel_format_macro (vil_rgba< vxl_int_32 >, vxl_int_32, VIL_PIXEL_FORMAT_RGBA_INT_32)
 vil_pixel_format_macro (vil_rgba< vxl_uint_16 >, vxl_uint_16, VIL_PIXEL_FORMAT_RGBA_UINT_16)
 vil_pixel_format_macro (vil_rgba< vxl_int_16 >, vxl_int_16, VIL_PIXEL_FORMAT_RGBA_INT_16)
 vil_pixel_format_macro (vil_rgba< vxl_byte >, vxl_byte, VIL_PIXEL_FORMAT_RGBA_BYTE)
 vil_pixel_format_macro (vil_rgba< vxl_sbyte >, vxl_sbyte, VIL_PIXEL_FORMAT_RGBA_SBYTE)
 vil_pixel_format_macro (vil_rgba< float >, float, VIL_PIXEL_FORMAT_RGBA_FLOAT)
 vil_pixel_format_macro (vil_rgba< double >, double, VIL_PIXEL_FORMAT_RGBA_DOUBLE)
 vil_pixel_format_macro (vcl_complex< float >, vcl_complex< float >, VIL_PIXEL_FORMAT_COMPLEX_FLOAT)
 vil_pixel_format_macro (vcl_complex< double >, vcl_complex< double >, VIL_PIXEL_FORMAT_COMPLEX_DOUBLE)
unsigned vil_pixel_format_sizeof_components (enum vil_pixel_format f)
 Return the number of bytes used by each component of pixel format f.
unsigned vil_pixel_format_num_components (enum vil_pixel_format f)
 Return the number of components in pixel format f.
vil_pixel_format vil_pixel_format_component_format (enum vil_pixel_format f)
 Return the format of each component of pixel format f.
vcl_ostream & operator<< (vcl_ostream &os, vil_pixel_format f)
 Output a pretty string representing the pixel format.
vil_pixel_format vil_pixel_format_from_string (const char *s)
 Convert a string into a pixel format.

Detailed Description

Author:
Ian Scott. Note that a vcl_complex<float> is thought of as a scalar pixel type for vil's purposes.
    Modifications
     23 Oct.2003 - Peter Vanroose - Added support for 64-bit int pixels
   

Definition in file vil_pixel_format.h.


Define Documentation

#define vil_pixel_format_macro (   T,
  C,
 
)
Value:
VCL_DEFINE_SPECIALIZATION inline vil_pixel_format vil_pixel_format_of(T /*dummy*/) { return V; }\
VCL_DEFINE_SPECIALIZATION struct vil_pixel_format_type_of<V> { typedef T type; typedef C component_type; }

Get the vil_pixel_format value for a given type.

Definition at line 113 of file vil_pixel_format.h.


Typedef Documentation

The C++ type corresponding to an invalid pixel format.

See vil_pixel_format_type_of.

Definition at line 91 of file vil_pixel_format.h.


Enumeration Type Documentation

Describes the type of the concrete data.

Enumerator:
VIL_PIXEL_FORMAT_UNKNOWN 
VIL_PIXEL_FORMAT_UINT_32 
VIL_PIXEL_FORMAT_INT_32 
VIL_PIXEL_FORMAT_UINT_16 
VIL_PIXEL_FORMAT_INT_16 
VIL_PIXEL_FORMAT_BYTE 
VIL_PIXEL_FORMAT_SBYTE 
VIL_PIXEL_FORMAT_FLOAT 
VIL_PIXEL_FORMAT_DOUBLE 
VIL_PIXEL_FORMAT_BOOL 
VIL_PIXEL_FORMAT_RGB_UINT_32 
VIL_PIXEL_FORMAT_RGB_INT_32 
VIL_PIXEL_FORMAT_RGB_UINT_16 
VIL_PIXEL_FORMAT_RGB_INT_16 
VIL_PIXEL_FORMAT_RGB_BYTE 
VIL_PIXEL_FORMAT_RGB_SBYTE 
VIL_PIXEL_FORMAT_RGB_FLOAT 
VIL_PIXEL_FORMAT_RGB_DOUBLE 
VIL_PIXEL_FORMAT_RGBA_UINT_32 
VIL_PIXEL_FORMAT_RGBA_INT_32 
VIL_PIXEL_FORMAT_RGBA_UINT_16 
VIL_PIXEL_FORMAT_RGBA_INT_16 
VIL_PIXEL_FORMAT_RGBA_BYTE 
VIL_PIXEL_FORMAT_RGBA_SBYTE 
VIL_PIXEL_FORMAT_RGBA_FLOAT 
VIL_PIXEL_FORMAT_RGBA_DOUBLE 
VIL_PIXEL_FORMAT_COMPLEX_FLOAT 

vcl_complex<float> is a scalar for vil's purposes.

VIL_PIXEL_FORMAT_COMPLEX_DOUBLE 

vcl_complex<double> is a scalar for vil's purposes.

VIL_PIXEL_FORMAT_ENUM_END 

Definition at line 22 of file vil_pixel_format.h.


Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
vil_pixel_format  f 
)

Output a pretty string representing the pixel format.

Definition at line 222 of file vil_pixel_format.cxx.

vil_pixel_format vil_pixel_format_component_format ( enum vil_pixel_format  f)

Return the format of each component of pixel format f.

Definition at line 214 of file vil_pixel_format.cxx.

vil_pixel_format vil_pixel_format_from_string ( const char *  s)

Convert a string into a pixel format.

This uses the same encoding as operator<<.

Definition at line 279 of file vil_pixel_format.cxx.

vil_pixel_format_macro ( vxl_uint_32  ,
vxl_uint_32  ,
VIL_PIXEL_FORMAT_UINT_32   
)
vil_pixel_format_macro ( vxl_int_32  ,
vxl_int_32  ,
VIL_PIXEL_FORMAT_INT_32   
)
vil_pixel_format_macro ( vxl_uint_16  ,
vxl_uint_16  ,
VIL_PIXEL_FORMAT_UINT_16   
)
vil_pixel_format_macro ( vxl_int_16  ,
vxl_int_16  ,
VIL_PIXEL_FORMAT_INT_16   
)
vil_pixel_format_macro ( vxl_byte  ,
vxl_byte  ,
VIL_PIXEL_FORMAT_BYTE   
)
vil_pixel_format_macro ( vxl_sbyte  ,
vxl_sbyte  ,
VIL_PIXEL_FORMAT_SBYTE   
)
vil_pixel_format_macro ( float  ,
float  ,
VIL_PIXEL_FORMAT_FLOAT   
)
vil_pixel_format_macro ( double  ,
double  ,
VIL_PIXEL_FORMAT_DOUBLE   
)
vil_pixel_format_macro ( bool  ,
bool  ,
VIL_PIXEL_FORMAT_BOOL   
)
vil_pixel_format_macro ( vil_rgb< vxl_uint_32 >  ,
vxl_uint_32  ,
VIL_PIXEL_FORMAT_RGB_UINT_32   
)
vil_pixel_format_macro ( vil_rgb< vxl_int_32 >  ,
vxl_int_32  ,
VIL_PIXEL_FORMAT_RGB_INT_32   
)
vil_pixel_format_macro ( vil_rgb< vxl_uint_16 >  ,
vxl_uint_16  ,
VIL_PIXEL_FORMAT_RGB_UINT_16   
)
vil_pixel_format_macro ( vil_rgb< vxl_int_16 >  ,
vxl_int_16  ,
VIL_PIXEL_FORMAT_RGB_INT_16   
)
vil_pixel_format_macro ( vil_rgb< vxl_byte >  ,
vxl_byte  ,
VIL_PIXEL_FORMAT_RGB_BYTE   
)
vil_pixel_format_macro ( vil_rgb< vxl_sbyte >  ,
vxl_sbyte  ,
VIL_PIXEL_FORMAT_RGB_SBYTE   
)
vil_pixel_format_macro ( vil_rgb< float >  ,
float  ,
VIL_PIXEL_FORMAT_RGB_FLOAT   
)
vil_pixel_format_macro ( vil_rgb< double >  ,
double  ,
VIL_PIXEL_FORMAT_RGB_DOUBLE   
)
vil_pixel_format_macro ( vil_rgba< vxl_uint_32 >  ,
vxl_uint_32  ,
VIL_PIXEL_FORMAT_RGBA_UINT_32   
)
vil_pixel_format_macro ( vil_rgba< vxl_int_32 >  ,
vxl_int_32  ,
VIL_PIXEL_FORMAT_RGBA_INT_32   
)
vil_pixel_format_macro ( vil_rgba< vxl_uint_16 >  ,
vxl_uint_16  ,
VIL_PIXEL_FORMAT_RGBA_UINT_16   
)
vil_pixel_format_macro ( vil_rgba< vxl_int_16 >  ,
vxl_int_16  ,
VIL_PIXEL_FORMAT_RGBA_INT_16   
)
vil_pixel_format_macro ( vil_rgba< vxl_byte >  ,
vxl_byte  ,
VIL_PIXEL_FORMAT_RGBA_BYTE   
)
vil_pixel_format_macro ( vil_rgba< vxl_sbyte >  ,
vxl_sbyte  ,
VIL_PIXEL_FORMAT_RGBA_SBYTE   
)
vil_pixel_format_macro ( vil_rgba< float >  ,
float  ,
VIL_PIXEL_FORMAT_RGBA_FLOAT   
)
vil_pixel_format_macro ( vil_rgba< double >  ,
double  ,
VIL_PIXEL_FORMAT_RGBA_DOUBLE   
)
vil_pixel_format_macro ( vcl_complex< float >  ,
vcl_complex< float >  ,
VIL_PIXEL_FORMAT_COMPLEX_FLOAT   
)
vil_pixel_format_macro ( vcl_complex< double >  ,
vcl_complex< double >  ,
VIL_PIXEL_FORMAT_COMPLEX_DOUBLE   
)
unsigned vil_pixel_format_num_components ( enum vil_pixel_format  f)

Return the number of components in pixel format f.

Definition at line 206 of file vil_pixel_format.cxx.

template<class T >
vil_pixel_format vil_pixel_format_of ( ) [inline]

The pixel format enumeration corresponding to the C++ type.

Definition at line 84 of file vil_pixel_format.h.

unsigned vil_pixel_format_sizeof_components ( enum vil_pixel_format  f)

Return the number of bytes used by each component of pixel format f.

Definition at line 199 of file vil_pixel_format.cxx.