29 static ossimTrace traceDebug(
"ossimAtCorrRemapper:debug");
37 theSurfaceReflectance (NULL),
38 theUseInterpolationFlag(false),
47 theBandWidthArray (0),
48 theSensorType(sensorType)
75 cout <<
"ossimAtCorrRemapper::getTile DEBUG:" 76 <<
"\ntile_rect: " << tile_rect << endl;
82 cerr <<
"ossimAtCorrRemapper::getTile ERROR:" 83 <<
"\nNot initialized!" 101 if (!inputTile.
valid())
140 cout <<
"ossimAtCorrRemapper::getTile DEBUG:" 141 <<
"\ntile_rect: " << tile_rect
142 <<
"\ntile width: " << tw
143 <<
"\ntile height: " << th
144 <<
"\nbands: " << bands
145 <<
"\nBuffer size: " <<
size << endl;
159 cout << setprecision(6);
166 double p = inputTile->
getPix(buffer_index);
186 double radiance_at_satellite
189 double y = (radiance_at_satellite * a) - b;
191 p = (
y / (1.0 + (c *
y)) );
195 double radiance_at_satellite
198 double y = (radiance_at_satellite * a) - b;
200 p = (
y / (1.0 + (c *
y)) );
206 double radiance_at_satellite
208 double y = (radiance_at_satellite * a) - b;
210 p = (
y / (1.0 + (c *
y)) );
220 p = ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );
276 cout <<
"ossimAtCorrRemapper::initialize DEBUG:" 277 <<
"\ntile width: " << tw
278 <<
"\ntile height: " << th
279 <<
"\nbands: " << bands
280 <<
"\nBuffer size: " <<
size << endl;
298 cout <<
"ossimAtCorrRemapper::initialize DEBUG:" 308 static const char MODULE[] =
"ossimAtCorrRemapper::loadState()";
310 if (traceDebug())
CLOG <<
"entering..." << endl;
314 cerr << MODULE <<
" ERROR:" 315 <<
"Not initialized..." << endl;
353 const char* lookup = NULL;
369 <<
"\nlookup failed for keyword: " << kw.
c_str() << endl;
385 <<
"\nlookup failed for keyword: " << kw.
c_str()
402 <<
"\nlookup failed for keyword: " << kw.
c_str()
409 kw = AT_CORR_BIAS_KW;
421 <<
"\nlookup failed for keyword: " << kw.
c_str()
426 kw = AT_CORR_GAIN_KW;
438 <<
"\nlookup failed for keyword: " << kw.
c_str()
446 kw = AT_CORR_CALCOEF_KW;
458 <<
"\nlookup failed for keyword: " << kw.
c_str()
463 kw = AT_CORR_BANDWIDTH_KW;
475 <<
"\nlookup failed for keyword: " << kw.
c_str()
482 kw = AT_CORR_CALCOEF_KW;
494 <<
"\nlookup failed for keyword: " << kw.
c_str()
499 kw = AT_CORR_BANDWIDTH_KW;
511 <<
"\nlookup failed for keyword: " << kw.
c_str()
527 if (prefix) pref += prefix;
528 pref +=
"atmospheric_correction.";
573 return ossimString(
"Atmospheric Correction Remapper");
619 os <<
"ossimAtCorrRemapper:" 620 <<
"\ntheEnableFlag: " << (
theEnableFlag?
"enabled":
"disabled")
623 os << setprecision(15) << setiosflags(ios::fixed);
629 os <<
"band[" << band <<
"] min: " << (*i) << endl;
638 os <<
"band[" << band <<
"] max: " << (*i) << endl;
647 os <<
"band[" << band <<
"] xa: " << (*i) << endl;
656 os <<
"band[" << band <<
"] xb: " << (*i) << endl;
665 os <<
"band[" << band <<
"] xc: " << (*i) << endl;
676 os <<
"band[" << band <<
"] bias: " << (*i) << endl;
685 os <<
"band[" << band <<
"] gain: " << (*i) << endl;
696 os <<
"band[" << band <<
"] calcoef: " << (*i) << endl;
705 os <<
"band[" << band <<
"] bandwidth: " << (*i) << endl;
716 os <<
"band[" << band <<
"] calcoef: " << (*i) << endl;
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
virtual ossim_uint32 getWidth() const
virtual bool isInitialized() const
virtual ossim_uint32 getNumberOfBands() const
virtual ~ossimAtCorrRemapper()
vector< double > theXcArray
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 ossimString & getSensorType() const
const char * find(const char *key) const
ossim_uint32 height() const
static ossimString toString(bool aValue)
Numeric to string methods.
virtual void disableSource()
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
virtual ossim_float64 getPix(const ossimIpt &position, ossim_uint32 band=0) const
Will return the pixel at location position.
virtual void setInitializedFlag(bool flag)
bool theUseInterpolationFlag
vector< double > theGainArray
virtual void initialize()
Initialize the data buffer.
vector< double > getNormMinPixelValues() const
static ossimImageDataFactory * instance()
virtual ossimString getShortName() const
vector< double > theMinPixelValue
virtual ossimDataObjectStatus validate() const
virtual void clearErrorStatus() const
ossimImageSource * theInputConnection
unsigned int ossim_uint32
virtual void interpolate(const ossimDpt &pt, int band, double &a, double &b, double &c) const
virtual void initialize()
vector< double > theBandWidthArray
vector< double > theXaArray
const ossimIpt & lr() const
virtual void enableSource()
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
vector< double > theXbArray
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual void setOrigin(const ossimIpt &origin)
ossimRefPtr< ossimImageData > theTile
ossimAtCorrRemapper(ossimObject *owner=NULL, ossimImageSource *inputSource=NULL, const ossimString &sensorType="")
virtual void setErrorStatus() const
vector< double > theCalCoefArray
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
vector< double > theBiasArray
void setSensorType(const ossimString &sensorType)
ostream & operator<<(ostream &os, const ossimAtCorrRemapper &hr)
RTTI_DEF1(ossimAtCorrRemapper, "ossimAtCorrRemapper", ossimImageSourceFilter)
ossimDataObjectStatus
Definitions for data object status.
double * theSurfaceReflectance
ossimString theSensorType
vector< double > getNormMaxPixelValues() const
std::basic_ostream< char > ostream
Base class for char output streams.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
vector< double > theMaxPixelValue