29 static ossimTrace traceDebug(
"ossimTableRemapper:debug");
31 static const char* TABLE_TYPE[] = {
"UNKNOWN",
"NATIVE",
"NORMALIZED" };
251 <<
"ossimTableRemapper::remapFromNativeTable" 252 <<
"\nOutput scalar type is OSSIM_SCALAR_UNKNOWN!\n";
277 const T* rt =
reinterpret_cast<T*
>(&
theTable.front());
287 if(
theTable.size() >= (BANDS*BAND_OFFSET))
291 const T NULL_PIX =
static_cast<T
>(
id->getNullPix(band));
294 const T* s =
static_cast<T*
>(inputTile->
getBuf(band));
295 T* d =
static_cast<T*
>(
id->getBuf(band));
328 d[pixel] = rt[table_index];
420 buf[pixel] = (p >= 0.0) ? ( (p <=1.0) ? p : 1) : 0.0;
452 getEntryNumber(kwl, prefix,
true);
464 const char* prefix)
const 480 os <<
"\nossimTableRemapper::print:" 490 os <<
"theTile:\n" << *
theTile << endl;
543 <<
"ossimTableRemapper::print OSSIM_SCALAR_UNKNOWN!\n";
561 const T* table =
reinterpret_cast<const T*
>(&
theTable.front());
568 os <<
"tabel[" << band <<
"][" << index <<
"]: " 569 <<
static_cast<int>(table[table_index]) << endl;
585 theTableBandCount(0),
586 theTableType(UKNOWN),
16 bit unsigned integer (15 bits used)
ossimTableRemapper & operator=(const ossimTableRemapper &tr)
virtual ostream & print(ostream &os) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
RemapTableType theTableType
virtual ossim_uint32 getNumberOfBands() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual void setImageRectangle(const ossimIrect &rect)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimRefPtr< ossimImageData > theTile
ossim_float64 * theNormBuf
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
void remapFromNativeTable(ossimRefPtr< ossimImageData > &inputTile)
ossim_uint32 height() const
std::vector< ossim_uint8 > theTable
virtual ossimDataObjectStatus getDataObjectStatus() const
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
ossimScalarType theInputScalarType
unsigned short ossim_uint16
virtual void initialize()
Initialize the data buffer.
virtual void initialize()
virtual void initialize()
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimTableRemapper()
default constructor
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
static ossimImageDataFactory * instance()
virtual ossimDataObjectStatus validate() const
signed short ossim_sint16
virtual ossim_uint32 getSizePerBand() const
Returns the number of pixels in a single band in a tile.
ossimImageSource * theInputConnection
unsigned int ossim_uint32
32 bit normalized floating point
void allocate(const ossimIrect &rect)
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
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 copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
void dumpTable(T dummy, ostream &os) const
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
virtual const ossim_float64 * getMinPix() const
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
ossim_uint32 theTableBandCount
ossimRefPtr< ossimImageData > theTmpTile
Used to convert from scalar type enumeration to strings and vice versa.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossim_uint32 getSize() const
Returns the total number of pixels in a tile for all bands.
ossimScalarType theOutputScalarType
virtual const void * getBuf() const
ossim_uint32 theTableBinCount
static const char * SCALAR_TYPE_KW
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
void remapFromNormalizedTable(ossimRefPtr< ossimImageData > &inputTile)
ostream & operator<<(ostream &os, const ossimTableRemapper &tr)
#define RTTI_DEF1(cls, name, b1)
ossimDataObjectStatus
Definitions for data object status.
virtual ~ossimTableRemapper()
virtual destructor
virtual void setMinPix(ossim_float64 min_pix)
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
16 bit unsigned integer (12 bits used)