OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimTopographicCorrectionFilter Class Reference

#include <ossimTopographicCorrectionFilter.h>

Inheritance diagram for ossimTopographicCorrectionFilter:
ossimImageCombiner ossimImageSource ossimConnectableObjectListener ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced ossimLandsatTopoCorrectionFilter

Public Types

enum  ossimTopoCorrectionType { TOPO_CORRECTION_COSINE = 0, TOPO_CORRECTION_COSINE_C = 1, TOPO_CORRECTION_MINNAERT = 2 }
 
- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 

Public Member Functions

 ossimTopographicCorrectionFilter ()
 
 ossimTopographicCorrectionFilter (ossimImageSource *colorSource, ossimImageSource *elevSource)
 
ossimRefPtr< ossimImageDatagetTile (const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. More...
 
virtual ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. More...
 
virtual double getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. More...
 
virtual double getMinPixelValue (ossim_uint32 band=0) const
 Returns the min pixel of the band. More...
 
virtual double getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 This will return the bounding rect of the source. More...
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 Will return the decimation factor for the given resolution level. More...
 
virtual void getDecimationFactors (vector< ossimDpt > &decimations) const
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Will return the number of resolution levels. More...
 
virtual double getAzimuthAngle () const
 
virtual double getElevationAngle () const
 
virtual void setAzimuthAngle (double angle)
 
virtual void setElevationAngle (double angle)
 
virtual void initialize ()
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes More...
 
virtual void connectInputEvent (ossimConnectionEvent &event)
 
virtual void disconnectInputEvent (ossimConnectionEvent &event)
 
virtual void propertyEvent (ossimPropertyEvent &event)
 
virtual void refreshEvent (ossimRefreshEvent &event)
 
virtual ossimTopoCorrectionType getTopoCorrectionType () const
 
virtual void setTopoCorrectionType (ossimTopoCorrectionType topoType)
 
const std::vector< double > & getGainValues () const
 
void setGainValues (const std::vector< double > &gainValues)
 
const vector< double > & getBiasValues () const
 
void setBiasValues (const std::vector< double > &biasValues)
 
const vector< double > & getKValues () const
 
double getK (int idx) const
 
void setK (int idx, double value)
 
void setKValues (const vector< double > &kValues)
 
double getC (int idx) const
 
void setC (int idx, double value)
 
void setCValues (const vector< double > &cValues)
 
void computeLightDirection ()
 
- Public Member Functions inherited from ossimImageCombiner
 ossimImageCombiner ()
 
 ossimImageCombiner (ossimObject *owner, int numberOfInputs, int numberOfOutputs, bool inputListIsFixedFlag, bool outputListIsFixedFlag)
 
 ossimImageCombiner (ossimConnectableObject::ConnectableObjectList &inputSources)
 
virtual void updateRects ()
 This will go through and precompute the bounding rects of each input image. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 Returns the number of bands available from the input. More...
 
virtual ossim_uint32 getTileWidth () const
 Returns the default processing tile width. More...
 
virtual ossim_uint32 getTileHeight () const
 Returns the default processing tile height. More...
 
virtual ossim_uint32 getNumberOfOverlappingImages (const ossimIrect &rect, ossim_uint32 resLevel=0) const
 Used to retrieve the number of overlapping images withint the given rect. More...
 
virtual void getOverlappingImages (std::vector< ossim_uint32 > &result, const ossimIrect &rect, ossim_uint32 resLevel=0) const
 Used to populate the result with the index of the overlapping images. More...
 
virtual ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 &returnedIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual bool getNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, ossimImageData *tile, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextNormTile (ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextNormTile (ossim_uint32 &returnedIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual bool hasDifferentInputs () const
 
- Public Member Functions inherited from ossimImageSource
 ossimImageSource (ossimObject *owner=0)
 
 ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimImageSource ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIpt &origin, ossim_uint32 resLevel=0)
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossimObjectgetObject ()
 For RTTI support. More...
 
virtual const ossimObjectgetObject () const
 For RTTI support. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual void getBoundingRect (ossimIrect &rect, ossim_uint32 resLevel=0) const
 Gets the bounding rectangle of the source. More...
 
virtual void getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if not defined. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual void saveImageGeometry () const
 Default method to call input's saveImageGeometry. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Default method to call input's saveImageGeometry. More...
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool isIndexedData () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimConnectableObjectListener
 ossimConnectableObjectListener ()
 
virtual ~ossimConnectableObjectListener ()
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &)
 
virtual void connectionEvent (ossimConnectionEvent &)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &)
 
virtual void connectOutputEvent (ossimConnectionEvent &)
 
virtual void addObjectEvent (ossimContainerEvent &)
 
virtual void removeObjectEvent (ossimContainerEvent &)
 
virtual void containerEvent (ossimContainerEvent &)
 
- Public Member Functions inherited from ossimListener
 ossimListener ()
 
virtual ~ossimListener ()
 
void enableListener ()
 
void disableListener ()
 
void setListenerEnableFlag (bool flag)
 
bool isListenerEnabled () const
 
bool getListenerEnableFlag () const
 

Protected Member Functions

virtual ~ossimTopographicCorrectionFilter ()
 
virtual void allocate ()
 
virtual void executeTopographicCorrection (ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
 
template<class T >
void executeTopographicCorrectionTemplate (T dummy, ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
 
template<class T >
void executeTopographicCorrectionMinnaertTemplate (T dummy, ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
 
template<class T >
bool computeNdvi (T dummy, ossim_float64 &result, ossim_uint32 offset, const std::vector< T *> &bands) const
 
void resizeArrays (ossim_uint32 newSize)
 
bool setCCmputedFlag ()
 
- Protected Member Functions inherited from ossimImageCombiner
virtual ~ossimImageCombiner ()
 
void precomputeBounds () const
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossimRefPtr< ossimImageDatatheTile
 
std::vector< ossim_uint32theBandMapping
 
std::vector< double > theC
 
std::vector< double > theK
 
std::vector< double > theBias
 
std::vector< double > theGain
 
double theLightSourceElevationAngle
 
double theLightSourceAzimuthAngle
 
double theLightDirection [3]
 
double theJulianDay
 
bool theCComputedFlag
 
ossimTopoCorrectionType theTopoCorrectionType
 
double theNdviLowTest
 
double theNdviHighTest
 
- Protected Attributes inherited from ossimImageCombiner
ossim_uint32 theLargestNumberOfInputBands
 
ossim_uint32 theInputToPassThrough
 
bool theHasDifferentInputs
 
ossimRefPtr< ossimImageDatatheNormTile
 
std::vector< ossimIrecttheFullResBounds
 
bool theComputeFullResBoundsFlag
 
ossim_uint32 theCurrentIndex
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 
- Protected Attributes inherited from ossimListener
bool theListenerEnableFlag
 

Detailed Description

class ossimTopographicCorrectionFilter

This clas is used to execute terrain correction. I t requires 2 inputs where the first input is a multi band data source to correct and the second is elevation normals used in light incident calculations.

A sample chain might look like:

landsatHandler —> Cache —> renderer —> cache ------------------------------------— |–> Topo correction filter —> Output ortho mosaic of elevation data-—> imageToPlaneNormals –> Cache —> Renderer –>Cache –

the ossimImageToPlaneNormalsFilter is used to take a single band elevation source and compute normals at each post. I suggest that you set the renderer to use a higher order convolution than just nearest neighbor, maybe Cubic. This way you have smoother interpolation as you change zoom levels.

Correction Types:

Cosine correction: In order for this to run it does not need any additional informat but the multi band source and an normal calculation input.

Cosine-C correction: In order for this to run it will need theC array populated for each band. It defaults to 0 forcing a default Cosine correction to take place.

Minnaert correction: In order for this to run it will need theK array populated for each band. The defaults should work pretty good

Definition at line 55 of file ossimTopographicCorrectionFilter.h.

Member Enumeration Documentation

◆ ossimTopoCorrectionType

Constructor & Destructor Documentation

◆ ossimTopographicCorrectionFilter() [1/2]

ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter ( )

Definition at line 29 of file ossimTopographicCorrectionFilter.cpp.

30  :ossimImageCombiner(NULL, 2, 0, true, false),
31  theTile(NULL),
32 // theScalarRemapper(NULL),
35  theJulianDay(0),
36  theCComputedFlag(false),
38 // theTopoCorrectionType(TOPO_CORRECTION_MINNAERT),
39  theNdviLowTest(-0.1),
40  theNdviHighTest(0.1)
41 {
42 // theScalarRemapper = new ossimScalarRemapper();
43 // theScalarRemapper->setOutputScalarType(OSSIM_NORMALIZED_DOUBLE);
44 // theScalarRemapper->initialize();
45 }

◆ ossimTopographicCorrectionFilter() [2/2]

ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter ( ossimImageSource colorSource,
ossimImageSource elevSource 
)

Definition at line 47 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::connectMyInputTo().

49  :ossimImageCombiner(NULL, 2, 0, true, false),
50  theTile(NULL),
53  theJulianDay(0),
54  theCComputedFlag(false),
56  theNdviLowTest(-0.1),
57  theNdviHighTest(0.1)
58 {
59  connectMyInputTo(colorSource);
60  connectMyInputTo(elevSource);
61 }
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.

◆ ~ossimTopographicCorrectionFilter()

ossimTopographicCorrectionFilter::~ossimTopographicCorrectionFilter ( )
protectedvirtual

Definition at line 63 of file ossimTopographicCorrectionFilter.cpp.

64 {
65 }

Member Function Documentation

◆ allocate()

void ossimTopographicCorrectionFilter::allocate ( )
protectedvirtual

Definition at line 158 of file ossimTopographicCorrectionFilter.cpp.

References computeLightDirection(), ossimImageDataFactory::create(), ossimConnectableObject::getInput(), ossimImageData::getNumberOfBands(), ossimImageSource::getOutputBandList(), ossimImageData::initialize(), ossimImageDataFactory::instance(), ossimSource::isSourceEnabled(), PTR_CAST, resizeArrays(), theBandMapping, theBias, theGain, and theTile.

Referenced by getTile().

159 {
160  if(!getInput(0) || !getInput(1)) return;
161  theBandMapping.clear();
162  if(isSourceEnabled())
163  {
164  // ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
165 
167  theTile->initialize();
168 
169  int arraySize = theTile->getNumberOfBands();
170  if(theGain.size() > 0)
171  {
172  arraySize = (int)theGain.size();
173  }
174  // we will do a non destructive resize onf the arrays
175  //
176  resizeArrays(arraySize);
177 
179  getInput(0));
180  if(input1)
181  {
183  for(ossim_uint32 idx = 0; idx < theBandMapping.size(); ++idx)
184  {
185  if(theBias.size())
186  {
187  if(theBandMapping[idx] >= theBias.size())
188  {
189  theBandMapping[idx] = (unsigned int)theBias.size()-1;
190  }
191  }
192  else
193  {
194  theBandMapping[idx] = 0;
195  }
196  }
197  }
198  }
199 
201 }
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
virtual ossim_uint32 getNumberOfBands() const
virtual void initialize()
Initialize the data buffer.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void getOutputBandList(std::vector< ossim_uint32 > &bandList) const
Initializes bandList.
static ossimImageDataFactory * instance()
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const

◆ canConnectMyInputTo()

bool ossimTopographicCorrectionFilter::canConnectMyInputTo ( ossim_int32  myInputIndex,
const ossimConnectableObject object 
) const
virtual

required to be overriden by derived classes

Reimplemented from ossimImageCombiner.

Definition at line 1193 of file ossimTopographicCorrectionFilter.cpp.

References PTR_CAST.

1195 {
1196  return (object&&
1197  ( (inputIndex>=0) && inputIndex < 2)&&
1198  PTR_CAST(ossimImageSource, object));
1199 
1200 }
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ computeLightDirection()

void ossimTopographicCorrectionFilter::computeLightDirection ( )

Definition at line 203 of file ossimTopographicCorrectionFilter.cpp.

References ossimMatrix3x3::createRotationMatrix(), theLightDirection, theLightSourceAzimuthAngle, theLightSourceElevationAngle, and ossimColumnVector3d::unit().

Referenced by allocate(), and ossimLandsatTopoCorrectionFilter::setLandsatHeader().

204 {
206  0.0,
208  NEWMAT::ColumnVector v(3);
209  v[0] = 0;
210  v[1] = 1;
211  v[2] = 0;
212  v = m*v;
213  // reflect Z. We need the Z pointing up from the surface and not into it.
214  //
215  ossimColumnVector3d d(v[0], v[1], -v[2]);
216  d = d.unit();
217  theLightDirection[0] = d[0];
218  theLightDirection[1] = d[1];
219  theLightDirection[2] = d[2];
220 }
static NEWMAT::Matrix createRotationMatrix(double angleX, double angleY, double angleZ, ossimCoordSysOrientMode orientationMode=OSSIM_RIGHT_HANDED)

◆ computeNdvi()

template<class T >
bool ossimTopographicCorrectionFilter::computeNdvi ( dummy,
ossim_float64 result,
ossim_uint32  offset,
const std::vector< T *> &  bands 
) const
protected

Definition at line 831 of file ossimTopographicCorrectionFilter.cpp.

836 {
837  if(bands.size() > 3)
838  {
839  result = (((double)*(bands[3]+offset) - (double)*(bands[2]+offset))/
840  ((double)*(bands[3]+offset) + (double)*(bands[2]+offset)));
841  return true;
842  }
843 
844  return false;
845 }

◆ connectInputEvent()

void ossimTopographicCorrectionFilter::connectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimImageCombiner.

Definition at line 1202 of file ossimTopographicCorrectionFilter.cpp.

References initialize().

1203 {
1204  initialize();
1205 }

◆ disconnectInputEvent()

void ossimTopographicCorrectionFilter::disconnectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimImageCombiner.

Definition at line 1207 of file ossimTopographicCorrectionFilter.cpp.

References initialize().

1208 {
1209  initialize();
1210 }

◆ executeTopographicCorrection()

void ossimTopographicCorrectionFilter::executeTopographicCorrection ( ossimRefPtr< ossimImageData > &  outputData,
ossimRefPtr< ossimImageData > &  colorData,
ossimRefPtr< ossimImageData > &  normalData 
)
protectedvirtual

Definition at line 222 of file ossimTopographicCorrectionFilter.cpp.

References executeTopographicCorrectionMinnaertTemplate(), executeTopographicCorrectionTemplate(), ossimRectilinearDataObject::getScalarType(), OSSIM_DOUBLE, OSSIM_FLOAT, OSSIM_NORMALIZED_DOUBLE, OSSIM_NORMALIZED_FLOAT, OSSIM_SSHORT16, OSSIM_UCHAR, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, OSSIM_USHORT16, ossimNotify(), ossimNotifyLevel_WARN, theTopoCorrectionType, and TOPO_CORRECTION_MINNAERT.

Referenced by getTile().

226 {
227  switch(colorData->getScalarType())
228  {
229  case OSSIM_UCHAR:
230  {
232  {
234  outputData,
235  colorData,
236  normalData);
237  }
238  else
239  {
241  outputData,
242  colorData,
243  normalData);
244  }
245  break;
246  }
247  case OSSIM_USHORT11:
248  case OSSIM_USHORT12:
249  case OSSIM_USHORT13:
250  case OSSIM_USHORT14:
251  case OSSIM_USHORT15:
252  case OSSIM_USHORT16:
253  {
255  {
257  outputData,
258  colorData,
259  normalData);
260  }
261  else
262  {
264  outputData,
265  colorData,
266  normalData);
267  }
268  break;
269  }
270  case OSSIM_SSHORT16:
271  {
273  {
275  outputData,
276  colorData,
277  normalData);
278  }
279  else
280  {
282  outputData,
283  colorData,
284  normalData);
285  }
286  break;
287  }
288  case OSSIM_DOUBLE:
290  {
292  {
294  outputData,
295  colorData,
296  normalData);
297  }
298  else
299  {
301  outputData,
302  colorData,
303  normalData);
304  }
305  break;
306  }
307  case OSSIM_FLOAT:
309  {
311  {
313  outputData,
314  colorData,
315  normalData);
316  }
317  else
318  {
320  outputData,
321  colorData,
322  normalData);
323  }
324  break;
325  }
326  default:
327  {
329  << "ossimTopographicCorrectionFilter::executeTopographicCorrection WARN: Not handling scalar type"
330  << endl;
331  }
332  }
333 }
16 bit unsigned integer (15 bits used)
float ossim_float32
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
unsigned short ossim_uint16
void executeTopographicCorrectionTemplate(T dummy, ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
void executeTopographicCorrectionMinnaertTemplate(T dummy, ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
double ossim_float64
signed short ossim_sint16
32 bit normalized floating point
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
32 bit floating point
16 bit unsigned iteger
64 bit floating point
16 bit signed integer
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
8 bit unsigned iteger
16 bit unsigned integer (12 bits used)

◆ executeTopographicCorrectionMinnaertTemplate()

template<class T >
void ossimTopographicCorrectionFilter::executeTopographicCorrectionMinnaertTemplate ( dummy,
ossimRefPtr< ossimImageData > &  outputData,
ossimRefPtr< ossimImageData > &  colorData,
ossimRefPtr< ossimImageData > &  normalData 
)
protected

Definition at line 447 of file ossimTopographicCorrectionFilter.cpp.

References ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getMaxPix(), ossimImageData::getMinPix(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), ossim::min(), OSSIM_EMPTY, theBandMapping, theBias, theGain, theK, theLightDirection, x, and y.

Referenced by executeTopographicCorrection().

452 {
453 
454  ossim_int32 y = 0;
455  ossim_int32 x = 0;
456  ossim_int32 colorW = colorData->getWidth();
457  ossim_int32 colorH = colorData->getHeight();
458 
459  T* colorDataBand = 0;
460  T* outputDataBand = 0;
461  ossim_float64 colorNp = 0;
462  ossim_float64 colorMin = 0;
463  ossim_float64 colorMax = 0;
464  // ossim_float64 outputDelta = 0;;
465  // ossim_float64 outputMin = 0;
466  // ossim_float64 outputMax = 0;
467  ossim_float64 outputNp;
468  double normalNp = normalData->getNullPix(0);
469  double LPrime = 0.0;
470  double LNew = 0.0;
471  double dn = 0.0;
472 
473  if(!colorData->getBuf()||
474  !normalData->getBuf()||
475  (colorData->getDataObjectStatus() == OSSIM_EMPTY))
476  {
477  return;
478  }
479  int maxBands = ossim::min((int)theK.size(), (int)outputData->getNumberOfBands());
480  for(int b = 0; b < maxBands;++b)
481  {
482  int mappedBand = theBandMapping[b];
483  double* normalX = (double*)normalData->getBuf(0);
484  double* normalY = (double*)normalData->getBuf(1);
485  double* normalZ = (double*)normalData->getBuf(2);
486  outputNp = (ossim_float64)outputData->getNullPix(b);
487  // outputMin = (ossim_float64)outputData->getMinPix(b);
488  // outputMax = (ossim_float64)outputData->getMaxPix(b);
489  // outputDelta = outputMax - outputMin;
490  colorDataBand = (T*)(colorData->getBuf(b));
491  colorNp = (ossim_float64)(colorData->getNullPix(b));
492  colorMin = (ossim_float64)(colorData->getMinPix(b));
493  colorMax = (ossim_float64)(colorData->getMaxPix(b));
494  outputDataBand = (T*)(outputData->getBuf(b));
495  for(y = 0; y < colorH; ++y)
496  {
497  for(x = 0; x < colorW; ++x)
498  {
499  if((*colorDataBand) != colorNp)
500  {
501  if((*normalX != normalNp)&&
502  (*normalY != normalNp)&&
503  (*normalZ != normalNp))
504  {
505 
506 // if(fabs(*normalZ) < FLT_EPSILON)
507 // {
508 // *normalZ = 0.0;
509 // }
510  double cosineNewI = (((*normalX)*theLightDirection[0] +
511  (*normalY)*theLightDirection[1] +
512  (*normalZ)*theLightDirection[2]));
513  double slopeAngle = acos(*normalZ);
514  double cosineSlope = cos(slopeAngle);
515  double k = theK[mappedBand];
516  double cosineSlopeKPower = pow(cosineSlope, k);
517  double denom = pow((double)cosineNewI, k)*cosineSlopeKPower;
518  double numerator = cosineSlope;
519 
520 // double slopeAngle = asin(*normalZ);
521 // double tempK = theK[mappedBand]*cosineNewI;
522 // double denom = pow((double)cosineNewI*cosineSlope, theK[mappedBand]);
523 // double numerator = pow((double)cosineSlope, 1-tempK);
524 // if((fabs(denom) > .0001)&&(cosineNewI >= 0.0))
525 // if((cosineNewI >= 0.0) &&fabs(denom) > .000001)
526  if(fabs(denom) > .00000001)
527  {
528 // double cosineRatio = cosineSlope/denom;
529  double cosineRatio = numerator/denom;
530 
531  LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
532 
533  LNew = LPrime*cosineRatio;
534 
535  dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
536 
537  if(dn < colorMin) dn = colorMin;
538  if(dn > colorMax) dn = colorMax;
539 
540  *outputDataBand = (T)(dn);
541  }
542  else
543  {
544  *outputDataBand = (T)(*colorDataBand);
545  }
546  }
547  else
548  {
549  *outputDataBand = (T)(*colorDataBand);
550  }
551  }
552  else
553  {
554  *outputDataBand = (T)outputNp;
555  }
556 
557  ++outputDataBand;
558  ++colorDataBand;
559  ++normalX;
560  ++normalY;
561  ++normalZ;
562  }
563  }
564  }
565 }
virtual ossim_uint32 getWidth() const
ossim_uint32 x
virtual const ossim_float64 * getMaxPix() const
virtual ossim_uint32 getNumberOfBands() const
ossim_uint32 y
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
double ossim_float64
virtual const ossim_float64 * getNullPix() const
T min(T a, T b)
Definition: ossimCommon.h:203
virtual const ossim_float64 * getMinPix() const
virtual const void * getBuf() const
int ossim_int32

◆ executeTopographicCorrectionTemplate()

template<class T >
void ossimTopographicCorrectionFilter::executeTopographicCorrectionTemplate ( dummy,
ossimRefPtr< ossimImageData > &  outputData,
ossimRefPtr< ossimImageData > &  colorData,
ossimRefPtr< ossimImageData > &  normalData 
)
protected

Definition at line 336 of file ossimTopographicCorrectionFilter.cpp.

References ossim::cosd(), FLT_EPSILON, ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getMaxPix(), ossimImageData::getMinPix(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), OSSIM_EMPTY, theBandMapping, theBias, theC, theGain, theLightDirection, theLightSourceElevationAngle, theTopoCorrectionType, TOPO_CORRECTION_COSINE_C, x, and y.

Referenced by executeTopographicCorrection().

341 {
342  ossim_int32 y = 0;
343  ossim_int32 x = 0;
344  ossim_int32 colorW = colorData->getWidth();
345  ossim_int32 colorH = colorData->getHeight();
346 
347  T* colorDataBand = 0;
348  T* outputDataBand = 0;
349  ossim_float64 colorNp = 0;
350  ossim_float64 colorMin = 0;
351  ossim_float64 colorMax = 0;
352  // ossim_float64 outputDelta = 0;;
353  // ossim_float64 outputMin = 0;
354  // ossim_float64 outputMax = 0;
355  ossim_float64 outputNp;
356  double normalNp = normalData->getNullPix(0);
357  double LPrime = 0.0;
358  double LNew = 0.0;
359  double dn = 0.0;
360  double cosineZenith = ossim::cosd(90 - theLightSourceElevationAngle);
361 
362  if(!colorData->getBuf()||
363  !normalData->getBuf()||
364  (colorData->getDataObjectStatus() == OSSIM_EMPTY))
365  {
366  return;
367  }
368  for(ossim_uint32 b = 0; b < outputData->getNumberOfBands();++b)
369  {
370  int mappedBand = theBandMapping[b];
371  double* normalX = (double*)normalData->getBuf(0);
372  double* normalY = (double*)normalData->getBuf(1);
373  double* normalZ = (double*)normalData->getBuf(2);
374  double numerator = cosineZenith + theC[mappedBand];
375  outputNp = (ossim_float64)outputData->getNullPix(b);
376  // outputMin = (ossim_float64)outputData->getMinPix(b);
377  // outputMax = (ossim_float64)outputData->getMaxPix(b);
378  // outputDelta = outputMax - outputMin;
379  colorDataBand = (T*)(colorData->getBuf(b));
380  colorNp = (ossim_float64)(colorData->getNullPix(b));
381  colorMin = (ossim_float64)(colorData->getMinPix(b));
382  colorMax = (ossim_float64)(colorData->getMaxPix(b));
383  outputDataBand = (T*)(outputData->getBuf(b));
384  bool theValuesAreGood = b < theC.size();
385  double c = theC[mappedBand];
387  {
388  c = 0;
389  }
390  for(y = 0; y < colorH; ++y)
391  {
392  for(x = 0; x < colorW; ++x)
393  {
394  if((*colorDataBand) != colorNp)
395  {
396  if((*normalX != normalNp)&&
397  (*normalY != normalNp)&&
398  (*normalZ != normalNp)&&
399  theValuesAreGood)
400  {
401 
402  double cosineNewI = ((*normalX)*theLightDirection[0] +
403  (*normalY)*theLightDirection[1] +
404  (*normalZ)*theLightDirection[2]);
405  double cosineRatioDenom = (cosineNewI + c);
406  if((fabs(cosineRatioDenom) > FLT_EPSILON)&&(cosineNewI >= 0.0))
407  {
408  double cosineRatio = numerator/cosineRatioDenom;
409 
410  LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
411 
412  LNew = LPrime*cosineRatio;
413 
414  dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
415 
416  if(dn < colorMin) dn = colorMin;
417  if(dn > colorMax) dn = colorMax;
418 
419  *outputDataBand = (T)(dn);
420  }
421  else
422  {
423  *outputDataBand = (T)(*colorDataBand);
424  }
425  }
426  else
427  {
428  *outputDataBand = (T)(*colorDataBand);
429  }
430  }
431  else
432  {
433  *outputDataBand = (T)outputNp;
434  }
435 
436  ++outputDataBand;
437  ++colorDataBand;
438  ++normalX;
439  ++normalY;
440  ++normalZ;
441  }
442  }
443  }
444 }
virtual ossim_uint32 getWidth() const
ossim_uint32 x
virtual const ossim_float64 * getMaxPix() const
virtual ossim_uint32 getNumberOfBands() const
ossim_uint32 y
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
double ossim_float64
#define FLT_EPSILON
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
double cosd(double x)
Definition: ossimCommon.h:259
virtual const ossim_float64 * getMinPix() const
virtual const void * getBuf() const
int ossim_int32

◆ getAzimuthAngle()

double ossimTopographicCorrectionFilter::getAzimuthAngle ( ) const
virtual

◆ getBiasValues()

const vector< double > & ossimTopographicCorrectionFilter::getBiasValues ( ) const

Definition at line 1242 of file ossimTopographicCorrectionFilter.cpp.

References theBias.

1243 {
1244  return theBias;
1245 }

◆ getBoundingRect()

ossimIrect ossimTopographicCorrectionFilter::getBoundingRect ( ossim_uint32  resLevel = 0) const
virtual

This will return the bounding rect of the source.

We can have several sources which are in a chain to modify the bounding image rect. lets say you are next to an image handler then it will return the bounding rect for that image. If you are at the right side of a resampler then you will get a bounding rect along the image view plane. This is going to be a very import method for both image writers, mosaics or anything that needs to operate only within the bounds of an image.

Reimplemented from ossimImageCombiner.

Definition at line 1128 of file ossimTopographicCorrectionFilter.cpp.

References ossimImageSource::getBoundingRect(), ossimConnectableObject::getInput(), ossimIrect::makeNan(), and PTR_CAST.

1129 {
1130  ossimIrect result;
1131  result.makeNan();
1132  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1133 
1134  if(colorSource)
1135  {
1136  result = colorSource->getBoundingRect(resLevel);
1137  }
1138 
1139  return result;
1140 }
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
void makeNan()
Definition: ossimIrect.h:329

◆ getC()

double ossimTopographicCorrectionFilter::getC ( int  idx) const

Definition at line 1282 of file ossimTopographicCorrectionFilter.cpp.

References theC.

1283 {
1284  if(idx < (int)theC.size())
1285  {
1286  return theC[idx];
1287  }
1288  else
1289  {
1290  return 0.0;
1291  }
1292 }

◆ getDecimationFactor()

void ossimTopographicCorrectionFilter::getDecimationFactor ( ossim_uint32  resLevel,
ossimDpt result 
) const
virtual

Will return the decimation factor for the given resolution level.

the decimation is the scale from Resolution 0 or full res. Usually this is a power of 2 decimation where the decimation result is 1.0/2^resoltion.

Reimplemented from ossimImageSource.

Definition at line 1142 of file ossimTopographicCorrectionFilter.cpp.

References ossimImageSource::getDecimationFactor(), ossimConnectableObject::getInput(), ossimDpt::makeNan(), and PTR_CAST.

1144 {
1145  result.makeNan();
1146  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1147 
1148  if(colorSource)
1149  {
1150  colorSource->getDecimationFactor(resLevel,
1151  result);
1152  }
1153 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt &result) const
Will return the decimation factor for the given resolution level.
void makeNan()
Definition: ossimDpt.h:65

◆ getDecimationFactors()

void ossimTopographicCorrectionFilter::getDecimationFactors ( vector< ossimDpt > &  decimations) const
virtual

Definition at line 1155 of file ossimTopographicCorrectionFilter.cpp.

References ossimImageSource::getDecimationFactors(), ossimConnectableObject::getInput(), and PTR_CAST.

1156 {
1157  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1158  if(colorSource)
1159  {
1160  colorSource->getDecimationFactors(decimations);
1161  }
1162 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual void getDecimationFactors(std::vector< ossimDpt > &decimations) const
Will return an array of all decimations for each resolution level.

◆ getElevationAngle()

double ossimTopographicCorrectionFilter::getElevationAngle ( ) const
virtual

◆ getGainValues()

const std::vector< double > & ossimTopographicCorrectionFilter::getGainValues ( ) const

Definition at line 1232 of file ossimTopographicCorrectionFilter.cpp.

References theGain.

1233 {
1234  return theGain;
1235 }

◆ getK()

double ossimTopographicCorrectionFilter::getK ( int  idx) const

Definition at line 1257 of file ossimTopographicCorrectionFilter.cpp.

References theK.

1258 {
1259  if(idx < (int)theK.size())
1260  {
1261  return theK[idx];
1262  }
1263  else
1264  {
1265  return 1.0;
1266  }
1267 }

◆ getKValues()

const vector< double > & ossimTopographicCorrectionFilter::getKValues ( ) const

Definition at line 1252 of file ossimTopographicCorrectionFilter.cpp.

References theK.

1253 {
1254  return theK;
1255 }

◆ getMaxPixelValue()

double ossimTopographicCorrectionFilter::getMaxPixelValue ( ossim_uint32  band = 0) const
virtual

Returns the max pixel of the band.

Reimplemented from ossimImageCombiner.

Definition at line 1118 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageCombiner::getMaxPixelValue(), ossimImageSource::getMaxPixelValue(), and PTR_CAST.

1119 {
1120  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1121  if(colorSource)
1122  {
1123  return colorSource->getMaxPixelValue(band);
1124  }
1126 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.

◆ getMinPixelValue()

double ossimTopographicCorrectionFilter::getMinPixelValue ( ossim_uint32  band = 0) const
virtual

Returns the min pixel of the band.

Reimplemented from ossimImageCombiner.

Definition at line 1108 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageCombiner::getMinPixelValue(), ossimImageSource::getMinPixelValue(), and PTR_CAST.

1109 {
1110  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1111  if(colorSource)
1112  {
1113  return colorSource->getMinPixelValue(band);
1114  }
1116 }
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ getNullPixelValue()

double ossimTopographicCorrectionFilter::getNullPixelValue ( ossim_uint32  band = 0) const
virtual

Each band has a null pixel associated with it.

The null pixel represents an invalid value.

Reimplemented from ossimImageCombiner.

Definition at line 1098 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageCombiner::getNullPixelValue(), ossimImageSource::getNullPixelValue(), and PTR_CAST.

1099 {
1100  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1101  if(colorSource)
1102  {
1103  return colorSource->getNullPixelValue(band);
1104  }
1106 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.

◆ getNumberOfDecimationLevels()

ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfDecimationLevels ( ) const
virtual

Will return the number of resolution levels.

Note: resolution level 0 is included in the return count.

Reimplemented from ossimImageSource.

Definition at line 1164 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageSource::getNumberOfDecimationLevels(), and PTR_CAST.

1165 {
1166  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1167  if(colorSource)
1168  {
1169  return colorSource->getNumberOfDecimationLevels();
1170  }
1171  return 0;
1172 }
virtual ossim_uint32 getNumberOfDecimationLevels() const
Will return the number of resolution levels.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ getNumberOfOutputBands()

ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfOutputBands ( ) const
virtual

Returns the number of bands in a tile returned from this TileSource.

Reimplemented from ossimImageSource.

Definition at line 1078 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageSource::getNumberOfOutputBands(), and PTR_CAST.

1079 {
1080  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1081  if(colorSource)
1082  {
1083  return colorSource->getNumberOfOutputBands();
1084  }
1086 }
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ getOutputScalarType()

ossimScalarType ossimTopographicCorrectionFilter::getOutputScalarType ( ) const
virtual

This will be used to query the output pixel type of the tile source.

Please ignore the argument. It will soon be removed.

Reimplemented from ossimImageCombiner.

Definition at line 1088 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossimImageCombiner::getOutputScalarType(), ossimImageSource::getOutputScalarType(), and PTR_CAST.

1089 {
1090  ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
1091  if(colorSource)
1092  {
1093  return colorSource->getOutputScalarType();
1094  }
1096 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.

◆ getTile()

ossimRefPtr< ossimImageData > ossimTopographicCorrectionFilter::getTile ( const ossimIrect rect,
ossim_uint32  resLevel = 0 
)
virtual
Returns
the requested region of interest

Reimplemented from ossimImageSource.

Definition at line 67 of file ossimTopographicCorrectionFilter.cpp.

References allocate(), executeTopographicCorrection(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimConnectableObject::getInput(), ossimImageData::getNumberOfBands(), ossimRectilinearDataObject::getScalarType(), ossimImageSource::getTile(), ossimImageData::getWidth(), ossimIrect::height(), ossimImageData::initialize(), ossimSource::isSourceEnabled(), ossimImageData::makeBlank(), OSSIM_DOUBLE, OSSIM_EMPTY, PTR_CAST, ossimImageData::setHeight(), ossimImageData::setOrigin(), ossimImageData::setWidth(), theTile, ossimIrect::ul(), ossimRefPtr< T >::valid(), ossimImageData::validate(), and ossimIrect::width().

70 {
72  getInput(0));
74  getInput(1));
75 
76  if(!isSourceEnabled()||!normalSource||!colorSource)
77  {
78  if(colorSource)
79  {
80  return colorSource->getTile(tileRect, resLevel);
81  }
82  }
83 
84  if(!theTile.valid())
85  {
86  allocate();
87  }
88 
89  if(!theTile)
90  {
92  }
93 
94  long w = tileRect.width();
95  long h = tileRect.height();
96  ossimIpt origin = tileRect.ul();
97 
98  theTile->setOrigin(origin);
99  long tileW = theTile->getWidth();
100  long tileH = theTile->getHeight();
101  if((w != tileW)||
102  (h != tileH))
103  {
104  theTile->setWidth(w);
105  theTile->setHeight(h);
106  if((w*h)!=(tileW*tileH))
107  {
108  theTile->initialize();
109  }
110  else
111  {
112  theTile->makeBlank();
113  }
114  }
115  else
116  {
117  theTile->makeBlank();
118  }
119 
120  // ossimImageData* inputTile = NULL;
121 
122  ossimRefPtr<ossimImageData> normalData = normalSource->getTile(tileRect,
123  resLevel);
124 
125  ossimRefPtr<ossimImageData> colorData = colorSource->getTile(tileRect,
126  resLevel);
127 
128  if(!colorData.valid() || !normalData.valid())
129  {
130  return theTile;
131  }
132 
133  if((normalData->getNumberOfBands() != 3)||
134  (normalData->getScalarType() != OSSIM_DOUBLE)||
135  !normalData->getBuf()||
136  !colorData->getBuf()||
137  (colorData->getDataObjectStatus() == OSSIM_EMPTY)||
138  (normalData->getDataObjectStatus()==OSSIM_EMPTY))
139  {
140  return colorData;
141  }
142 
144  colorData,
145  normalData);
146  theTile->validate();
147  return theTile;
148 }
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
virtual ossim_uint32 getNumberOfBands() const
bool valid() const
Definition: ossimRefPtr.h:75
virtual void executeTopographicCorrection(ossimRefPtr< ossimImageData > &outputData, ossimRefPtr< ossimImageData > &colorData, ossimRefPtr< ossimImageData > &normalData)
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
virtual void initialize()
Initialize the data buffer.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void setHeight(ossim_uint32 height)
virtual ossimDataObjectStatus validate() const
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual void setWidth(ossim_uint32 width)
virtual void setOrigin(const ossimIpt &origin)
virtual ossimScalarType getScalarType() const
virtual void makeBlank()
Initializes data to null pixel values.
virtual const void * getBuf() const
64 bit floating point
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getTopoCorrectionType()

ossimTopographicCorrectionFilter::ossimTopoCorrectionType ossimTopographicCorrectionFilter::getTopoCorrectionType ( ) const
virtual

Definition at line 1222 of file ossimTopographicCorrectionFilter.cpp.

References theTopoCorrectionType.

1223 {
1224  return theTopoCorrectionType;
1225 }

◆ initialize()

void ossimTopographicCorrectionFilter::initialize ( )
virtual

Reimplemented from ossimImageCombiner.

Reimplemented in ossimLandsatTopoCorrectionFilter.

Definition at line 150 of file ossimTopographicCorrectionFilter.cpp.

References ossimImageCombiner::initialize(), and theTile.

Referenced by connectInputEvent(), disconnectInputEvent(), ossimLandsatTopoCorrectionFilter::initialize(), propertyEvent(), and refreshEvent().

151 {
153 
154  // Force an "allocate()" on the first getTile.
155  theTile = NULL;
156 }

◆ loadState()

bool ossimTopographicCorrectionFilter::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of an object from a keyword list.

Return true if ok or false on error.

Reimplemented from ossimImageCombiner.

Reimplemented in ossimLandsatTopoCorrectionFilter.

Definition at line 898 of file ossimTopographicCorrectionFilter.cpp.

References ossimKeywordNames::AZIMUTH_ANGLE_KW, ossimKeywordNames::ELEVATION_ANGLE_KW, ossimKeywordlist::find(), and ossimKeywordNames::NUMBER_BANDS_KW.

Referenced by ossimLandsatTopoCorrectionFilter::loadState().

900 {
901 
902  ossimString elevAngle = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
903  ossimString azimuthAngle = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
905  ossimString correctionType = kwl.find(prefix, CORRECTION_TYPE_KW);
906  ossimString julianDay = kwl.find(prefix, ossimKeywordNames::JULIAN_DAY_KW);
907  ossimString cComputedFlag = kwl.find(prefix, C_COMPUTED_FLAG_KW);
908  ossimString ndviRange = kwl.find(prefix, NDVI_RANGE_KW);
909 
910  theCComputedFlag = cComputedFlag.toBool();
911  correctionType = correctionType.downcase();
912  int numberOfBands = bands.toInt();
914  theLightSourceAzimuthAngle = azimuthAngle.toDouble();
915  theJulianDay = julianDay.toDouble();
916 
917  if(ndviRange != "")
918  {
919  std::istringstream input(ndviRange.c_str());
920 
921  input >> theNdviLowTest >> theNdviHighTest;
922  }
923  if(numberOfBands>0)
924  {
925  theGain.resize(numberOfBands);
926  theBias.resize(numberOfBands);
927  theC.resize(numberOfBands);
928  theK.resize(numberOfBands);
929  for(int b = 0; b < numberOfBands; ++b)
930  {
933  ossimString bias = "bias"+ossimString::toString(b);
934  ossimString gain = "gain"+ossimString::toString(b);
935 
936  const char* kValue = kwl.find(prefix, k);
937  const char* cValue = kwl.find(prefix, c);
938  const char* biasValue = kwl.find(prefix, bias);
939  const char* gainValue = kwl.find(prefix, gain);
940  if(kValue)
941  {
942  theK[b] = ossimString(kValue).toDouble();
943  }
944  else
945  {
946  theK[b] = 1.0;
947  }
948  if(cValue)
949  {
950  theC[b] = ossimString(cValue).toDouble();
951  }
952  else
953  {
954  theC[b] = 0.0;;
955  }
956  if(biasValue)
957  {
958  theBias[b] = ossimString(biasValue).toDouble();
959  }
960  else
961  {
962  theBias[b] = 0.0;
963  }
964  if(gainValue)
965  {
966  theGain[b] = ossimString(gainValue).toDouble();
967  }
968  else
969  {
970  theGain[b] = 1.0;
971  }
972  }
973  }
974 
975  if(correctionType.contains("cosine_c"))
976  {
978  }
979  else if(correctionType.contains("minnaert"))
980  {
982  }
983  else
984  {
986  }
987 
988 
989  bool result = ossimImageCombiner::loadState(kwl, prefix);
990 
992 
993  return result;
994 }
const char * find(const char *key) const
bool contains(char aChar) const
Definition: ossimString.h:58
static ossimString toString(bool aValue)
Numeric to string methods.
static const char * JULIAN_DAY_KW
bool toBool() const
String to numeric methods.
double toDouble() const
static const char * NUMBER_BANDS_KW
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
static const char * AZIMUTH_ANGLE_KW
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
static const char * ELEVATION_ANGLE_KW
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
Method to the load (recreate) the state of an object from a keyword list.
int toInt() const

◆ propertyEvent()

void ossimTopographicCorrectionFilter::propertyEvent ( ossimPropertyEvent event)
virtual

Reimplemented from ossimImageCombiner.

Definition at line 1212 of file ossimTopographicCorrectionFilter.cpp.

References initialize().

1213 {
1214  initialize();
1215 }

◆ refreshEvent()

void ossimTopographicCorrectionFilter::refreshEvent ( ossimRefreshEvent event)
virtual

Reimplemented from ossimImageCombiner.

Definition at line 1217 of file ossimTopographicCorrectionFilter.cpp.

References initialize().

1218 {
1219  initialize();
1220 }

◆ resizeArrays()

void ossimTopographicCorrectionFilter::resizeArrays ( ossim_uint32  newSize)
protected

Definition at line 847 of file ossimTopographicCorrectionFilter.cpp.

References ossimConnectableObject::getInput(), ossim::min(), theBias, theC, theGain, and theK.

Referenced by allocate().

848 {
849  if(!getInput(0) || !getInput(1)) return;
850 
851 
852  vector<double> tempC = theC;
853  vector<double> tempK = theK;
854  vector<double> tempBias = theBias;
855  vector<double> tempGain = theGain;
856 
857  theC.resize(newSize);
858  theK.resize(newSize);
859  theBias.resize(newSize);
860  theGain.resize(newSize);
861  ossim_uint32 tempIdx = 0;
862  if(tempC.size() > 0 && (theC.size() > 0))
863  {
864  int numberOfElements = ossim::min((int)tempC.size(),(int)theC.size());
865 
866  std::copy(tempC.begin(), tempC.begin()+numberOfElements,
867  theC.begin());
868  std::copy(tempK.begin(), tempK.begin()+numberOfElements,
869  theK.begin());
870  std::copy(tempBias.begin(), tempBias.begin()+numberOfElements,
871  theBias.begin());
872  std::copy(tempGain.begin(), tempGain.begin()+numberOfElements,
873  theGain.begin());
874 
875  if(theC.size() > tempC.size())
876  {
877  std::fill(theC.begin()+numberOfElements, theC.end(), (double)0.0);
878  std::fill(theBias.begin()+numberOfElements, theBias.end(), (double)0.0);
879  std::fill(theGain.begin()+numberOfElements, theGain.end(), (double)1.0);
880  for(tempIdx = numberOfElements; tempIdx < theK.size(); ++tempIdx)
881  {
882  theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
883  }
884  }
885  }
886  else
887  {
888  std::fill(theC.begin(), theC.end(), (double)0.0);
889  std::fill(theBias.begin(), theBias.end(), (double)0.0);
890  std::fill(theGain.begin(), theGain.end(), (double)1.0);
891  for(tempIdx = 0; tempIdx < theK.size(); ++tempIdx)
892  {
893  theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
894  }
895  }
896 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
T min(T a, T b)
Definition: ossimCommon.h:203

◆ saveState()

bool ossimTopographicCorrectionFilter::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of an object to a keyword list.

Return true if ok or false on error.

Reimplemented from ossimImageCombiner.

Reimplemented in ossimLandsatTopoCorrectionFilter.

Definition at line 996 of file ossimTopographicCorrectionFilter.cpp.

References ossimKeywordlist::add(), ossimKeywordNames::AZIMUTH_ANGLE_KW, ossimKeywordNames::ELEVATION_ANGLE_KW, ossimKeywordNames::NUMBER_BANDS_KW, theC, theLightSourceAzimuthAngle, and theLightSourceElevationAngle.

Referenced by ossimLandsatTopoCorrectionFilter::saveState().

998 {
999  // we can use any of the arrays theC, theBias, or theGain since
1000  // they mirror the number of input bands
1001  //
1002  int numberOfBands = (int)theC.size();
1003 
1004  kwl.add(prefix,
1006  numberOfBands,
1007  true);
1008 
1009  kwl.add(prefix,
1012  true);
1013 
1014  kwl.add(prefix,
1017  true);
1018 
1019  kwl.add(prefix,
1020  C_COMPUTED_FLAG_KW,
1022  true);
1023  kwl.add(prefix,
1024  NDVI_RANGE_KW,
1027  true);
1028 
1030  {
1031  kwl.add(prefix,
1032  CORRECTION_TYPE_KW,
1033  "cosine_c",
1034  true);
1035  }
1037  {
1038  kwl.add(prefix,
1039  CORRECTION_TYPE_KW,
1040  "minnaert",
1041  true);
1042  }
1043  else
1044  {
1045  kwl.add(prefix,
1046  CORRECTION_TYPE_KW,
1047  "cosine",
1048  true);
1049  }
1050 
1051  for(int b = 0; b < numberOfBands; ++b)
1052  {
1055  ossimString bias = "bias"+ossimString::toString(b);
1056  ossimString gain = "gain"+ossimString::toString(b);
1057  kwl.add(prefix,
1058  k,
1059  theK[b],
1060  true);
1061  kwl.add(prefix,
1062  c,
1063  theC[b],
1064  true);
1065  kwl.add(prefix,
1066  bias,
1067  theBias[b],
1068  true);
1069  kwl.add(prefix,
1070  gain,
1071  theGain[b],
1072  true);
1073  }
1074 
1075  return ossimImageCombiner::saveState(kwl, prefix);
1076 }
static ossimString toString(bool aValue)
Numeric to string methods.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
unsigned int ossim_uint32
static const char * NUMBER_BANDS_KW
static const char * AZIMUTH_ANGLE_KW
static const char * ELEVATION_ANGLE_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
Method to save the state of an object to a keyword list.

◆ setAzimuthAngle()

void ossimTopographicCorrectionFilter::setAzimuthAngle ( double  angle)
virtual

◆ setBiasValues()

void ossimTopographicCorrectionFilter::setBiasValues ( const std::vector< double > &  biasValues)

Definition at line 1247 of file ossimTopographicCorrectionFilter.cpp.

References theBias.

1248 {
1249  theBias = biasValues;
1250 }

◆ setC()

void ossimTopographicCorrectionFilter::setC ( int  idx,
double  value 
)

Definition at line 1294 of file ossimTopographicCorrectionFilter.cpp.

References theC.

1295 {
1296  if(idx < (int)theC.size())
1297  {
1298  theC[idx] = value;
1299  }
1300 }

◆ setCCmputedFlag()

bool ossimTopographicCorrectionFilter::setCCmputedFlag ( )
protected

◆ setCValues()

void ossimTopographicCorrectionFilter::setCValues ( const vector< double > &  cValues)

Definition at line 1302 of file ossimTopographicCorrectionFilter.cpp.

References theC.

1303 {
1304  theC = cValues;
1305 }

◆ setElevationAngle()

void ossimTopographicCorrectionFilter::setElevationAngle ( double  angle)
virtual

◆ setGainValues()

void ossimTopographicCorrectionFilter::setGainValues ( const std::vector< double > &  gainValues)

Definition at line 1237 of file ossimTopographicCorrectionFilter.cpp.

References theGain.

1238 {
1239  theGain = gainValues;
1240 }

◆ setK()

void ossimTopographicCorrectionFilter::setK ( int  idx,
double  value 
)

Definition at line 1269 of file ossimTopographicCorrectionFilter.cpp.

References theK.

1270 {
1271  if(idx < (int)theK.size())
1272  {
1273  theK[idx] = value;
1274  }
1275 }

◆ setKValues()

void ossimTopographicCorrectionFilter::setKValues ( const vector< double > &  kValues)

Definition at line 1277 of file ossimTopographicCorrectionFilter.cpp.

References theK.

1278 {
1279  theK = kValues;
1280 }

◆ setTopoCorrectionType()

void ossimTopographicCorrectionFilter::setTopoCorrectionType ( ossimTopoCorrectionType  topoType)
virtual

Definition at line 1227 of file ossimTopographicCorrectionFilter.cpp.

References theTopoCorrectionType.

1228 {
1229  theTopoCorrectionType = topoType;
1230 }

Member Data Documentation

◆ theBandMapping

std::vector<ossim_uint32> ossimTopographicCorrectionFilter::theBandMapping
protected

◆ theBias

std::vector<double> ossimTopographicCorrectionFilter::theBias
protected

◆ theC

std::vector<double> ossimTopographicCorrectionFilter::theC
protected

◆ theCComputedFlag

bool ossimTopographicCorrectionFilter::theCComputedFlag
mutableprotected

Definition at line 182 of file ossimTopographicCorrectionFilter.h.

◆ theGain

std::vector<double> ossimTopographicCorrectionFilter::theGain
protected

◆ theJulianDay

double ossimTopographicCorrectionFilter::theJulianDay
protected

◆ theK

std::vector<double> ossimTopographicCorrectionFilter::theK
protected

◆ theLightDirection

double ossimTopographicCorrectionFilter::theLightDirection[3]
protected

This is computed from the elevation and azimuth angles of the light source.

Definition at line 179 of file ossimTopographicCorrectionFilter.h.

Referenced by computeLightDirection(), executeTopographicCorrectionMinnaertTemplate(), and executeTopographicCorrectionTemplate().

◆ theLightSourceAzimuthAngle

double ossimTopographicCorrectionFilter::theLightSourceAzimuthAngle
protected

◆ theLightSourceElevationAngle

double ossimTopographicCorrectionFilter::theLightSourceElevationAngle
protected

◆ theNdviHighTest

double ossimTopographicCorrectionFilter::theNdviHighTest
protected

Definition at line 185 of file ossimTopographicCorrectionFilter.h.

◆ theNdviLowTest

double ossimTopographicCorrectionFilter::theNdviLowTest
protected

Definition at line 184 of file ossimTopographicCorrectionFilter.h.

◆ theTile

ossimRefPtr<ossimImageData> ossimTopographicCorrectionFilter::theTile
protected

The result of the illumination equation is stored in here. This is populated on each call to getTile.

Definition at line 154 of file ossimTopographicCorrectionFilter.h.

Referenced by allocate(), getTile(), and initialize().

◆ theTopoCorrectionType

ossimTopoCorrectionType ossimTopographicCorrectionFilter::theTopoCorrectionType
protected

The documentation for this class was generated from the following files: