1 //******************************************************************* 2 // Copyright (C) 2002 ImageLinks Inc. 3 // 4 // License: MIT 5 // 6 // See LICENSE.txt file in the top level directory for more details. 7 // 8 // Author: Kathy Minear 9 // 10 // Description: 11 // Takes in DNs for any number of bands 12 // Converts DNs to Radiance at the satellite values Lsat 13 // Converts Lsat to Surface Reflectance values 14 // 15 //************************************************************************* 16 // $Id: ossimAtCorrRemapper.h 15766 2009-10-20 12:37:09Z gpotts $ 17 #ifndef ossimAtCorrRemapper_HEADER 18 #define ossimAtCorrRemapper_HEADER 19 20 #include <ossim/imaging/ossimImageSourceFilter.h> 21 22 class ossimAtCorrRemapper : public ossimImageSourceFilter 23 { 24 public: 25 26 ossimAtCorrRemapper(ossimObject* owner = NULL, 27 ossimImageSource* inputSource = NULL, 28 const ossimString& sensorType = ""); 29 30 31 virtual ossimString getShortName() const; 32 33 virtual void initialize(); 34 35 virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect, 36 ossim_uint32 resLevel=0); 37 38 /*! 39 * Method to the load (recreate) the state of an object from a keyword 40 * list. Return true if ok or false on error. 41 */ 42 virtual bool loadState(const ossimKeywordlist& kwl, 43 const char* prefix=0); 44 45 virtual std::ostream& print(std::ostream& os) const; 46 friend std::ostream& operator << (std::ostream& os, const ossimAtCorrRemapper& hr); 47 48 std::vector<double> getNormMinPixelValues() const; 49 std::vector<double> getNormMaxPixelValues() const; 50 51 void getNormMinPixelValues(std::vector<double>& v) const; 52 void getNormMaxPixelValues(std::vector<double>& v) const; 53 54 const ossimString& getSensorType() const; 55 56 void setSensorType(const ossimString& sensorType); 57 58 protected: 59 virtual ~ossimAtCorrRemapper(); 60 61 /*! 62 * Method to set unset the enable flag. 63 */ 64 void verifyEnabled(); 65 virtual void interpolate(const ossimDpt& pt, 66 int band, 67 double& a, 68 double& b, 69 double& c)const; 70 71 ossimRefPtr<ossimImageData> theTile; 72 double* theSurfaceReflectance; 73 bool theUseInterpolationFlag; 74 std::vector<double> theMinPixelValue; 75 std::vector<double> theMaxPixelValue; 76 std::vector<double> theXaArray; 77 std::vector<double> theXbArray; 78 std::vector<double> theXcArray; 79 std::vector<double> theBiasArray; 80 std::vector<double> theGainArray; 81 std::vector<double> theCalCoefArray; 82 std::vector<double> theBandWidthArray; 83 ossimString theSensorType; 84 85 TYPE_DATA 86 }; 87 88 #endif /* #ifndef ossimAtCorrRemapper_HEADER */ 89