vil1_rgba< T > Struct Template Reference

#include <vil1_rgba.h>

List of all members.


Detailed Description

template<class T>
struct vil1_rgba< T >

This is the appropriate pixel type for RGBA colour images.

The purpose of rgba<T> is to provide an object which consists of four Ts arranged in order and which can be referred to as 'R', 'G', 'B' and 'A'. Thus, if win32 does something funny when blitting an rgba bitmap to screen, that's up to the renderer to sort out.

Currently also includes the following `utilities':

  1. conversion to ubyte (luminance of vil1_rgba: weights (0.299, 0.587, 0.114, 0)).
  2. min and max of vil1_rgba<byte> values, useful for morphological operations.
  3. arithmetic operations

Definition at line 27 of file vil1_rgba.h.


Public Types

typedef T value_type

Public Member Functions

R () const
G () const
B () const
A () const
 vil1_rgba ()
 vil1_rgba (T v)
 Create grey (v,v,v,1) vil1_rgba cell from value v.
 vil1_rgba (T red, T green, T blue, T alpha=1)
 Construct from four values.
 vil1_rgba (const vil1_rgba< double > &that)
 vil1_rgba (const vil1_rgba< unsigned char > &that)
vil1_rgba< T > & operator= (const vil1_rgba< double > &that)
vil1_rgba< T > & operator= (const vil1_rgba< float > &that)
vil1_rgba< T > & operator= (const vil1_rgba< unsigned char > &that)
grey () const
 Convert vil1_rgba to gray using standard (.299, .587, .114) RGB weighting.
 operator T () const
 Convert vil1_rgba to gray using standard (.299, .587, .114) RGB weighting.

Public Attributes

r
g
b
a

Member Typedef Documentation

template<class T>
typedef T vil1_rgba< T >::value_type

Definition at line 30 of file vil1_rgba.h.


Constructor & Destructor Documentation

template<class T>
vil1_rgba< T >::vil1_rgba (  )  [inline]

Definition at line 39 of file vil1_rgba.h.

template<class T>
vil1_rgba< T >::vil1_rgba ( v  )  [inline]

Create grey (v,v,v,1) vil1_rgba cell from value v.

This provides a conversion from T to vil1_rgba<T>, needed by e.g. two constructors in IUE_filter.h.

Definition at line 43 of file vil1_rgba.h.

template<class T>
vil1_rgba< T >::vil1_rgba ( red,
green,
blue,
alpha = 1 
) [inline]

Construct from four values.

Definition at line 47 of file vil1_rgba.h.

template<class T>
vil1_rgba< T >::vil1_rgba ( const vil1_rgba< double > &  that  )  [inline]

Definition at line 70 of file vil1_rgba.h.

template<class T>
vil1_rgba< T >::vil1_rgba ( const vil1_rgba< unsigned char > &  that  )  [inline]

Definition at line 77 of file vil1_rgba.h.


Member Function Documentation

template<class T>
T vil1_rgba< T >::R (  )  const [inline]

Definition at line 34 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::G (  )  const [inline]

Definition at line 35 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::B (  )  const [inline]

Definition at line 36 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::A (  )  const [inline]

Definition at line 37 of file vil1_rgba.h.

template<class T>
vil1_rgba<T>& vil1_rgba< T >::operator= ( const vil1_rgba< double > &  that  )  [inline]

Definition at line 85 of file vil1_rgba.h.

template<class T>
vil1_rgba<T>& vil1_rgba< T >::operator= ( const vil1_rgba< float > &  that  )  [inline]

Definition at line 94 of file vil1_rgba.h.

template<class T>
vil1_rgba<T>& vil1_rgba< T >::operator= ( const vil1_rgba< unsigned char > &  that  )  [inline]

Definition at line 103 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::grey (  )  const [inline]

Convert vil1_rgba to gray using standard (.299, .587, .114) RGB weighting.

Definition at line 114 of file vil1_rgba.h.

template<class T>
vil1_rgba< T >::operator T (  )  const [inline]

Convert vil1_rgba to gray using standard (.299, .587, .114) RGB weighting.

Definition at line 117 of file vil1_rgba.h.


Member Data Documentation

template<class T>
T vil1_rgba< T >::r

Definition at line 33 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::g

Definition at line 33 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::b

Definition at line 33 of file vil1_rgba.h.

template<class T>
T vil1_rgba< T >::a

Definition at line 33 of file vil1_rgba.h.


The documentation for this struct was generated from the following file:
Generated on Sun Nov 22 05:09:21 2009 for core/vil1 by  doxygen 1.5.1