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

This class imlements the fusion algorithm from the paper: More...

#include <ossimSFIMFusion.h>

Inheritance diagram for ossimSFIMFusion:
ossimFusionCombiner ossimAdjustableParameterInterface ossimImageCombiner ossimImageSource ossimConnectableObjectListener ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimSFIMFusion ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, ossim_uint32 resLevel=0)
 
virtual void initialize ()
 
virtual ossimObjectgetBaseObject ()
 
virtual const ossimObjectgetBaseObject () const
 
virtual void initAdjustableParameters ()
 
virtual void adjustableParametersChanged ()
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
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...
 
- Public Member Functions inherited from ossimFusionCombiner
 ossimFusionCombiner ()
 
 ossimFusionCombiner (ossimObject *owner)
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 This will return the bounding rect of the source. More...
 
bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes More...
 
ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. More...
 
- 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 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 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 void connectInputEvent (ossimConnectionEvent &event)
 
virtual void disconnectInputEvent (ossimConnectionEvent &event)
 
virtual void propertyEvent (ossimPropertyEvent &event)
 
virtual void refreshEvent (ossimRefreshEvent &event)
 
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 getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 Will return the decimation factor for the given resolution level. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Will return the number of resolution levels. More...
 
virtual ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. 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 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
 
- Public Member Functions inherited from ossimAdjustableParameterInterface
 ossimAdjustableParameterInterface ()
 
 ossimAdjustableParameterInterface (const ossimAdjustableParameterInterface &rhs)
 
virtual ~ossimAdjustableParameterInterface ()
 
void newAdjustment (ossim_uint32 numberOfParameters=0)
 
void setAdjustmentDescription (const ossimString &description)
 
ossimString getAdjustmentDescription () const
 
ossimString getAdjustmentDescription (ossim_uint32 adjustmentIdx) const
 Returns adjustmentDescription of specific adjustmentInfo. More...
 
void setCurrentAdjustment (ossim_uint32 adjustmentIndex, bool notify=false)
 
bool setCurrentAdjustment (const ossimString &description, bool notify=false)
 Sets the current adjustment to the adjustment with a matching description. More...
 
void eraseAdjustment (bool notify)
 
void eraseAdjustment (ossim_uint32 idx, bool notify)
 
void resetAdjustableParameters (bool notify=false)
 
void copyAdjustment (ossim_uint32 idx, bool notify)
 
void copyAdjustment (bool notify=false)
 
void keepAdjustment (ossim_uint32 idx, bool createCopy)
 
virtual void keepAdjustment (bool createCopy=true)
 
const ossimAdjustableParameterInterfaceoperator= (const ossimAdjustableParameterInterface &rhs)
 
void removeAllAdjustments ()
 
ossim_uint32 getNumberOfAdjustableParameters () const
 
double getAdjustableParameter (ossim_uint32 idx) const
 
virtual void setAdjustableParameter (ossim_uint32 idx, double value, bool notify=false)
 
virtual void setAdjustableParameter (ossim_uint32 idx, double value, double sigma, bool notify=false)
 
double getParameterSigma (ossim_uint32 idx) const
 
void setParameterSigma (ossim_uint32 idx, double value, bool notify=false)
 
ossimUnitType getParameterUnit (ossim_uint32 idx) const
 
void setParameterUnit (ossim_uint32 idx, ossimUnitType unit)
 
void setParameterUnit (ossim_uint32 idx, const ossimString &unit)
 
void setParameterCenter (ossim_uint32 idx, double center, bool notify=false)
 
double getParameterCenter (ossim_uint32 idx) const
 
double computeParameterOffset (ossim_uint32 idx) const
 
void setParameterOffset (ossim_uint32 idx, ossim_float64 value, bool notify=false)
 
ossimString getParameterDescription (ossim_uint32 idx) const
 
void setParameterDescription (ossim_uint32 idx, const ossimString &descrption)
 
ossim_int32 findParameterIdxGivenDescription (ossim_uint32 adjustmentIdx, const ossimString &name) const
 
ossim_int32 findParameterIdxContainingDescription (ossim_uint32 adjustmentIdx, const ossimString &name) const
 
bool isParameterLocked (ossim_uint32 idx) const
 
void setParameterLockFlag (ossim_uint32 idxParam, bool flag)
 
bool getParameterLockFlag (ossim_uint32 idx) const
 
void lockAllParametersCurrentAdjustment ()
 
void unlockAllParametersCurrentAdjustment ()
 
void lockAllParameters (ossim_uint32 idxAdjustment)
 
void unlockAllParameters (ossim_uint32 idxAdjustment)
 
void resizeAdjustableParameterArray (ossim_uint32 numberOfParameters)
 
void setAdjustment (const ossimAdjustmentInfo &adj, bool notify=false)
 
void setAdjustment (ossim_uint32 idx, const ossimAdjustmentInfo &adj, bool notify=false)
 
void addAdjustment (const ossimAdjustmentInfo &adj, bool notify)
 
void getAdjustment (ossimAdjustmentInfo &adj) const
 
void getAdjustment (ossim_uint32 idx, ossimAdjustmentInfo &adj) const
 
ossim_uint32 getNumberOfAdjustments () const
 
ossim_uint32 getCurrentAdjustmentIdx () const
 
void setDirtyFlag (bool flag=true)
 
void setAllDirtyFlag (bool flag=true)
 
bool hasDirtyAdjustments () const
 
virtual void saveCurrentAdjustmentOnly (ossimKeywordlist &kwl, const ossimString &prefix=ossimString(""))
 Saves the current active adjustment to the KWL file. More...
 
bool saveAdjustments (ossimKeywordlist &kwl, const ossimString &prefix=ossimString("")) const
 Save all adjustments to the KWL file. More...
 
bool loadAdjustments (const ossimKeywordlist &kwl, const ossimString &prefix=ossimString(""))
 
virtual void updateModel ()
 Provides the derived adjustable class an opportunity to update its state after a param change. More...
 
std::ostream & print (std::ostream &out) const
 Dumps the currently active adjustment to ostream. More...
 

Protected Member Functions

virtual ~ossimSFIMFusion ()
 
void setFilters ()
 
bool computeRegression (ossim_float64 &slopeResult, const ossimIpt &origin, ossimRefPtr< ossimImageData > panData, ossimRefPtr< ossimImageData > colorData, ossim_uint32 colorBandIdx)
 
- Protected Member Functions inherited from ossimFusionCombiner
virtual ~ossimFusionCombiner ()
 
ossimRefPtr< ossimImageDatagetNormIntensity (const ossimIrect &rect, ossim_uint32 resLevel)
 
ossimRefPtr< ossimImageDatagetNormTile (const ossimIrect &rect, ossim_uint32 resLevel)
 
- 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 Member Functions inherited from ossimAdjustableParameterInterface
bool paramChanged (ossim_uint32 param_idx) const
 Returns true if specified parameter has been modified since last setAllChangeFlag(false) call. More...
 
void setAllChangeFlags (bool areChanged)
 Sets all the change flags to the boolean indicated to indicate parameters are changed (TRUE) or not (FALSE). More...
 
void initChangeFlags ()
 Initializes the change flags to TRUE. More...
 

Protected Attributes

ossim_float64 theLowPassKernelWidth
 
ossim_uint32 theHighPassKernelWidth
 
ossimRefPtr< ossimImageGaussianFiltertheLowPassFilter
 
ossimRefPtr< ossimConvolutionSourcetheHighPassFilter
 
ossimRefPtr< ossimImageDatatheNormLowPassTile
 
ossimRefPtr< ossimImageDatatheNormHighPassTile
 
ossimRefPtr< ossimImageDatatheNormColorData
 
NEWMAT::Matrix theHighPassMatrix
 
bool theAutoAdjustScales
 
- Protected Attributes inherited from ossimFusionCombiner
ossimRefPtr< ossimImageDatatheTile
 
ossimRefPtr< ossimImageDatatheNormTile
 
ossimRefPtr< ossimImageDatatheNormIntensity
 
ossimImageSourcetheInputConnection
 
ossimImageSourcetheIntensityConnection
 
- 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
 

Additional Inherited Members

- 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
 

Detailed Description

This class imlements the fusion algorithm from the paper:

"Smoothing Filter-based Intesity Modulation: a spectral preserve image fusion technique for improving spatial details"

Pulished in INT. J. Remote Sensing, 2000, Vol. 21 NO. 18, 3461-3472

By J. G. LIU

Auther: Garrett Potts LICENSE: MIT

Definition at line 31 of file ossimSFIMFusion.h.

Constructor & Destructor Documentation

◆ ossimSFIMFusion()

ossimSFIMFusion::ossimSFIMFusion ( )

Definition at line 29 of file ossimSFIMFusion.cpp.

References initAdjustableParameters(), setFilters(), theAutoAdjustScales, theHighPassFilter, and theLowPassFilter.

32 {
33  theAutoAdjustScales = true;
36 
37  setFilters();
38 
40 }
ossim_uint32 theHighPassKernelWidth
class for symmetric Gaussian filtering implemented as two separable horizontal/vertical gaussian filt...
ossim_float64 theLowPassKernelWidth
ossimRefPtr< ossimConvolutionSource > theHighPassFilter
ossimRefPtr< ossimImageGaussianFilter > theLowPassFilter
virtual void initAdjustableParameters()

◆ ~ossimSFIMFusion()

ossimSFIMFusion::~ossimSFIMFusion ( )
protectedvirtual

Definition at line 42 of file ossimSFIMFusion.cpp.

43 {
44 }

Member Function Documentation

◆ adjustableParametersChanged()

void ossimSFIMFusion::adjustableParametersChanged ( )
virtual

Reimplemented from ossimAdjustableParameterInterface.

Definition at line 314 of file ossimSFIMFusion.cpp.

References ossimAdjustableParameterInterface::computeParameterOffset(), and theLowPassKernelWidth.

Referenced by initialize(), and loadState().

315 {
316 // std::cout << "Parameter offset = " << computeParameterOffset(2) << std::endl;
317  theLowPassKernelWidth = (ossim_uint32)(ossim::round<int>(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)));
318 }
unsigned int ossim_uint32
ossim_float64 theLowPassKernelWidth

◆ computeRegression()

bool ossimSFIMFusion::computeRegression ( ossim_float64 slopeResult,
const ossimIpt origin,
ossimRefPtr< ossimImageData panData,
ossimRefPtr< ossimImageData colorData,
ossim_uint32  colorBandIdx 
)
protected

◆ getBaseObject() [1/2]

virtual ossimObject* ossimSFIMFusion::getBaseObject ( )
inlinevirtual

Implements ossimAdjustableParameterInterface.

Definition at line 40 of file ossimSFIMFusion.h.

41  {
42  return this;
43  }

◆ getBaseObject() [2/2]

virtual const ossimObject* ossimSFIMFusion::getBaseObject ( ) const
inlinevirtual

Implements ossimAdjustableParameterInterface.

Definition at line 44 of file ossimSFIMFusion.h.

45  {
46  return this;
47  }

◆ getProperty()

ossimRefPtr< ossimProperty > ossimSFIMFusion::getProperty ( const ossimString name) const
virtual

Reimplemented from ossimImageSource.

Definition at line 345 of file ossimSFIMFusion.cpp.

References ossimAdjustableParameterInterface::computeParameterOffset(), and ossimString::toString().

346 {
347  if(name == "low_pass_kernel_width")
348  {
349  ossimNumericProperty* prop = new ossimNumericProperty(name,
350  ossimString::toString(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)),
351  getParameterCenter(LOW_PASS_WIDTH_OFFSET)-getParameterSigma(LOW_PASS_WIDTH_OFFSET),
352  getParameterCenter(LOW_PASS_WIDTH_OFFSET)+getParameterSigma(LOW_PASS_WIDTH_OFFSET));
353  prop->setCacheRefreshBit();
354  return prop;
355  }
356  else if(name == "high_pass_gain")
357  {
358  ossimNumericProperty* prop = new ossimNumericProperty(name,
359  ossimString::toString(computeParameterOffset(HIGH_PASS_GAIN_OFFSET)),
360  getParameterCenter(HIGH_PASS_GAIN_OFFSET)-getParameterSigma(HIGH_PASS_GAIN_OFFSET),
361  getParameterCenter(HIGH_PASS_GAIN_OFFSET)+getParameterSigma(HIGH_PASS_GAIN_OFFSET));
362  prop->setCacheRefreshBit();
363  return prop;
364  }
365  else if(name=="auto_adjust_scales")
366  {
368  prop->setCacheRefreshBit();
369  return prop;
370  }
371 
373 }
static ossimString toString(bool aValue)
Numeric to string methods.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
void setCacheRefreshBit()

◆ getPropertyNames()

void ossimSFIMFusion::getPropertyNames ( std::vector< ossimString > &  propertyNames) const
virtual

Reimplemented from ossimImageSource.

Definition at line 375 of file ossimSFIMFusion.cpp.

References ossimImageSource::getPropertyNames().

376 {
378  propertyNames.push_back("low_pass_kernel_width");
379  propertyNames.push_back("high_pass_gain");
380  propertyNames.push_back("auto_adjust_scales");
381 }
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const

◆ getTile()

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

Reimplemented from ossimImageSource.

Definition at line 46 of file ossimSFIMFusion.cpp.

References ossimImageData::copyNormalizedBufferToTile(), ossimImageData::copyTileBandToNormalizedBuffer(), ossimImageData::dup(), FLT_EPSILON, ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimConnectableObject::getInput(), ossimImageData::getMinPix(), ossimFusionCombiner::getNormTile(), ossimImageData::getNumberOfBands(), ossimImageSource::getTile(), ossimImageGaussianFilter::getTile(), ossimConvolutionSource::getTile(), ossimImageData::getWidth(), ossimIrect::height(), initialize(), ossimImageData::initialize(), ossimImageData::loadTile(), ossimImageData::makeBlank(), OSSIM_EMPTY, OSSIM_NORMALIZED_FLOAT, ossimImageData::setImageRectangle(), theHighPassFilter, ossimFusionCombiner::theInputConnection, ossimFusionCombiner::theIntensityConnection, theLowPassFilter, theNormHighPassTile, theNormLowPassTile, ossimFusionCombiner::theTile, ossimRefPtr< T >::valid(), ossimImageData::validate(), ossimIrect::width(), x, and y.

48 {
50  {
52  }
53 
55  {
56  return theInputConnection->getTile(rect, resLevel);
57  }
58 
60  {
63  1,
64  rect.width(),
65  rect.height());
68  1,
69  rect.width(),
70  rect.height());
73  }
74 
79 
81  {
82  initialize();
83  }
84 
85  ossimRefPtr<ossimImageData> lowTile = theLowPassFilter->getTile(rect, resLevel);
86  ossimRefPtr<ossimImageData> highTile = theHighPassFilter->getTile(rect, resLevel);
87 // ossimRefPtr<ossimImageData> highTile = getNormIntensity(rect, resLevel);
88 
89  // if we don't have valid low and high pass then return the input color tile
90  // in its original format
91  //
92  if(!lowTile.valid()||!highTile.valid())
93  {
94 // return theInputConnection->getTile(rect, resLevel);
95  return 0;
96  }
97 
98  if((lowTile->getDataObjectStatus() == OSSIM_EMPTY)||
99  (!lowTile->getBuf()) ||
100  (highTile->getDataObjectStatus() == OSSIM_EMPTY)||
101  (!highTile->getBuf()))
102  {
103 // return theInputConnection->getTile(rect, resLevel);
104  return 0;
105  }
106 
107  ossimRefPtr<ossimImageData> normColorData = getNormTile(rect, resLevel);
108 
109  if(!normColorData.valid())
110  {
111  return 0;
112 // return theTile;
113  }
114 
115  // Must set the rectangle before querrying height and width.
116  theTile->setImageRectangle(rect);
117 
118  // Do a make blank in case the whole tile is not stuffed.
119  theTile->makeBlank();
120 
121  if((normColorData->getDataObjectStatus() == OSSIM_EMPTY)||
122  !normColorData->getBuf())
123  {
124  return theTile;
125  }
126 
127  ossim_uint32 y = 0;
128  ossim_uint32 x = 0;
131 
132  ossimRefPtr<ossimImageData> normColorOutputData = (ossimImageData*)normColorData->dup();
133  normColorOutputData->setImageRectangle(rect);
134  normColorOutputData->loadTile(normColorData.get());
135 
136  // ossim_float64 slopeResult = 0.0;
137  ossim_uint32 idx = 0;
138  std::vector<ossim_float32*> bands(normColorData->getNumberOfBands());
139 
140  // Use copyTileBand... in case n-band data passed in for pan input.
143 
147  lowPan->setImageRectangle(rect);
148  lowPan->loadTile(theNormLowPassTile.get());
150  highPan->setImageRectangle(rect);
151  highPan->loadTile(theNormHighPassTile.get());
152 
153  ossim_float32* panHigh = (ossim_float32*)highPan->getBuf();
154  ossim_float32* panLow = (ossim_float32*)lowPan->getBuf();
155  for(idx = 0; idx < bands.size(); ++idx)
156  {
157  bands[idx] = (ossim_float32*)normColorOutputData->getBuf(idx);
158  }
159  // double delta = 0.0;
160  ossim_uint32 bandsSize = (ossim_uint32)bands.size();
161  double normMinPix = 0.0;
162  for(y = 0; y < h; ++y)
163  {
164  for(x = 0; x < w; ++x)
165  {
166  for(idx = 0; idx < bandsSize; ++idx)
167  {
168  if((*bands[idx] != 0.0)&&
169  (*panLow > FLT_EPSILON) ) // if band is not null and not divide by 0
170  {
171  normMinPix = (ossim_float32)normColorOutputData->getMinPix(idx);
172  *bands[idx] = ((*bands[idx])*(*panHigh))/
173  (*panLow);
174  if(*bands[idx] > 1.0) *bands[idx] = 1.0;
175  if(*bands[idx] < normMinPix) *bands[idx] = normMinPix;
176  }
177  // let's comment out the nulling and we will instead just pass the color on
178  //
179 // else
180 // {
181 // *bands[idx] = 0.0;
182 // }
183  ++bands[idx];
184  }
185  ++panHigh;
186  ++panLow;
187  }
188  }
189 
190  theTile->copyNormalizedBufferToTile((ossim_float32*)normColorOutputData->getBuf());
191  theTile->validate();
192 
193  return theTile;
194 }
virtual ossim_uint32 getWidth() const
ossim_uint32 x
virtual ossim_uint32 getNumberOfBands() const
ossimRefPtr< ossimImageData > getNormTile(const ossimIrect &rect, ossim_uint32 resLevel)
virtual void setImageRectangle(const ossimIrect &rect)
ossim_uint32 y
bool valid() const
Definition: ossimRefPtr.h:75
float ossim_float32
virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band, ossim_float64 *buf) const
Will copy this tiles specified band number to the normalized buffer.
ossim_uint32 height() const
Definition: ossimIrect.h:487
ossimRefPtr< ossimImageData > theTile
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
ossimImageSource * theInputConnection
ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual void initialize()
Initialize the data buffer.
virtual ossimObject * dup() const
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void loadTile(const void *src, const ossimIrect &src_rect, ossimInterleaveType il_type)
virtual ossimDataObjectStatus validate() const
#define FLT_EPSILON
ossimImageSource * theIntensityConnection
unsigned int ossim_uint32
32 bit normalized floating point
ossimRefPtr< ossimImageData > theNormLowPassTile
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
ossim_uint32 width() const
Definition: ossimIrect.h:500
ossimRefPtr< ossimImageData > theNormHighPassTile
virtual const ossim_float64 * getMinPix() const
virtual void makeBlank()
Initializes data to null pixel values.
virtual const void * getBuf() const
ossimRefPtr< ossimConvolutionSource > theHighPassFilter
ossimRefPtr< ossimImageGaussianFilter > theLowPassFilter
virtual void initialize()
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ initAdjustableParameters()

void ossimSFIMFusion::initAdjustableParameters ( )
virtual

Reimplemented from ossimAdjustableParameterInterface.

Definition at line 287 of file ossimSFIMFusion.cpp.

References ossimAdjustableParameterInterface::resizeAdjustableParameterArray().

Referenced by ossimSFIMFusion().

288 {
289  resizeAdjustableParameterArray(NUMBER_OF_ADJUSTABLE_PARAMETERS);
290 
291  setAdjustableParameter(HIGH_PASS_GAIN_OFFSET,
292  -1.0);
293  setParameterDescription(HIGH_PASS_GAIN_OFFSET,
294  "High pass gain");
295  setParameterSigma(HIGH_PASS_GAIN_OFFSET,
296  1);
297  setParameterCenter(HIGH_PASS_GAIN_OFFSET,
298  1.0);
299 
300  setAdjustableParameter(LOW_PASS_WIDTH_OFFSET,
301  -1);
302  setParameterDescription(LOW_PASS_WIDTH_OFFSET,
303  "Low pass kernel width");
304  setParameterSigma(LOW_PASS_WIDTH_OFFSET,
305  40);
306  setParameterCenter(LOW_PASS_WIDTH_OFFSET,
307  40.5);
308 
309 
310  setParameterOffset(LOW_PASS_WIDTH_OFFSET,
311  1.5);
312 }
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
void setParameterOffset(ossim_uint32 idx, ossim_float64 value, bool notify=false)
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
void setParameterCenter(ossim_uint32 idx, double center, bool notify=false)
void setParameterSigma(ossim_uint32 idx, double value, bool notify=false)

◆ initialize()

void ossimSFIMFusion::initialize ( )
virtual

Reimplemented from ossimFusionCombiner.

Definition at line 196 of file ossimSFIMFusion.cpp.

References ossimConnectableObject::accept(), adjustableParametersChanged(), ossimConnectableObject::connectMyInputTo(), ossimConnectableObject::disconnectAllInputs(), ossimImageSource::getImageGeometry(), ossimConnectableObject::getInput(), ossimImageGeometry::getMetersPerPixel(), ossimImageSource::getObject(), ossimCollectionVisitor::getObjectAs(), ossimDpt::hasNans(), ossimFusionCombiner::initialize(), ossimImageGaussianFilter::initialize(), ossimConvolutionSource::initialize(), ossimDpt::length(), PTR_CAST, ossimCollectionVisitor::reset(), setFilters(), ossimAdjustableParameterInterface::setParameterOffset(), theAutoAdjustScales, theHighPassFilter, ossimFusionCombiner::theInputConnection, ossimFusionCombiner::theIntensityConnection, theLowPassFilter, and ossimRefPtr< T >::valid().

Referenced by getTile().

197 {
200  {
203  }
204  else
205  {
211  setFilters();
215  {
217  {
218  ossimTypeNameVisitor visitor("ossimImageRenderer", true);
219 
220  theInputConnection->accept(visitor);
221  ossimRefPtr<ossimConnectableObject> inputColor = visitor.getObjectAs<ossimConnectableObject>();
222  visitor.reset();
223  theIntensityConnection->accept(visitor);
224  ossimRefPtr<ossimConnectableObject> inputPan = visitor.getObjectAs<ossimConnectableObject>();
225 
226 
227  if(inputColor.valid()&&inputPan.valid())
228  {
229  ossimImageSource* inputColorSource = dynamic_cast<ossimImageSource*> (inputColor->getInput());
230  ossimImageSource* inputPanSource = dynamic_cast<ossimImageSource*> (inputPan->getInput());
231 
232  if(inputColorSource&&inputPanSource)
233  {
234  ossimRefPtr<ossimImageGeometry> colorGeom = inputColorSource->getImageGeometry();
235  ossimRefPtr<ossimImageGeometry> intensityGeom = inputPanSource->getImageGeometry();
236  if(colorGeom.valid()&&intensityGeom.valid())
237  {
238  ossimDpt gsdIntensity = intensityGeom->getMetersPerPixel();
239  ossimDpt gsdColor = colorGeom->getMetersPerPixel();
240  if(!gsdColor.hasNans()&&!gsdIntensity.hasNans())
241  {
242  double scaleChange = gsdColor.length()/gsdIntensity.length();
243  if(scaleChange < 1.0) scaleChange = 1.0;
244  setParameterOffset(LOW_PASS_WIDTH_OFFSET,
245  scaleChange);
246  }
247  }
248  }
249  }
250  }
251  }
252  }
253 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual void adjustableParametersChanged()
ossimImageSource * theInputConnection
virtual ossimObject * getObject()
For RTTI support.
double length() const
Definition: ossimDpt.h:81
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
void setParameterOffset(ossim_uint32 idx, ossim_float64 value, bool notify=false)
ossimImageSource * theIntensityConnection
ossimDpt getMetersPerPixel() const
Returns the GSD associated with this image in the active projection.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
bool hasNans() const
Definition: ossimDpt.h:67
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimRefPtr< ossimConvolutionSource > theHighPassFilter
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.
virtual void initialize()
inherited methods
virtual void disconnectAllInputs()
Will disconnect all of the input objects.
ossimRefPtr< ossimImageGaussianFilter > theLowPassFilter

◆ loadState()

bool ossimSFIMFusion::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.

Definition at line 396 of file ossimSFIMFusion.cpp.

References adjustableParametersChanged(), ossimString::empty(), ossimKeywordlist::find(), ossimAdjustableParameterInterface::loadAdjustments(), ossimImageCombiner::loadState(), theAutoAdjustScales, and ossimString::toBool().

398 {
399  ossimFusionCombiner::loadState(kwl, prefix);
400  loadAdjustments(kwl, prefix);
402  ossimString autoAdjustScales = kwl.find(prefix, "auto_adjust_scales");
403 
404  if(!autoAdjustScales.empty())
405  {
406  theAutoAdjustScales = autoAdjustScales.toBool();
407  }
408  return true;
409 }
const char * find(const char *key) const
virtual void adjustableParametersChanged()
bool toBool() const
String to numeric methods.
bool loadAdjustments(const ossimKeywordlist &kwl, const ossimString &prefix=ossimString(""))
bool empty() const
Definition: ossimString.h:411
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
Method to the load (recreate) the state of an object from a keyword list.

◆ saveState()

bool ossimSFIMFusion::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.

Definition at line 383 of file ossimSFIMFusion.cpp.

References ossimKeywordlist::add(), ossimAdjustableParameterInterface::saveAdjustments(), ossimImageCombiner::saveState(), and theAutoAdjustScales.

385 {
386  ossimFusionCombiner::saveState(kwl, prefix);
387  saveAdjustments(kwl, prefix);
388  kwl.add(prefix,
389  "auto_adjust_scales",
391  true);
392 
393  return true;
394 }
bool saveAdjustments(ossimKeywordlist &kwl, const ossimString &prefix=ossimString("")) const
Save all adjustments to the KWL file.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
Method to save the state of an object to a keyword list.

◆ setFilters()

void ossimSFIMFusion::setFilters ( )
protected

Definition at line 255 of file ossimSFIMFusion.cpp.

References ossimAdjustableParameterInterface::computeParameterOffset(), ossimImageGaussianFilter::setGaussStd(), theHighPassKernelWidth, theHighPassMatrix, theLowPassFilter, and theLowPassKernelWidth.

Referenced by initialize(), and ossimSFIMFusion().

256 {
258 
260  theHighPassMatrix = 0;
262 
263  // adjust the gain for the high pass filter
264  //
265  NEWMAT::Matrix high = theHighPassMatrix;
266 
268  double gain = computeParameterOffset(HIGH_PASS_GAIN_OFFSET)*(kernelW2);
269  double multiplier = gain/(kernelW2);
270  high = -multiplier;
273 
274  if(gain > FLT_EPSILON)
275  {
276  high[cy][cx] = multiplier* ( (kernelW2-1)+kernelW2/gain);
277  }
278  else
279  {
280  high = 0.0;
281  high[cy][cx] = 1.0;
282  }
283 
285 }
ossim_uint32 theHighPassKernelWidth
double ossim_float64
NEWMAT::Matrix theHighPassMatrix
#define FLT_EPSILON
virtual void setConvolution(const double *kernel, int nrows, int ncols, bool doWeightedAverage=false)
void setGaussStd(const ossim_float64 &v)
ossim_float64 theLowPassKernelWidth
ossimRefPtr< ossimConvolutionSource > theHighPassFilter
ossimRefPtr< ossimImageGaussianFilter > theLowPassFilter
int ossim_int32

◆ setProperty()

void ossimSFIMFusion::setProperty ( ossimRefPtr< ossimProperty property)
virtual

Reimplemented from ossimImageSource.

Definition at line 320 of file ossimSFIMFusion.cpp.

References ossimAdjustableParameterInterface::setParameterOffset().

321 {
322  ossimString name = property->getName();
323  if(name=="low_pass_kernel_width")
324  {
325  setParameterOffset(LOW_PASS_WIDTH_OFFSET,
326  property->valueToString().toDouble(),
327  true);
328  }
329  else if(name=="high_pass_gain")
330  {
331  setParameterOffset(HIGH_PASS_GAIN_OFFSET,
332  property->valueToString().toDouble(),
333  true);
334  }
335  else if(name=="auto_adjust_scales")
336  {
337  theAutoAdjustScales = property->valueToString().toBool();
338  }
339  else
340  {
342  }
343 }
virtual void valueToString(ossimString &valueResult) const =0
virtual void setProperty(ossimRefPtr< ossimProperty > property)
void setParameterOffset(ossim_uint32 idx, ossim_float64 value, bool notify=false)

Member Data Documentation

◆ theAutoAdjustScales

bool ossimSFIMFusion::theAutoAdjustScales
protected

Definition at line 81 of file ossimSFIMFusion.h.

Referenced by initialize(), loadState(), ossimSFIMFusion(), and saveState().

◆ theHighPassFilter

ossimRefPtr<ossimConvolutionSource> ossimSFIMFusion::theHighPassFilter
protected

Definition at line 75 of file ossimSFIMFusion.h.

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

◆ theHighPassKernelWidth

ossim_uint32 ossimSFIMFusion::theHighPassKernelWidth
protected

Definition at line 71 of file ossimSFIMFusion.h.

Referenced by setFilters().

◆ theHighPassMatrix

NEWMAT::Matrix ossimSFIMFusion::theHighPassMatrix
protected

Definition at line 80 of file ossimSFIMFusion.h.

Referenced by setFilters().

◆ theLowPassFilter

ossimRefPtr<ossimImageGaussianFilter> ossimSFIMFusion::theLowPassFilter
protected

Definition at line 74 of file ossimSFIMFusion.h.

Referenced by getTile(), initialize(), ossimSFIMFusion(), and setFilters().

◆ theLowPassKernelWidth

ossim_float64 ossimSFIMFusion::theLowPassKernelWidth
protected

Definition at line 70 of file ossimSFIMFusion.h.

Referenced by adjustableParametersChanged(), and setFilters().

◆ theNormColorData

ossimRefPtr<ossimImageData> ossimSFIMFusion::theNormColorData
protected

Definition at line 78 of file ossimSFIMFusion.h.

◆ theNormHighPassTile

ossimRefPtr<ossimImageData> ossimSFIMFusion::theNormHighPassTile
protected

Definition at line 77 of file ossimSFIMFusion.h.

Referenced by getTile().

◆ theNormLowPassTile

ossimRefPtr<ossimImageData> ossimSFIMFusion::theNormLowPassTile
protected

Definition at line 76 of file ossimSFIMFusion.h.

Referenced by getTile().


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