18 static ossimTrace traceDebug(
"ossimElevRemapper::debug");
23 :m_replacementType(ReplacementType_ELLIPSOID)
46 <<
"ossimElevRemapper::getTile entered..." << endl;
109 <<
"ossimElevRemapper::getTile Unsupported scalar type!" << endl;
116 <<
"ossimElevRemapper::getTile leaving..." << endl;
127 if (!inputTile)
return;
141 ossim_float32 height = 0.0, xpercent, ypercent, uppery, lowery;
168 ossim_float32 height = 0.0, xpercent, ypercent, uppery, lowery;
169 for(bandIdx = 0; bandIdx < bands; ++bandIdx)
171 T* bandPtr =
static_cast<T*
>(inputTile->
getBuf(bandIdx)) + originOffset;
172 for(
y = 0;
y < h; ++
y)
174 for(
x = 0;
x < w; ++
x)
176 xpercent =
x / clipRect.
width();
177 ypercent =
y / clipRect.
height();
178 uppery = hul + xpercent * ( hur - hul);
179 lowery = hll + xpercent * ( hlr - hll);
180 height = uppery + ypercent * ( lowery - uppery );
183 bandPtr[
x] += height;
195 for(bandIdx = 0; bandIdx < bands; ++bandIdx)
197 T* bandPtr =
static_cast<T*
>(inputTile->
getBuf(bandIdx));
200 for(idx = 0; idx <
size;++idx)
204 xpercent =
x / clipRect.
width();
205 ypercent =
y / clipRect.
height();
206 uppery = hul + xpercent * ( hur - hul);
207 lowery = hll + xpercent * ( hlr - hll);
208 height = uppery + ypercent * ( lowery - uppery );
211 (*bandPtr) += height;
220 const char* prefix)
const 227 remapMode =
"ellipsoid";
233 remapMode =
"ellipsoid";
255 <<
"ossimElevRemapper::loadState entered..." << endl;
265 if (mode ==
"ELLIPSOID")
269 else if (mode ==
"GEOID")
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
bool loadState(const ossimKeywordlist &kwl, const char *prefix)
Method to the load (recreate) the state of an object from a keyword list.
static ossimString upcase(const ossimString &aString)
ossim_uint32 numberOf(const char *str) const
virtual ossim_uint32 getNumberOfBands() const
static const char REMAP_MODE_KW[]
void elevRemap(T dummy, ossimImageData *inpuTile, ossim_uint32 resLevel)
Represents serializable keyword/value map.
bool saveState(ossimKeywordlist &kwl, const char *prefix) const
Method to save the state of an object to a keyword list.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Attempts to initialize a transform and a projection given the KWL.
const char * find(const char *key) const
ossim_uint32 height() const
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
bool intersects(const ossimIrect &rect) const
unsigned short ossim_uint16
const ossimIpt & ll() const
bool completely_within(const ossimIrect &rect) const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
signed short ossim_sint16
virtual void initialize()
ossimImageSource * theInputConnection
unsigned int ossim_uint32
32 bit normalized floating point
static ossimGeoidManager * instance()
Implements singelton pattern:
virtual ~ossimElevRemapper()
virtual ossimIrect getImageRectangle() const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
const ossimIpt & lr() const
void rnToWorld(const ossimDpt &rnPt, ossim_uint32 resolutionLevel, ossimGpt &wpt) const
rnToWorld is a utility method that takes a rn resolution image point and maps it to the world point...
ossim_uint32 width() const
ossimIrect clipToRect(const ossimIrect &rect) const
ReplacementType m_replacementType
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
const ossimIpt & ur() const
ossimRefPtr< ossimImageGeometry > m_imageGeometry
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
16 bit unsigned integer (11 bits used)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual const void * getBuf() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the transform (if any) and projection (if any) states to the KWL.
ossimDataObjectStatus
Definitions for data object status.
virtual double offsetFromEllipsoid(const ossimGpt &gpt)
unsigned char ossim_uint8
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
RTTI_DEF1(ossimElevRemapper, "ossimElevRemapper", ossimImageSourceFilter)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
16 bit unsigned integer (12 bits used)