Public Types | Public Member Functions | Public Attributes | List of all members
vil_rgba< T > Struct Template Reference

This is the appropriate pixel type for RGBA colour images. More...

#include <vil_fwd.h>

Public Types

typedef T value_type
 

Public Member Functions

R () const
 
G () const
 
B () const
 
A () const
 
 vil_rgba ()=default
 
 vil_rgba (T v)
 Create grey (v,v,v,1) vil_rgba cell from value v. More...
 
 vil_rgba (T red, T green, T blue, T alpha=1)
 Construct from four values. More...
 
bool operator== (vil_rgba< T > const &o) const
 equality. More...
 
template<class S >
 vil_rgba (const vil_rgba< S > &that)
 
template<class S >
vil_rgba< T > & operator= (const vil_rgba< S > &that)
 
grey () const
 Convert vil_rgba to gray using standard (.299, .587, .114) RGB weighting. More...
 

Public Attributes

r
 
g
 
b
 
a
 

Detailed Description

template<class T>
struct vil_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 vil_rgba: weights (0.299, 0.587, 0.114, 0)).
  2. min and max of vil_rgba<byte> values, useful for morphological operations.
  3. arithmetic operations

Definition at line 15 of file vil_fwd.h.

Member Typedef Documentation

◆ value_type

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

Definition at line 29 of file vil_rgba.h.

Constructor & Destructor Documentation

◆ vil_rgba() [1/4]

template<class T>
vil_rgba< T >::vil_rgba ( )
default

◆ vil_rgba() [2/4]

template<class T>
vil_rgba< T >::vil_rgba ( v)
inline

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

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

Definition at line 42 of file vil_rgba.h.

◆ vil_rgba() [3/4]

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

Construct from four values.

Definition at line 46 of file vil_rgba.h.

◆ vil_rgba() [4/4]

template<class T>
template<class S >
vil_rgba< T >::vil_rgba ( const vil_rgba< S > &  that)
inline

Definition at line 56 of file vil_rgba.h.

Member Function Documentation

◆ A()

template<class T>
T vil_rgba< T >::A ( ) const
inline

Definition at line 36 of file vil_rgba.h.

◆ B()

template<class T>
T vil_rgba< T >::B ( ) const
inline

Definition at line 35 of file vil_rgba.h.

◆ G()

template<class T>
T vil_rgba< T >::G ( ) const
inline

Definition at line 34 of file vil_rgba.h.

◆ grey()

template<class T>
T vil_rgba< T >::grey ( ) const
inline

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

Definition at line 73 of file vil_rgba.h.

◆ operator=()

template<class T>
template<class S >
vil_rgba<T>& vil_rgba< T >::operator= ( const vil_rgba< S > &  that)
inline

Definition at line 64 of file vil_rgba.h.

◆ operator==()

template<class T>
bool vil_rgba< T >::operator== ( vil_rgba< T > const &  o) const
inline

equality.

Definition at line 50 of file vil_rgba.h.

◆ R()

template<class T>
T vil_rgba< T >::R ( ) const
inline

Definition at line 33 of file vil_rgba.h.

Member Data Documentation

◆ a

template<class T>
T vil_rgba< T >::a

Definition at line 32 of file vil_rgba.h.

◆ b

template<class T>
T vil_rgba< T >::b

Definition at line 32 of file vil_rgba.h.

◆ g

template<class T>
T vil_rgba< T >::g

Definition at line 32 of file vil_rgba.h.

◆ r

template<class T>
T vil_rgba< T >::r

Definition at line 32 of file vil_rgba.h.


The documentation for this struct was generated from the following files: