LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | List of all members
lsst::ip::isr::LookupTableMultiplicative< ImageT > Class Template Reference

#include <isr.h>

Public Types

typedef
lsst::afw::image::MaskedImage
< ImageT >::x_iterator 
x_iterator
 
typedef
lsst::afw::image::MaskedImage
< ImageT >::Pixel 
PixelT
 

Public Member Functions

 LookupTableMultiplicative (std::vector< double > table)
 
virtual ~LookupTableMultiplicative ()
 
void apply (lsst::afw::image::MaskedImage< ImageT > &image, float gain=1.0)
 
std::vector< double > getTable () const
 

Private Attributes

std::vector< double > _table
 
int _max
 

Detailed Description

template<typename ImageT>
class lsst::ip::isr::LookupTableMultiplicative< ImageT >

Multiplicative linearization lookup table

Definition at line 106 of file isr.h.

Member Typedef Documentation

template<typename ImageT >
typedef lsst::afw::image::MaskedImage<ImageT>::Pixel lsst::ip::isr::LookupTableMultiplicative< ImageT >::PixelT

Definition at line 109 of file isr.h.

template<typename ImageT >
typedef lsst::afw::image::MaskedImage<ImageT>::x_iterator lsst::ip::isr::LookupTableMultiplicative< ImageT >::x_iterator

Definition at line 108 of file isr.h.

Constructor & Destructor Documentation

template<typename ImageT >
lsst::ip::isr::LookupTableMultiplicative< ImageT >::LookupTableMultiplicative ( std::vector< double >  table)
inline

Definition at line 111 of file isr.h.

111  :
112  _table(table), _max(table.size()) {};
std::vector< double > _table
Definition: isr.h:135
template<typename ImageT >
virtual lsst::ip::isr::LookupTableMultiplicative< ImageT >::~LookupTableMultiplicative ( )
inlinevirtual

Definition at line 113 of file isr.h.

113 {};

Member Function Documentation

template<typename ImageT >
void lsst::ip::isr::LookupTableMultiplicative< ImageT >::apply ( lsst::afw::image::MaskedImage< ImageT > &  image,
float  gain = 1.0 
)
inline

Definition at line 115 of file isr.h.

115  {
116 
117  for (int y = 0; y != image.getHeight(); ++y) {
118  for (x_iterator ptr = image.row_begin(y), end = image.row_end(y); ptr != end; ++ptr) {
119  int ind = static_cast<int>(ptr.image() + 0.5); // Rounded pixel value
120  if (ind >= _max){
122  "Pixel value out of range in LookupTableMultiplicative::apply");
123  }
124  PixelT p = PixelT((*ptr).image() * _table[ind],
125  (*ptr).mask(),
126  (*ptr).variance() * _table[ind] * _table[ind]);
127  *ptr = p;
128  }
129  }
130  }
int y
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:742
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:903
lsst::afw::image::MaskedImage< ImageT >::x_iterator x_iterator
Definition: isr.h:108
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:752
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
std::vector< double > _table
Definition: isr.h:135
lsst::afw::image::MaskedImage< ImageT >::Pixel PixelT
Definition: isr.h:109
template<typename ImageT >
std::vector<double> lsst::ip::isr::LookupTableMultiplicative< ImageT >::getTable ( ) const
inline

Definition at line 133 of file isr.h.

133 { return _table; }
std::vector< double > _table
Definition: isr.h:135

Member Data Documentation

template<typename ImageT >
int lsst::ip::isr::LookupTableMultiplicative< ImageT >::_max
private

Definition at line 136 of file isr.h.

template<typename ImageT >
std::vector<double> lsst::ip::isr::LookupTableMultiplicative< ImageT >::_table
private

Definition at line 135 of file isr.h.


The documentation for this class was generated from the following file: