31 static const double DEFAULT_GAMMA = 1.0;
34 static ossimTrace traceDebug(
"ossimGammaRemapper:debug");
44 theUserDisabledFlag (false)
64 theUserDisabledFlag (false)
72 if (inputSource == NULL)
75 cerr <<
"ossimGammaRemapper::ossimGammaRemapper ERROR:" 76 <<
"\nNull input source passed to constructor!" << endl;
100 if (inputSource == NULL)
103 cerr <<
"ossimGammaRemapper::ossimGammaRemapper ERROR:" 104 <<
"\nNull input source passed to constructor!" << endl;
125 cerr <<
"ossimGammaRemapper::getTile ERROR:" 126 <<
"\nNot initialized!" 133 tile_rect, resLevel);
135 if (!inputTile.
valid())
137 cerr <<
"ossimGammaRemapper::getTile ERROR:" 138 <<
"\nReceived null pointer to tile from input source!" 139 <<
"\nReturning blank tile." 213 p = ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );
263 cerr <<
"ossimGammaRemapper::initialize ERROR:" 264 <<
"\nCannot call method when input connection is NULL!" 272 const vector<double>& v_max)
303 cout << *
this << endl;
315 if (prefix) pref += prefix;
316 pref +=
"gamma_remapper.";
320 cerr <<
"ossimGammaRemapper::loadState: ERROR" 321 <<
"Not initialized yet!" << endl;
331 cout <<
"pref: " << pref
364 cout <<
"MODULE NOTICE:" 365 <<
"\nlookup failed for keyword: " << kw.
c_str()
366 <<
"\nGamma set to " << DEFAULT_GAMMA <<
" for band: " 374 cout <<
"ossimGammaRemapper DEBUG:" 384 os << setprecision(15) << setiosflags(ios::fixed)
385 <<
"ossimGammaRemapper:" 386 <<
"\ntheEnableFlag: " << (
theEnableFlag?
"enabled":
"disabled")
393 os <<
"band[" << band <<
"] min: " << (*i) << endl;
402 os <<
"band[" << band <<
"] max: " << (*i) << endl;
411 os <<
"band[" << band <<
"] gamma: " << (*i) << endl;
virtual ossim_uint32 getWidth() const
virtual bool isInitialized() const
virtual ossim_uint32 getNumberOfBands() const
virtual ossim_float64 getMinNormalizedPix() const
returns normalized minimum pixel value of band zero.
virtual ostream & print(ostream &os) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
virtual void setWidthHeight(ossim_uint32 w, ossim_uint32 h)
Represents serializable keyword/value map.
const char * find(const char *key) const
ossim_uint32 height() const
static ossimString toString(bool aValue)
Numeric to string methods.
virtual void disableSource()
virtual void initialize()
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
virtual void setInitializedFlag(bool flag)
vector< double > theGamma
virtual void initialize()
Initialize the data buffer.
ossimGammaRemapper(ossimObject *owner=NULL)
virtual ~ossimGammaRemapper()
static ossimImageDataFactory * instance()
vector< double > theMinPixelValue
void setMinMaxPixelValues(const vector< double > &v_min, const vector< double > &v_max)
virtual void clearErrorStatus() const
bool toBool() const
String to numeric methods.
vector< double > theMaxPixelValue
virtual ossim_uint32 getSizePerBand() const
Returns the number of pixels in a single band in a tile.
ossimImageSource * theInputConnection
unsigned int ossim_uint32
virtual void enableSource()
ostream & operator<<(ostream &os, const ossimGammaRemapper &hr)
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
virtual void enableSource()
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
static const char * ENABLED_KW
virtual void setOrigin(const ossimIpt &origin)
virtual void makeBlank()
Initializes data to null pixel values.
virtual void setErrorStatus() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual void setDataObjectStatus(ossimDataObjectStatus status) const
Full list found in ossimConstants.h.
virtual ossimString getShortName() const
#define RTTI_DEF1(cls, name, b1)
ossimDataObjectStatus
Definitions for data object status.
ossimRefPtr< ossimImageData > theTile
std::basic_ostream< char > ostream
Base class for char output streams.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)