It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neighbor, Bilinear, and Bicubic.  
 More...
#include <Interpolator.h>
 | 
| 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...
  | 
|   | 
| bool  | initialize (Raster const *const rasterPointer, int method, const std::vector< std::complex< double > > &noDataValues) | 
|   | Initialize this instance..  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 54 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 158 of file Interpolator.h.
 
 
Allowed interpolation methods. 
| Enumerator | 
|---|
| NearestNeighbor  | 
 Near neighborhood interpolation method.  
 | 
| Bilinear  | 
 Bilinear interpolation method.  
 | 
| Bicubic  | 
 Bicubic interpolation method.  
 | 
Definition at line 61 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 49 of file Interpolator.cpp.
References initialize().
 
 
      
        
          | te::rst::Interpolator::Interpolator  | 
          ( | 
          Raster const *  | 
          r,  | 
        
        
           | 
           | 
          int  | 
          m,  | 
        
        
           | 
           | 
          const std::vector< std::complex< double > > &  | 
          noDataValues  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | r | The raster where to resample.  | 
    | m | The method of interpolation to apply.  | 
    | noDataValues | A vector with no-data values (will overwride the input raster no-data values) or an empty vectory if the input raster no-data values must be used.  | 
  
   
Definition at line 57 of file Interpolator.cpp.
 
 
  
  
      
        
          | 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 initialize().
 
 
  
  
      
        
          | 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 106 of file Interpolator.cpp.
Referenced by initialize().
 
 
Create a clone copy of this instance. 
- Returns
 - A clone copy of this instance (the caller of this method must take the ownership of the returned object). 
 
Definition at line 85 of file Interpolator.cpp.
 
 
  
  
      
        
          | 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 71 of file Interpolator.cpp.
Referenced by te::rst::Raster::resample().
 
 
  
  
      
        
          | bool te::rst::Interpolator::initialize  | 
          ( | 
          Raster const *const  | 
          rasterPointer,  | 
         
        
           | 
           | 
          int  | 
          method,  | 
         
        
           | 
           | 
          const std::vector< std::complex< double > > &  | 
          noDataValues  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | 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 91 of file Interpolator.cpp.
References te::rst::Round().
Referenced by initialize().
 
 
  
  
      
        
          | 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   | 
  
 
Last column available for bicubic interpolation. 
Definition at line 222 of file Interpolator.h.
 
 
  
  
      
        
          | 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_bicReadImagValue | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bicReadRealValue | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bicRowAccumImag | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bicRowAccumReal | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bicRowBound | 
         
       
   | 
  
protected   | 
  
 
Last row available for bicubic interpolation. 
Definition at line 221 of file Interpolator.h.
 
 
  
  
      
        
          | 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 194 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColDifMin | 
         
       
   | 
  
protected   | 
  
 
Minimum difference between columns (min/max). 
Definition at line 193 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColMax | 
         
       
   | 
  
protected   | 
  
 
Maximum column for bilinear interpolation. 
Definition at line 190 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColMin | 
         
       
   | 
  
protected   | 
  
 
Minimum column for bilinear interpolation. 
Definition at line 189 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilDistances[4] | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilLastCol | 
         
       
   | 
  
protected   | 
  
 
Last column available for bilinear interpolation. 
Definition at line 199 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilLastRow | 
         
       
   | 
  
protected   | 
  
 
Last row available for bilinear interpolation. 
Definition at line 198 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowDifMax | 
         
       
   | 
  
protected   | 
  
 
Maximum difference between rows (min/max). 
Definition at line 192 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowDifMin | 
         
       
   | 
  
protected   | 
  
 
Minimum difference between rows (min/max). 
Definition at line 191 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowMax | 
         
       
   | 
  
protected   | 
  
 
Maximum row for bilinear interpolation. 
Definition at line 188 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowMin | 
         
       
   | 
  
protected   | 
  
 
Minimum row for bilinear interpolation. 
Definition at line 187 of file Interpolator.h.
 
 
  
  
      
        
          | std::vector<std::complex<double> > te::rst::Interpolator::m_bilValues | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilWeights[4] | 
         
       
   | 
  
protected   | 
  
 
 
The current interpolation function pointer. 
Definition at line 175 of file Interpolator.h.
 
 
  
  
      
        
          | int te::rst::Interpolator::m_method | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | unsigned int te::rst::Interpolator::m_nnCR | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | double te::rst::Interpolator::m_nnLastCol | 
         
       
   | 
  
protected   | 
  
 
Last column available for nearest Neighbor interpolation. 
Definition at line 183 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_nnLastRow | 
         
       
   | 
  
protected   | 
  
 
Last row available for nearest Neighbor interpolation. 
Definition at line 182 of file Interpolator.h.
 
 
  
  
      
        
          | unsigned int te::rst::Interpolator::m_nnRR | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | std::vector< std::complex<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: