It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neighbor, Bilinear, and Bicubic.
More...
#include <Interpolator.h>
|
void | getValue (const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
| Get the interpolated value at specific band. More...
|
|
void | getValues (const double &c, const double &r, std::vector< std::complex< double > > &values) |
| Get the interpolated value for all bands. More...
|
|
| Interpolator (Raster const *r, int m) |
| Constructor. More...
|
|
virtual | ~Interpolator () |
| Destructor. More...
|
|
|
typedef void(Interpolator::* | InterpolationFunction )(const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
| Type definition for the interpolation function. More...
|
|
|
void | bicubicGetValue (const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
| Bicubic interpolation method. More...
|
|
void | bilinearGetValue (const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
| Bilinear interpolation method. More...
|
|
void | nearestNeighborGetValue (const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
| Nearest neighbor interpolation method. More...
|
|
It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neighbor, Bilinear, and Bicubic.
Definition at line 51 of file Interpolator.h.
typedef void(Interpolator::* te::rst::Interpolator::InterpolationFunction)(const double &c, const double &r, std::complex< double > &v, const std::size_t &b) |
|
protected |
Type definition for the interpolation function.
- Parameters
-
c | The column position (double). |
r | The row position (double). |
v | The output value. |
b | The band to obtain the value. |
Definition at line 139 of file Interpolator.h.
Allowed interpolation methods.
Enumerator |
---|
NearestNeighbor |
Near neighborhood interpolation method.
|
Bilinear |
Bilinear interpolation method.
|
Bicubic |
Bicubic interpolation method.
|
Definition at line 58 of file Interpolator.h.
te::rst::Interpolator::Interpolator |
( |
Raster const * |
r, |
|
|
int |
m |
|
) |
| |
Constructor.
- Parameters
-
r | The raster where to resample. |
m | The method of interpolation to apply. |
Definition at line 48 of file Interpolator.cpp.
References Bicubic, bicubicGetValue(), Bilinear, bilinearGetValue(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), m_bicColBound, m_bicKernel, m_bicRowBound, m_bilLastCol, m_bilLastRow, m_bilValues, m_function, m_method, m_nnLastCol, m_nnLastRow, te::rst::BandProperty::m_noDataValue, m_noDataValues, m_raster, NearestNeighbor, and nearestNeighborGetValue().
te::rst::Interpolator::~Interpolator |
( |
| ) |
|
|
virtual |
void te::rst::Interpolator::bicubicGetValue |
( |
const double & |
c, |
|
|
const double & |
r, |
|
|
std::complex< double > & |
v, |
|
|
const std::size_t & |
b |
|
) |
| |
|
protected |
Bicubic interpolation method.
- Parameters
-
c | The column position (double). |
r | The row position (double). |
v | The output value. |
b | The band to obtain the value. |
Definition at line 177 of file Interpolator.cpp.
References BICUBIC_KERNEL.
Referenced by Interpolator().
void te::rst::Interpolator::bilinearGetValue |
( |
const double & |
c, |
|
|
const double & |
r, |
|
|
std::complex< double > & |
v, |
|
|
const std::size_t & |
b |
|
) |
| |
|
protected |
Bilinear interpolation method.
- Parameters
-
c | The column position (double). |
r | The row position (double). |
v | The output value. |
b | The band to obtain the value. |
Definition at line 124 of file Interpolator.cpp.
Referenced by Interpolator().
void te::rst::Interpolator::getValue |
( |
const double & |
c, |
|
|
const double & |
r, |
|
|
std::complex< double > & |
v, |
|
|
const std::size_t & |
b |
|
) |
| |
|
inline |
void te::rst::Interpolator::getValues |
( |
const double & |
c, |
|
|
const double & |
r, |
|
|
std::vector< std::complex< double > > & |
values |
|
) |
| |
Get the interpolated value for all bands.
- Parameters
-
c | The column position (double). |
r | The row position (double). |
v | A vector of values, for all bands, or the current input raster no-data values if the requested coordinates are outside the valid image bounds.. |
Definition at line 95 of file Interpolator.cpp.
Referenced by te::rst::Raster::resample().
void te::rst::Interpolator::nearestNeighborGetValue |
( |
const double & |
c, |
|
|
const double & |
r, |
|
|
std::complex< double > & |
v, |
|
|
const std::size_t & |
b |
|
) |
| |
|
protected |
Nearest neighbor interpolation method.
- Parameters
-
c | The column position (double). |
r | The row position (double). |
v | The output value. |
b | The band to obtain the value. |
Definition at line 109 of file Interpolator.cpp.
References te::rst::Round().
Referenced by Interpolator().
double te::rst::Interpolator::m_bicBbufferImag[4][4] |
|
protected |
double te::rst::Interpolator::m_bicBbufferReal[4][4] |
|
protected |
unsigned te::rst::Interpolator::m_bicBufCol |
|
protected |
unsigned te::rst::Interpolator::m_bicBufRow |
|
protected |
double te::rst::Interpolator::m_bicColBound |
|
protected |
unsigned te::rst::Interpolator::m_bicGridCol |
|
protected |
unsigned te::rst::Interpolator::m_bicGridRow |
|
protected |
double te::rst::Interpolator::m_bicHSum |
|
protected |
double te::rst::Interpolator::m_bicHWeights[4] |
|
protected |
double te::rst::Interpolator::m_bicKernel |
|
protected |
double te::rst::Interpolator::m_bicOffsetX |
|
protected |
double te::rst::Interpolator::m_bicOffsetY |
|
protected |
double te::rst::Interpolator::m_bicRowAccumImag |
|
protected |
double te::rst::Interpolator::m_bicRowAccumReal |
|
protected |
double te::rst::Interpolator::m_bicRowBound |
|
protected |
double te::rst::Interpolator::m_bicRowsValuesImag[4] |
|
protected |
double te::rst::Interpolator::m_bicRowsValuesReal[4] |
|
protected |
double te::rst::Interpolator::m_bicVSum |
|
protected |
double te::rst::Interpolator::m_bicVWeights[4] |
|
protected |
double te::rst::Interpolator::m_bilColDifMax |
|
protected |
Maximum difference between columns (min/max).
Definition at line 164 of file Interpolator.h.
double te::rst::Interpolator::m_bilColDifMin |
|
protected |
Minimum difference between columns (min/max).
Definition at line 163 of file Interpolator.h.
double te::rst::Interpolator::m_bilColMax |
|
protected |
Maximum column for bilinear interpolation.
Definition at line 160 of file Interpolator.h.
double te::rst::Interpolator::m_bilColMin |
|
protected |
Minimum column for bilinear interpolation.
Definition at line 159 of file Interpolator.h.
double te::rst::Interpolator::m_bilDistances[4] |
|
protected |
double te::rst::Interpolator::m_bilLastCol |
|
protected |
double te::rst::Interpolator::m_bilLastRow |
|
protected |
double te::rst::Interpolator::m_bilRowDifMax |
|
protected |
Maximum difference between rows (min/max).
Definition at line 162 of file Interpolator.h.
double te::rst::Interpolator::m_bilRowDifMin |
|
protected |
Minimum difference between rows (min/max).
Definition at line 161 of file Interpolator.h.
double te::rst::Interpolator::m_bilRowMax |
|
protected |
Maximum row for bilinear interpolation.
Definition at line 158 of file Interpolator.h.
double te::rst::Interpolator::m_bilRowMin |
|
protected |
Minimum row for bilinear interpolation.
Definition at line 157 of file Interpolator.h.
std::vector<std::complex<double> > te::rst::Interpolator::m_bilValues |
|
protected |
double te::rst::Interpolator::m_bilWeights[4] |
|
protected |
int te::rst::Interpolator::m_method |
|
protected |
unsigned int te::rst::Interpolator::m_nnCR |
|
protected |
double te::rst::Interpolator::m_nnLastCol |
|
protected |
double te::rst::Interpolator::m_nnLastRow |
|
protected |
unsigned int te::rst::Interpolator::m_nnRR |
|
protected |
std::vector< double > te::rst::Interpolator::m_noDataValues |
|
protected |
Raster const* te::rst::Interpolator::m_raster |
|
protected |
The documentation for this class was generated from the following files:
- /home/castejon/castejon_files/develop/terralib5/git/src/terralib/raster/Interpolator.h
- /home/castejon/castejon_files/develop/terralib5/git/src/terralib/raster/Interpolator.cpp