Classes | Macros | Functions
vil_rgb.h File Reference

Pixel type for 24 bit images. More...

#include <iostream>

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...
 

Macros

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

Functions

template<class T >
std::ostream & operator<< (std::ostream &s, vil_rgb< T > const &rgb)
 
template<>
std::ostream & operator<< (std::ostream &s, vil_rgb< unsigned char > const &rgb)
 
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)
 

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 .hxx file.
   Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line

Definition in file vil_rgb.h.

Macro Definition Documentation

◆ VIL_RGB_INSTANTIATE

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

Definition at line 160 of file vil_rgb.h.

◆ VIL_RGB_INSTANTIATE_LS

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

Definition at line 162 of file vil_rgb.h.

Function Documentation

◆ average()

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

Definition at line 120 of file vil_rgb.h.

◆ operator *() [1/3]

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

Definition at line 134 of file vil_rgb.h.

◆ operator *() [2/3]

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

Definition at line 141 of file vil_rgb.h.

◆ operator *() [3/3]

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

Definition at line 148 of file vil_rgb.h.

◆ operator!=()

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

Definition at line 113 of file vil_rgb.h.

◆ operator+()

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

Definition at line 127 of file vil_rgb.h.

◆ operator/()

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

Definition at line 155 of file vil_rgb.h.

◆ operator<<() [1/2]

template<class T >
std::ostream& operator<< ( std::ostream &  s,
vil_rgb< T > const &  rgb 
)
inline

Definition at line 100 of file vil_rgb.h.

◆ operator<<() [2/2]

template<>
std::ostream& operator<< ( std::ostream &  s,
vil_rgb< unsigned char > const &  rgb 
)