28 "ossimScalarRemapper",
31 static const ossimTrace traceDebug(
"ossimScalarRemapper:debug");
40 thePreserveMagnitudeFlag(false)
50 theOutputScalarType(outputScalarType),
52 thePreserveMagnitudeFlag(false)
65 theByPassFlag =
false;
94 std::cout <<
"ossimScalarRemapper::getTile START ... " << tileRect <<
" RES: " << resLevel << std::endl;
132 if(newSize != oldSize)
148 if ( !inputTile.
valid() ||
210 static_cast<double*>( inputTile->
getBuf() ) );
217 static_cast<float*>( inputTile->
getBuf() ) );
244 std::cout <<
"ossimScalarRemapper::getTile END ... " << tileRect <<
" RES: " << resLevel << std::endl;
268 <<
"ossimScalarRemapper::setOutputScalarType WARN:\n" 269 <<
"OSSIM_SCALAR_UNKNOWN passed to method. No action taken..." 310 <<
"ossimScalarRemapper ERROR:" 311 <<
"\nUnknown scalar type: " << scalarType.
c_str() << std::endl;
402 <<
"ossimScalarRemapper::allocate() DEBUG" 412 if(!property)
return;
414 if(property->
getName() ==
"Output scalar type")
427 if(name ==
"Output scalar type")
429 std::vector<ossimString> scalarNames;
435 for(idx = 0; idx < tableSize; ++idx)
438 getEntryString(idx));
458 propertyNames.push_back(
"Output scalar type");
462 const char* prefix)
const 485 <<
"ossimScalarRemapper::loadState\n" 486 <<
" ERROR detected in keyword list! State not loaded." 498 const char* lookup = kwl.
find(prefix,
"elevation");
574 if (band < theTile->getNumberOfBands())
594 if (band < theTile->getNumberOfBands())
614 if (band < theTile->getNumberOfBands())
630 return ossimString(
"Scalar Remapper, filters between different scalar types.");
virtual void valueToString(ossimString &valueResult) const =0
virtual bool isSourceEnabled() const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual const ossim_float64 * getMaxPix() const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
virtual ossim_uint32 getNumberOfBands() const
virtual void refreshEvent(ossimRefreshEvent &event)
virtual void setPreserveMagnitude(bool value)
virtual void setImageRectangle(const ossimIrect &rect)
Represents serializable keyword/value map.
void copyTileToFloatBuffer(T, ossim_float32 *buf) const
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual ossimString getOutputScalarTypeString() const
Returns the output pixel type of the tile source as a string.
const char * find(const char *key) const
virtual ossimString getEntryString(ossim_int32 entry_number) const
static ossimString toString(bool aValue)
Numeric to string methods.
virtual ossimString getLongName() const
virtual ossimDataObjectStatus getDataObjectStatus() const
void destroy()
Deletes allocated memory.
static const ossimErrorCode OSSIM_ERROR
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual void setReadOnlyFlag(bool flag)
virtual ~ossimScalarRemapper()
unsigned short ossim_uint16
virtual void setInitializedFlag(bool flag)
virtual void initialize()
Initialize the data buffer.
virtual ossimString getShortName() const
virtual void initialize()
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
OSSIM_DLL double defaultMin(ossimScalarType scalarType)
void allocate()
Called on first getTile, will initialize all data needed.
static ossimImageDataFactory * instance()
const ossimObject * getObject() const
This is the originating object that originally produced the event.
virtual void setOutputScalarType(ossimScalarType scalarType)
Sets the output scalar type.
virtual ossimDataObjectStatus validate() const
signed short ossim_sint16
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
bool toBool() const
String to numeric methods.
OSSIM_DLL double defaultNull(ossimScalarType scalarType)
ossimImageSource * theInputConnection
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
32 bit normalized floating point
ossimRefPtr< ossimImageData > theTile
bool thePreserveMagnitudeFlag
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
virtual double getNullPixelValue(ossim_uint32 band) const
Sets the current resolution level.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual void propertyEvent(ossimPropertyEvent &event)
Override base class so that a disableSource event does not reinitialize the object and enable itself...
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
ossimScalarType theOutputScalarType
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
virtual void initialize()
virtual const ossim_float32 * getFloatBuf() const
virtual const ossim_float64 * getMinPix() const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual ossimScalarType getScalarType() const
virtual void makeBlank()
Initializes data to null pixel values.
64 bit normalized floating point
OSSIM_DLL double defaultMax(ossimScalarType scalarType)
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
Method to save the state of an object to a keyword list.
virtual ossimErrorCode getErrorStatus() const
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual ossim_uint32 getSize() const
Returns the total number of pixels in a tile for all bands.
virtual const void * getBuf() const
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
static const char * SCALAR_TYPE_KW
#define RTTI_DEF1(cls, name, b1)
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
Method to the load (recreate) the state of an object from a keyword list.
void setCacheRefreshBit()
const ossimString & getName() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)