refinery
RAW file processor
Public Types | Public Member Functions

refinery::GammaCurve< T > Class Template Reference

A gamma curve, mapping input scalars to output scalars. More...

#include <refinery/gamma.h>

List of all members.

Public Types

typedef std::vector< T > CurveType
 Color value type.

Public Member Functions

 GammaCurve (double pwr, double ts, T max)
 Constructor.
template<typename HistogramType >
 GammaCurve (const HistogramType &histogram)
 Constructor.
 GammaCurve (const GammaCurve &rhs)
 Copy constructor.
const T & at (const T &in) const
 Gamma-correct a color value.

Detailed Description

template<typename T>
class refinery::GammaCurve< T >

A gamma curve, mapping input scalars to output scalars.

The GammaCurve is pre-calculated into a lookup table during construction, after which any scalar can be converted using at().

Template Parameters:
TColor value type, see Image::ValueType.
See also:
GammaFilter
Examples:

util/raw2ppm.cc.

Definition at line 20 of file gamma.h.


Member Typedef Documentation

template<typename T>
typedef std::vector<T> refinery::GammaCurve< T >::CurveType

Color value type.

Definition at line 22 of file gamma.h.


Constructor & Destructor Documentation

template<typename T>
refinery::GammaCurve< T >::GammaCurve ( double  pwr,
double  ts,
max 
) [inline]

Constructor.

Parameters:
[in]pwrGamma exponent, for instance 0.45.
[in]tsI don't know.
[in]maxLowest input value corresponding to max.

Definition at line 78 of file gamma.h.

template<typename T>
template<typename HistogramType >
refinery::GammaCurve< T >::GammaCurve ( const HistogramType &  histogram) [inline]

Constructor.

This uses the Histogram-supplied image data to decide on GammaCurve parameters so that when the GammaCurve is applied (through GammaFilter) to the original image, 1% of the output image will be white.

The supplied histogram doesn't need to be around for the lifetime of this object.

Parameters:
[in]histogramHistogram to analyze to calculate curve.
Template Parameters:
HistogramTypeType of histogram (usually inferred).

Definition at line 95 of file gamma.h.

template<typename T>
refinery::GammaCurve< T >::GammaCurve ( const GammaCurve< T > &  rhs) [inline]

Copy constructor.

Parameters:
rhsOther GammaCurve, to be deep-copied.

Definition at line 122 of file gamma.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator