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 55 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 156 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.  | 
  
   
 
 
      
        
          | 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.  | 
  
   
 
 
  
  
      
        
          | virtual 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.  | 
  
   
 
 
  
  
      
        
          | 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.  | 
  
   
 
 
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). 
 
 
 
  
  
      
        
          | void te::rst::Interpolator::getValue  | 
          ( | 
          const double &  | 
          c,  | 
         
        
           | 
           | 
          const double &  | 
          r,  | 
         
        
           | 
           | 
          std::complex< double > &  | 
          v,  | 
         
        
           | 
           | 
          const std::size_t &  | 
          b  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Get the interpolated value at specific band. 
- Parameters
 - 
  
    | c | The column position (double).  | 
    | r | The row position (double).  | 
    | v | The output value or the current input raster no-data value if the requested coordinates are outside the valid image bounds.  | 
    | b | The band to obtain the value.  | 
  
   
- Note
 - The caller of this method must be aware that the returned value may be outside the original input rasters valid values range. 
 
Definition at line 93 of file Interpolator.h.
 
 
      
        
          | 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..  | 
  
   
- Note
 - The caller of this method must be aware that the returned values may be outside the original input rasters valid values range. 
 
 
 
  
  
      
        
          | bool te::rst::Interpolator::initialize  | 
          ( | 
          Raster const *const  | 
          rasterPointer,  | 
         
        
           | 
           | 
          int  | 
          method,  | 
         
        
           | 
           | 
          const std::vector< std::complex< double > > &  | 
          noDataValues  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Initialize this instance.. 
- Parameters
 - 
  
    | r | The raster where to resample.  | 
    | method | 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.  | 
  
   
- Returns
 - true if OK, false on errors. 
 
 
 
  
  
      
        
          | 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.  | 
  
   
 
 
  
  
      
        
          | 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 220 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 219 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 192 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColDifMin | 
         
       
   | 
  
protected   | 
  
 
Minimum difference between columns (min/max). 
Definition at line 191 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColMax | 
         
       
   | 
  
protected   | 
  
 
Maximum column for bilinear interpolation. 
Definition at line 188 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilColMin | 
         
       
   | 
  
protected   | 
  
 
Minimum column for bilinear interpolation. 
Definition at line 187 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 197 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilLastRow | 
         
       
   | 
  
protected   | 
  
 
Last row available for bilinear interpolation. 
Definition at line 196 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowDifMax | 
         
       
   | 
  
protected   | 
  
 
Maximum difference between rows (min/max). 
Definition at line 190 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowDifMin | 
         
       
   | 
  
protected   | 
  
 
Minimum difference between rows (min/max). 
Definition at line 189 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowMax | 
         
       
   | 
  
protected   | 
  
 
Maximum row for bilinear interpolation. 
Definition at line 186 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_bilRowMin | 
         
       
   | 
  
protected   | 
  
 
Minimum row for bilinear interpolation. 
Definition at line 185 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 173 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 181 of file Interpolator.h.
 
 
  
  
      
        
          | double te::rst::Interpolator::m_nnLastRow | 
         
       
   | 
  
protected   | 
  
 
Last row available for nearest Neighbor interpolation. 
Definition at line 180 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 file:
- /home/castejon/castejon_files/develop/terralib5/git_master/terralib5/src/terralib/raster/Interpolator.h