Classes | Defines | Functions | Variables
core/vil/vil_rgb.h File Reference

Pixel type for 24 bit images. More...

#include <vcl_iostream.h>

Go to the source code of this file.

Classes

struct  vil_rgb< T >
 This is the appropriate pixel type for 24-bit colour images. More...

Defines

#define InLine
#define vil_rgb_call(m)
#define macro(S)
#define macro(S)   InLine vil_rgb<T>& operator=(vil_rgb<S > const& that);
#define macro(S)
#define VIL_RGB_INSTANTIATE(T)   extern "you must include vil/vil_rgb.txx first."
#define VIL_RGB_INSTANTIATE_LS(T)   extern "you must include vil/vil_rgb.txx first."

Functions

 vil_rgb_call (macro) template< class T > inline vcl_ostream &operator<<(vcl_ostream &s
template<class T >
bool operator!= (vil_rgb< T > const &a, vil_rgb< T > const &b)
template<class T >
vil_rgb< T > average (vil_rgb< T > const &a, vil_rgb< T > const &b)
template<class T >
vil_rgb< T > operator+ (vil_rgb< T > const &a, vil_rgb< T > const &b)
template<class T >
vil_rgb< T > operator* (vil_rgb< T > const &a, vil_rgb< T > const &b)
template<class T >
vil_rgb< double > operator* (double b, vil_rgb< T > const &a)
template<class T >
vil_rgb< double > operator* (vil_rgb< T > const &a, double b)
template<class T >
vil_rgb< double > operator/ (vil_rgb< T > const &a, double b)

Variables

vil_rgb< T > const &rgb return
s<< '['<< rgb.r
<< ' '<< rgb.g<< ' '<< rgb.b
<< ']';}VCL_DEFINE_SPECIALIZATIONvcl_ostream
&operator<<(vcl_ostream &s,
vil_rgb< unsigned char > const & 
rgb

Detailed Description

Pixel type for 24 bit images.

Currently also includes the following `utilities':

Author:
Peter Vanroose, K.U.Leuven, ESAT/VISICS
Date:
15 nov. 1997
    Modifications:
      250198 AWF Templated.
      250198 AWF Modified to make POD struct until gcc inlines when debugging.
      160298 PCP Removed underscore from public members.
      290798 AWF Member templates for fancy compilers
      220598 PVr moved instantiations files to Templates subdirectory.
      050598 PVr added several operators ( + += - -= (T) ).
      140898 David Capel added clamping functions to ensure 0-255 range on bytes and vil_rgb<byte>
      090600 David Capel made clamping functions inline and removed all that partial specialization nonsense from the .txx file.
     Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
  

Definition in file vil_rgb.h.


Define Documentation

#define InLine

Definition at line 37 of file vil_rgb.h.

#define macro (   S)
Value:
inline vil_rgb(vil_rgb<S > const& that) : \
  r(T(that.r)), \
  g(T(that.g)), \
  b(T(that.b)) {}

Definition at line 130 of file vil_rgb.h.

#define macro (   S)    InLine vil_rgb<T>& operator=(vil_rgb<S > const& that);

Definition at line 130 of file vil_rgb.h.

#define macro (   S)
Value:
template <class T> inline \
vil_rgb<T>& vil_rgb<T>::operator=(vil_rgb<S > const& that) { \
  r=T(that.r); \
  g=T(that.g); \
  b=T(that.b); \
  return *this; \
}

Definition at line 130 of file vil_rgb.h.

#define vil_rgb_call (   m)
Value:
m(unsigned char) \
m(int) \
m(long) \
m(double)

Definition at line 90 of file vil_rgb.h.

#define VIL_RGB_INSTANTIATE (   T)    extern "you must include vil/vil_rgb.txx first."

Definition at line 207 of file vil_rgb.h.

#define VIL_RGB_INSTANTIATE_LS (   T)    extern "you must include vil/vil_rgb.txx first."

Definition at line 209 of file vil_rgb.h.


Function Documentation

template<class T >
vil_rgb<T> average ( vil_rgb< T > const &  a,
vil_rgb< T > const &  b 
) [inline]

Definition at line 167 of file vil_rgb.h.

template<class T >
bool operator!= ( vil_rgb< T > const &  a,
vil_rgb< T > const &  b 
) [inline]

Definition at line 160 of file vil_rgb.h.

template<class T >
vil_rgb<T> operator* ( vil_rgb< T > const &  a,
vil_rgb< T > const &  b 
) [inline]

Definition at line 181 of file vil_rgb.h.

template<class T >
vil_rgb<double> operator* ( double  b,
vil_rgb< T > const &  a 
) [inline]

Definition at line 188 of file vil_rgb.h.

template<class T >
vil_rgb<double> operator* ( vil_rgb< T > const &  a,
double  b 
) [inline]

Definition at line 195 of file vil_rgb.h.

template<class T >
vil_rgb<T> operator+ ( vil_rgb< T > const &  a,
vil_rgb< T > const &  b 
) [inline]

Definition at line 174 of file vil_rgb.h.

template<class T >
vil_rgb<double> operator/ ( vil_rgb< T > const &  a,
double  b 
) [inline]

Definition at line 202 of file vil_rgb.h.

vil_rgb_call ( macro  )

Variable Documentation

vil_rgb<T> const& rgb return s<< '[' << rgb.r << ' ' << rgb.g << ' ' << rgb.b << ']';}VCL_DEFINE_SPECIALIZATIONvcl_ostream& operator<<(vcl_ostream& s, vil_rgb<unsigned char> const& rgb

Definition at line 153 of file vil_rgb.h.