14 bool doWeightedAverage)
18 theComputeWeightedAverageFlag(doWeightedAverage)
28 bool doWeightedAverage)
30 theComputeWeightedAverageFlag(doWeightedAverage)
46 NEWMAT::Matrix& result)
52 NEWMAT::RowVector row(
size);
53 NEWMAT::ColumnVector col(
size);
56 row[index] = coefficients[index];
57 col[index] = coefficients[index];
65 NEWMAT::Matrix& result)
69 NEWMAT::RowVector row(
size);
70 NEWMAT::ColumnVector col(
size);
71 for(
long index = 0; index <
size; ++index)
73 row[index] = coefficients[index];
74 col[index] = coefficients[index];
102 for(
long col=0; col <
theWidth; ++col)
104 if(*data != nullPixel)
106 divisor += (*theKernel)[row][col];
107 result += ((*theKernel)[row][col] * (*data));
121 for(
long col=0; col <
theWidth; ++col)
123 if(*data != nullPixel)
125 result += ((*theKernel)[row][col] * (*data));
136 float nullPixel)
const 138 const float* dataStart = 0;
143 double divisor = 0.0;
147 for(
long col=0; col <
theWidth; ++col)
149 if(*dataStart != nullPixel)
151 divisor += (*theKernel)[row][col];
152 result += ((*theKernel)[row][col] * (*dataStart));
168 for(
long col=0; col <
theWidth; ++col)
170 if(*dataStart != nullPixel)
172 result += ((*theKernel)[row][col] * (*dataStart));
189 double divisor = 0.0;
192 for(
long col=0; col <
theWidth; ++col)
194 if(*data != nullPixel)
196 divisor += (*theKernel)[row][col];
197 result += ((*theKernel)[row][col] * (*data));
211 for(
long col=0; col <
theWidth; ++col)
213 if(*data != nullPixel)
215 result += ((*theKernel)[row][col] * (*data));
233 double divisor = 0.0;
237 for(
long col=0; col <
theWidth; ++col)
239 if(*dataStart != nullPixel)
241 divisor += (*theKernel)[row][col];
242 result += ((*theKernel)[row][col] * (*dataStart));
258 for(
long col=0; col <
theWidth; ++col)
260 if(*dataStart != nullPixel)
262 result += ((*theKernel)[row][col] * (*dataStart));
280 double divisor = 0.0;
283 for(
long col=0; col <
theWidth; ++col)
285 if(*data != nullPixel)
287 divisor += (*theKernel)[row][col];
288 result += ((*theKernel)[row][col] * (*data));
302 for(
long col=0; col <
theWidth; ++col)
304 if(*data != nullPixel)
306 result += ((*theKernel)[row][col] * (*data));
324 double divisor = 0.0;
328 for(
long col=0; col <
theWidth; ++col)
330 if(*dataStart != nullPixel)
332 divisor += (*theKernel)[row][col];
333 result += ((*theKernel)[row][col] * (*dataStart));
349 for(
long col=0; col <
theWidth; ++col)
351 if(*dataStart != nullPixel)
353 result += ((*theKernel)[row][col] * (*dataStart));
370 double divisor = 0.0;
373 for(
long col=0; col <
theWidth; ++col)
375 if(*data != nullPixel)
377 divisor += (*theKernel)[row][col];
378 result += ((*theKernel)[row][col] * (*data));
392 for(
long col=0; col <
theWidth; ++col)
394 if(*data != nullPixel)
396 result += ((*theKernel)[row][col] * (*data));
414 double divisor = 0.0;
418 for(
long col=0; col <
theWidth; ++col)
420 if(*dataStart != nullPixel)
422 divisor += (*theKernel)[row][col];
423 result += ((*theKernel)[row][col] * (*dataStart));
439 for(
long col=0; col <
theWidth; ++col)
441 if(*dataStart != nullPixel)
443 result += ((*theKernel)[row][col] * (*dataStart));
455 double nullPixel)
const 461 double divisor = 0.0;
464 for(
long col=0; col <
theWidth; ++col)
466 if(*data != nullPixel)
468 divisor += (*theKernel)[row][col];
469 result += ((*theKernel)[row][col] * (*data));
483 for(
long col=0; col <
theWidth; ++col)
485 if(*data != nullPixel)
487 result += ((*theKernel)[row][col] * (*data));
498 double nullPixel)
const 500 const double* dataStart = 0;
505 double divisor = 0.0;
509 for(
long col=0; col <
theWidth; ++col)
511 if(*dataStart != nullPixel)
513 divisor += (*theKernel)[row][col];
514 result += ((*theKernel)[row][col] * (*dataStart));
530 for(
long col=0; col <
theWidth; ++col)
532 if(*dataStart != nullPixel)
534 result += ((*theKernel)[row][col] * (*dataStart));
virtual void setKernel(const NEWMAT::Matrix &kernel)
NEWMAT::Matrix * theKernel
unsigned short ossim_uint16
bool theComputeWeightedAverageFlag
signed short ossim_sint16
unsigned int ossim_uint32
virtual void convolve(const float *data, double &result, float nullPixel=OSSIM_DEFAULT_NULL_PIX_FLOAT) const
static void buildSymmetric(const std::vector< float > &coefficients, NEWMAT::Matrix &result)
virtual ~ossimDiscreteConvolutionKernel()
ossimDiscreteConvolutionKernel(long width, long height, bool doWeightedAverage=true)
virtual void convolveSubImage(const float *data, long dataWidth, double &result, float nullPixel=OSSIM_DEFAULT_NULL_PIX_FLOAT) const
unsigned char ossim_uint8