OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
include
ossim
imaging
ossimFilterTable.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
//
3
// License: MIT
4
//
5
// See LICENSE.txt file in the top level directory for more details.
6
//
7
// Author: Garrett Potts
8
//
9
//----------------------------------------------------------------------------
10
// $Id: ossimFilterTable.h 23353 2015-06-01 19:19:10Z dburken $
11
#ifndef ossimFilterTable_HEADER
12
#define ossimFilterTable_HEADER 1
13
14
#include <
ossim/base/ossimConstants.h
>
15
#include <cmath>
16
17
class
ossimFilter
;
18
19
class
OSSIM_DLL
ossimFilterTable
20
{
21
public
:
23
ossimFilterTable
();
24
26
~
ossimFilterTable
();
27
29
void
buildTable(
ossim_uint32
filterSteps,
30
const
ossimFilter
& filter);
31
33
void
buildTable(
ossim_uint32
filterSteps,
34
const
ossimFilter
& xFilter,
35
const
ossimFilter
& yFilter);
36
38
ossim_uint32
getWidthByHeight()
const
;
39
41
ossim_uint32
getXSupport()
const
;
42
44
ossim_uint32
getYSupport()
const
;
45
47
ossim_uint32
getWidth()
const
;
48
50
ossim_uint32
getHeight()
const
;
51
57
const
double
* getClosestWeights(
const
double
&
x
,
const
double
&
y
)
const
;
58
59
protected
:
60
65
void
allocateWeights();
66
67
double
*
theWeights
;
68
ossim_uint32
theWidth
;
69
ossim_uint32
theHeight
;
70
ossim_uint32
theWidthHeight
;
71
ossim_uint32
theXSupport
;
72
ossim_uint32
theYSupport
;
73
ossim_uint32
theFilterSteps
;
74
};
75
80
inline
const
double
*
ossimFilterTable::getClosestWeights
(
const
double
&
x
,
81
const
double
&
y
)
const
82
{
83
// Extract the decimal part of x and y.
84
double
intPartDummy;
85
double
decimalPrecisionX = fabs(modf(
x
, &intPartDummy));
86
double
decimalPrecisionY = fabs(modf(
y
, &intPartDummy));
87
88
ossim_int32
kernelLine =
89
(
ossim_int32
)(
theFilterSteps
*decimalPrecisionY);
90
ossim_int32
kernelSamp =
91
(
ossim_int32
)(
theFilterSteps
*decimalPrecisionX);
92
93
return
&
theWeights
[(kernelLine*
theFilterSteps
+
94
kernelSamp)*
theWidthHeight
];
95
}
96
97
#endif
/* End of "#ifndef ossimFilterTable_HEADER" */
ossimFilterTable::theYSupport
ossim_uint32 theYSupport
Definition:
ossimFilterTable.h:72
x
ossim_uint32 x
Definition:
ossimPdfWriter.cpp:519
ossimFilterTable::theWidthHeight
ossim_uint32 theWidthHeight
Definition:
ossimFilterTable.h:70
ossimConstants.h
ossimFilterTable::theHeight
ossim_uint32 theHeight
Definition:
ossimFilterTable.h:69
y
ossim_uint32 y
Definition:
ossimPdfWriter.cpp:520
ossimFilterTable::theWidth
ossim_uint32 theWidth
Definition:
ossimFilterTable.h:68
ossimFilterTable::theXSupport
ossim_uint32 theXSupport
Definition:
ossimFilterTable.h:71
ossimFilterTable::getClosestWeights
const double * getClosestWeights(const double &x, const double &y) const
Inlined below.
Definition:
ossimFilterTable.h:80
ossim_uint32
unsigned int ossim_uint32
Definition:
ossimConstants.h:235
ossimFilterTable::theFilterSteps
ossim_uint32 theFilterSteps
Definition:
ossimFilterTable.h:73
ossimFilterTable
Definition:
ossimFilterTable.h:19
OSSIM_DLL
#define OSSIM_DLL
Definition:
ossimConstants.h:72
ossimFilterTable::theWeights
double * theWeights
Definition:
ossimFilterTable.h:67
ossimFilter
Definition:
ossimFilter.h:8
ossim_int32
int ossim_int32
Definition:
ossimConstants.h:234
Generated on Fri Aug 3 2018 08:46:47 for OSSIM - Open Source Software Image Map by
1.8.14