OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | List of all members
ossimDiscreteNearestNeighbor Class Reference

#include <ossimDiscreteNearestNeighbor.h>

Inheritance diagram for ossimDiscreteNearestNeighbor:
ossimDiscreteConvolutionKernel

Public Member Functions

 ossimDiscreteNearestNeighbor ()
 
virtual void convolveFloat (const float *data, double &result) const
 
virtual void convolveSubImageFloat (const float *data, long, double &result) const
 
virtual void convolveDouble (const double *data, double &result) const
 
virtual void convolveSubImageDouble (const double *data, long, double &result) const
 
virtual void convolveUchar (const unsigned char *data, double &result) const
 
virtual void convolveSubImageUchar (const unsigned char *data, long, double &result) const
 
virtual void convolveSshort (const short *data, double &result) const
 
virtual void convolveSubImageSshort (const short *data, long, double &result) const
 
virtual void convolveUshort (const unsigned short *data, double &result) const
 
virtual void convolveSubImageUshort (const unsigned short *data, long, double &result) const
 
virtual void buildConvolution (double, double)
 
- Public Member Functions inherited from ossimDiscreteConvolutionKernel
 ossimDiscreteConvolutionKernel (long width, long height, bool doWeightedAverage=true)
 
 ossimDiscreteConvolutionKernel (const NEWMAT::Matrix &kernel, bool doWeightedAverage=true)
 
virtual ~ossimDiscreteConvolutionKernel ()
 
virtual void setKernel (const NEWMAT::Matrix &kernel)
 
virtual void convolve (const float *data, double &result, float nullPixel=OSSIM_DEFAULT_NULL_PIX_FLOAT) const
 
virtual void convolveSubImage (const float *data, long dataWidth, double &result, float nullPixel=OSSIM_DEFAULT_NULL_PIX_FLOAT) const
 
virtual void convolve (const double *data, double &result, double nullPixel=OSSIM_DEFAULT_NULL_PIX_DOUBLE) const
 
virtual void convolveSubImage (const double *data, long dataWidth, double &result, double nullPixel=OSSIM_DEFAULT_NULL_PIX_DOUBLE) const
 
virtual void convolve (const short *data, double &result, ossim_sint16 nullPixel=OSSIM_DEFAULT_NULL_PIX_SINT16) const
 
virtual void convolveSubImage (const short *data, long dataWidth, double &result, ossim_sint16 nullPixel=OSSIM_DEFAULT_NULL_PIX_SINT16) const
 
virtual void convolve (const unsigned short *data, double &result, ossim_uint16 nullPixel=OSSIM_DEFAULT_NULL_PIX_UINT16) const
 
virtual void convolveSubImage (const unsigned short *data, long dataWidth, double &result, ossim_uint16 nullPixel=OSSIM_DEFAULT_NULL_PIX_UINT16) const
 
virtual void convolve (const unsigned char *data, double &result, ossim_uint8 nullPixel=OSSIM_DEFAULT_NULL_PIX_UINT8) const
 
virtual void convolveSubImage (const unsigned char *data, long dataWidth, double &result, ossim_uint8 nullPixel=OSSIM_DEFAULT_NULL_PIX_UINT8) const
 
virtual long getWidth () const
 
virtual long getHeight () const
 
const NEWMAT::Matrix & getKernel () const
 

Additional Inherited Members

- Static Public Member Functions inherited from ossimDiscreteConvolutionKernel
static void buildSymmetric (const std::vector< float > &coefficients, NEWMAT::Matrix &result)
 
static void buildSymmetric (float *coefficients, long size, NEWMAT::Matrix &result)
 
- Protected Attributes inherited from ossimDiscreteConvolutionKernel
NEWMAT::Matrix * theKernel
 
long theWidth
 
long theHeight
 
bool theComputeWeightedAverageFlag
 

Detailed Description

Definition at line 14 of file ossimDiscreteNearestNeighbor.h.

Constructor & Destructor Documentation

◆ ossimDiscreteNearestNeighbor()

ossimDiscreteNearestNeighbor::ossimDiscreteNearestNeighbor ( )
inline

Definition at line 17 of file ossimDiscreteNearestNeighbor.h.

19  {
20 
21  }
ossimDiscreteConvolutionKernel(long width, long height, bool doWeightedAverage=true)

Member Function Documentation

◆ buildConvolution()

virtual void ossimDiscreteNearestNeighbor::buildConvolution ( double  ,
double   
)
inlinevirtual

This is used to allow me to continually adjust a convolution kernel based on where it center lies on a pixel. The xLocation and yLocation are all from the center of pixel. If I am convolving at full resolution then xLocation and yLocation should both be 0. Let's pretend that we contract an image by .5 scale factor or zooming out by a factor of 2. Then we actually of it .5 off from cneter of pixel in both the x and y direction. This information can be used to allow a kernel to adjust it's waits accordingly.

Typically if the xLocation and yLocation is directly on the center indicated by 0 vor both then the kernel defaults to 1 in the middle and all other weights are zero.

Reimplemented from ossimDiscreteConvolutionKernel.

Definition at line 103 of file ossimDiscreteNearestNeighbor.h.

105  {
106  }

◆ convolveDouble()

virtual void ossimDiscreteNearestNeighbor::convolveDouble ( const double *  data,
double &  result 
) const
inlinevirtual

Definition at line 44 of file ossimDiscreteNearestNeighbor.h.

46  {
47  result = *data;
48  }

◆ convolveFloat()

virtual void ossimDiscreteNearestNeighbor::convolveFloat ( const float *  data,
double &  result 
) const
inlinevirtual

We will override and optimize by unrolling the loop

Definition at line 27 of file ossimDiscreteNearestNeighbor.h.

29  {
30  result = *data;
31  }

◆ convolveSshort()

virtual void ossimDiscreteNearestNeighbor::convolveSshort ( const short *  data,
double &  result 
) const
inlinevirtual

Definition at line 76 of file ossimDiscreteNearestNeighbor.h.

78  {
79  result = *data;
80  }

◆ convolveSubImageDouble()

virtual void ossimDiscreteNearestNeighbor::convolveSubImageDouble ( const double *  data,
long  ,
double &  result 
) const
inlinevirtual

Definition at line 50 of file ossimDiscreteNearestNeighbor.h.

53  {
54  result = *data;
55  }

◆ convolveSubImageFloat()

virtual void ossimDiscreteNearestNeighbor::convolveSubImageFloat ( const float *  data,
long  ,
double &  result 
) const
inlinevirtual

We will override and optimize by unrolling the loop

Definition at line 37 of file ossimDiscreteNearestNeighbor.h.

40  {
41  result = *data;
42  }

◆ convolveSubImageSshort()

virtual void ossimDiscreteNearestNeighbor::convolveSubImageSshort ( const short *  data,
long  ,
double &  result 
) const
inlinevirtual

Definition at line 82 of file ossimDiscreteNearestNeighbor.h.

86  {
87  result = *data;
88  }

◆ convolveSubImageUchar()

virtual void ossimDiscreteNearestNeighbor::convolveSubImageUchar ( const unsigned char *  data,
long  ,
double &  result 
) const
inlinevirtual

We will override and optimize by unrolling the loop

Definition at line 69 of file ossimDiscreteNearestNeighbor.h.

72  {
73  result = *data;
74  }

◆ convolveSubImageUshort()

virtual void ossimDiscreteNearestNeighbor::convolveSubImageUshort ( const unsigned short *  data,
long  ,
double &  result 
) const
inlinevirtual

Definition at line 96 of file ossimDiscreteNearestNeighbor.h.

99  {
100  result = *data;
101  }

◆ convolveUchar()

virtual void ossimDiscreteNearestNeighbor::convolveUchar ( const unsigned char *  data,
double &  result 
) const
inlinevirtual

We will override and optimize by unrolling the loop

Definition at line 60 of file ossimDiscreteNearestNeighbor.h.

62  {
63  result = *data;
64  }

◆ convolveUshort()

virtual void ossimDiscreteNearestNeighbor::convolveUshort ( const unsigned short *  data,
double &  result 
) const
inlinevirtual

Definition at line 90 of file ossimDiscreteNearestNeighbor.h.

92  {
93  result = *data;
94  }

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