Go to the documentation of this file.
   26 #ifndef __TERRALIB_RASTER_INTERNAL_INTERPOLATOR_H 
   27 #define __TERRALIB_RASTER_INTERNAL_INTERPOLATOR_H 
   38 #include <boost/noncopyable.hpp> 
   90           const unsigned int windowRadius );
 
  104         inline void getValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b)
 
  106           assert(b < m_raster->getNumberOfBands());
 
  107           (this->*(m_function))(c, r, v, b);
 
  118         void getValues(
const double& c, 
const double& r, std::vector<std::complex<double> >& values);
 
  135           std::vector< std::pair< te::rst::InterpolationMethod, std::string > >& info );
 
  147         typedef void (
Interpolator::*InterpolationFunction)(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);        
 
  167         void bilinearGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  177         void bicubicGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  187         void meanGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  197         void minGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  207         void maxGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  217         void modeGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);
 
  227         void medianGetValue(
const double& c, 
const double& r, std::complex<double>& v, 
const std::size_t& b);        
 
  239           const std::vector< std::complex<double> >& noDataValues,
 
  240           const unsigned int windowRadius );        
 
  269         double m_bilDistances[4];                          
 
  270         double m_bilWeights[4];                            
 
  282         double m_bicBbufferReal[4][4];
 
  283         double m_bicBbufferImag[4][4];
 
  287         double m_bicHWeights[4];
 
  288         double m_bicVWeights[4];
 
  293         double m_bicRowsValuesReal[4];
 
  294         double m_bicRowsValuesImag[4];
 
  317 #endif  // __TERRALIB_RASTER_INTERNAL_INTERPOLATOR_H 
  
 
void medianGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Median interpolation method.
 
Raster implementaton for TerraLib 4.x.
 
void getValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Get the interpolated value at specific band.
 
void bilinearGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Bilinear interpolation method.
 
void minGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Min interpolation method.
 
std::vector< std::complex< double > > m_wInterpAuxCValues
 
void nearestNeighborGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Nearest neighbor interpolation method.
 
te::rst::Interpolator * clone() const
Create a clone copy of this instance.
 
InterpolationFunction m_function
The current interpolation function pointer.
 
An abstract class for raster data strucutures.
 
double m_bilLastCol
Last column available for bilinear interpolation.
 
void maxGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Max interpolation method.
 
static void getInterpMethodsInfo(std::vector< std::pair< te::rst::InterpolationMethod, std::string > > &info)
 
std::complex< double > m_wInterpAuxCValue
 
unsigned int m_rasterNRows
Last raster row index.
 
long int m_wInterpWindowCol
 
void modeGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Mode interpolation method.
 
Interpolator(Raster const *r, int m, const std::vector< std::complex< double > > &noDataValues, const unsigned int windowRadius)
Constructor.
 
double m_bilColDifMin
Minimum difference between columns (min/max).
 
long int m_wInterpWindowRow
 
double m_bilLastRow
Last row available for bilinear interpolation.
 
InterpolationMethod Method
Allowed interpolation methods.
 
double m_bilColMin
Minimum column for bilinear interpolation.
 
unsigned int m_windowRadius
Interpolator windows radius around the target pixel (when applicable).
 
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
 
unsigned int getWindowRadius() const
Get the interpolator windows radius around the target pixel (when applicable).
 
double m_nnLastCol
Last column available for nearest Neighbor interpolation.
 
double m_bicColBound
Last column available for bicubic interpolation.
 
Enumerations of XML module.
 
InterpolationMethod
Allowed interpolation methods.
 
std::vector< std::complex< double > > m_bilValues
Bilinear values;.
 
double m_bilRowMin
Minimum row for bilinear interpolation.
 
std::vector< unsigned int > m_wInterpAuxCValuesFreq
 
double m_bicReadRealValue
 
long int m_wInterpWindowRowsBound
 
double m_nnLastRow
Last row available for nearest Neighbor interpolation.
 
std::size_t m_wInterpAuxCValuesIdx
 
virtual ~Interpolator()
Destructor.
 
Interpolator(Raster const *r, int m)
Constructor.
 
double m_bilRowMax
Maximum row for bilinear interpolation.
 
double m_bicRowBound
Last row available for bicubic interpolation.
 
Interpolator(Raster const *r, int m, const std::vector< std::complex< double > > &noDataValues)
Constructor.
 
bool initialize(Raster const *const rasterPointer, int method, const std::vector< std::complex< double > > &noDataValues, const unsigned int windowRadius)
Initialize this instance..
 
It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neig...
 
double m_bilColDifMax
Maximum difference between columns (min/max).
 
Raster const  * m_raster
My input raster.
 
void meanGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Mean interpolation method.
 
double m_bicReadImagValue
 
unsigned int m_rasterNCols
Last raster column index.
 
double m_bilColMax
Maximum column for bilinear interpolation.
 
std::vector< std::complex< double > > m_noDataValues
Raster no-data values (for each band);.
 
long int m_wInterpWindowColsBound
 
long int m_wInterpWindowFirstRow
 
void bicubicGetValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Bicubic interpolation method.
 
long int m_wInterpWindowFirstCol
 
std::size_t m_wInterpAuxCValuesSize
 
double m_bilRowDifMax
Maximum difference between rows (min/max).
 
unsigned int m_wInterpWindowValidElementsCount
 
int m_method
The interpolation method.
 
double m_bilRowDifMin
Minimum difference between rows (min/max).
 
void getValues(const double &c, const double &r, std::vector< std::complex< double > > &values)
Get the interpolated value for all bands.