OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Will combine the input data based on a supplied equation. More...
#include <ossimEquationCombiner.h>
Classes | |
class | ossimBinaryOp |
union | ossimEquDataType |
struct | ossimEquValue |
class | ossimUnaryOp |
Public Member Functions | |
ossimEquationCombiner () | |
ossimEquationCombiner (ossimConnectableObject::ConnectableObjectList &inputSources) | |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIrect &origin, ossim_uint32 resLevel=0) |
virtual void | initialize () |
virtual void | setEquation (const ossimString &equ) |
virtual ossimString | getEquation () const |
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 ossimScalarType | getOutputScalarType () const |
This will be used to query the output pixel type of the tile source. More... | |
virtual void | setProperty (ossimRefPtr< ossimProperty > property) |
virtual ossimRefPtr< ossimProperty > | getProperty (const ossimString &name) const |
virtual void | getPropertyNames (std::vector< ossimString > &propertyNames) const |
virtual void | setOutputScalarType (ossimScalarType scalarType) |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
![]() | |
ossimImageCombiner () | |
ossimImageCombiner (ossimObject *owner, int numberOfInputs, int numberOfOutputs, bool inputListIsFixedFlag, bool outputListIsFixedFlag) | |
ossimImageCombiner (ossimConnectableObject::ConnectableObjectList &inputSources) | |
virtual ossimIrect | getBoundingRect (ossim_uint32 resLevel=0) const |
This will return the bounding rect of the source. More... | |
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< ossimImageData > | getNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0) |
virtual ossimRefPtr< ossimImageData > | getNextTile (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< ossimImageData > | getNextNormTile (ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0) |
virtual ossimRefPtr< ossimImageData > | getNextNormTile (ossim_uint32 &returnedIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0) |
virtual 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 bool | hasDifferentInputs () const |
![]() | |
ossimImageSource (ossimObject *owner=0) | |
ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimImageSource () |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIpt &origin, ossim_uint32 resLevel=0) |
virtual bool | getTile (ossimImageData *result, ossim_uint32 resLevel=0) |
Method to get a tile. More... | |
virtual ossimObject * | getObject () |
For RTTI support. More... | |
virtual const ossimObject * | getObject () 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< ossimImageGeometry > | getImageGeometry () |
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 |
![]() | |
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... | |
![]() | |
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 ossimId & | getId () const |
Will allow us to get this object's id. More... | |
const ossimObject * | getOwner () 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< ossimConnectableObject > | disconnectMyInput (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< ossimConnectableObject > | disconnectMyOutput (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... | |
ossimConnectableObject * | getInput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getInput (ossim_uint32 index=0) const |
returns the object at the specified index. More... | |
ossimConnectableObject * | getOutput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getOutput (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 ConnectableObjectList & | getInputList () const |
const ConnectableObjectList & | getOutputList () const |
ConnectableObjectList & | getInputList () |
ConnectableObjectList & | getOutputList () |
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... | |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () 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 |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (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 |
![]() | |
ossimListenerManager () | |
virtual | ~ossimListenerManager () |
virtual void | fireEvent (ossimEvent &event) |
virtual bool | addListener (ossimListener *listener) |
virtual bool | removeListener (ossimListener *listener) |
virtual bool | findListener (ossimListener *listener) |
![]() | |
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) |
![]() | |
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 |
![]() | |
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 &) |
![]() | |
ossimListener () | |
virtual | ~ossimListener () |
void | enableListener () |
void | disableListener () |
void | setListenerEnableFlag (bool flag) |
bool | isListenerEnabled () const |
bool | getListenerEnableFlag () const |
Protected Types | |
enum | ossimEquValueType { OSSIM_EQU_TYPE_UNKNOWN = 0, OSSIM_EQU_DOUBLE_TYPE = 1, OSSIM_EQU_IMAGE_DATA_TYPE = 2 } |
Protected Member Functions | |
virtual | ~ossimEquationCombiner () |
virtual void | assignValue () |
virtual void | clearStacks () |
virtual void | clearArgList (vector< ossimEquValue > &argList) |
virtual ossimRefPtr< ossimImageData > | getImageData (ossim_uint32 index) |
virtual ossimRefPtr< ossimImageData > | getNewImageData (ossim_uint32 index) |
virtual void | deleteArgList (vector< ossimEquValue > &args) |
virtual bool | parseArgList (vector< ossimEquValue > &args, bool popValueStack=true) |
virtual ossimRefPtr< ossimImageData > | parseEquation () |
virtual bool | parseAssignBand () |
virtual bool | parseExpression () |
virtual bool | parseRestOfExp () |
virtual bool | parseTerm () |
virtual bool | parseRestOfTerm () |
virtual bool | parseFactor () |
virtual bool | parseStdFuncs () |
virtual bool | parseUnaryFactor () |
virtual bool | applyClamp (ossimImageData *&result, const vector< ossimEquValue > &argList) |
virtual bool | applyConvolution (ossimImageData *&result, const vector< ossimEquValue > &argList) |
virtual bool | applyBlurr (ossimImageData *&result, const vector< ossimEquValue > &argList) |
virtual bool | applyShift (ossimImageData *&result, const vector< ossimEquValue > &argList) |
virtual bool | applyOp (const ossimBinaryOp &op, ossimEquValue &result, ossimEquValue &v1, ossimEquValue &v2) |
virtual bool | applyOp (const ossimBinaryOp &op, ossimImageData *v1, double v2) |
virtual bool | applyOp (const ossimBinaryOp &op, double v1, ossimImageData *v2) |
virtual bool | applyOp (const ossimBinaryOp &op, ossimImageData *v1, ossimImageData *v2) |
virtual bool | applyOp (const ossimUnaryOp &op, ossimEquValue &result, ossimEquValue &v1) |
virtual bool | applyOp (const ossimUnaryOp &op, ossimImageData *v) |
![]() | |
virtual | ~ossimImageCombiner () |
void | precomputeBounds () const |
![]() | |
ossimImageSource (const ossimImageSource &rhs) | |
const ossimImageSource & | operator= (const ossimImageSource &) |
![]() | |
ossimSource (const ossimSource &rhs) | |
const ossimSource & | operator= (const ossimSource &rhs) |
![]() | |
ossimConnectableObject * | findObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor) |
![]() | |
virtual | ~ossimReferenced () |
![]() | |
ossimListenerManager (const ossimListenerManager &rhs) | |
Additional Inherited Members | |
![]() | |
enum | ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 } |
typedef std::vector< ossimRefPtr< ossimConnectableObject > > | ConnectableObjectList |
Will combine the input data based on a supplied equation.
This combiner uses the ossimEquTokenizer to create unique id's for all tokens in the formula. The parser is based on the following rules:
Prog -> Expr EOF Expr -> Term RestExpr RestExpr -> + Term RestExpr | - Term RestExpr | <null> Term -> Storable RestTerm RestTerm -> * Factor RestTerm | / Factor RestTerm | <null> Factor -> number | R | ( Expr )
The equation string represents input images as in[i] for i = 0, 1, ..., n. The following tokens are supported, where I, I1, I2, ..., In are inputs (either input images or image solutions of other equations):
sin(I) takes the sine of the input sind(I) takes the sin of the input and assumes degree input asin(I) computes the arc-sine of input in radians (input must be normalized) asind(I) computes the arc-sine of input in degrees (input must be normalized) cos(I) takes cosine of input cosd(I) takes the cosine of input and assumes input in degrees acos(I) computes the arc-cosine of input in radians (input must be normalized) acosd(I) computes the arc-cosine of input in degrees (input must be normalized) tan(I) takes tangent of input tand(I) takes the tangent of input and assumes input in degrees atan(I) computes the arc-tangent of input in radians atand(I) computes the arc-tangent of input in degrees sqrt(I) takes square root of input log(I) takes the natural log of input log10(I) takes the log base 10 of the input exp(I) takes the e raised to the passed in argument abs(I) takes the absolute value of the passed in value min(I1, I2, ... In) takes the min of all values in the list max(I1, I2, ... In) takes the max of all values in the list.
clamp(I, min, max) will clamp all data to be between the min max values. will set anything less than min to min and anythin larger than max to max
band(I, band_index) returns a single band image object by selecting band num from input image I. Note the first argument must be an image and the second argument must be a number
shift(I, rows, cols) currently, the first argument must be an image variable and rows, cols must be numbers indicating the delta in that direction to shift the input.
blurr(I, rows, cols) Will blurr the input image I with a rows-by-cols kernel. All values are equal weight. Note the fist argument must by an image variable (ex: i1, i2,....in).
conv(index, rows, cols, <row ordered list of values> ) this allows you to define an arbitrary matrix. The <row ordered="" list="" of="" values>=""> is a comma separated list of constant values.
assign_band(I1, num1, I2, num2) will take band num2 from image data I2 and assign it to band num1 in image data I1.
assign_band(I1, num1, I2) will take band 1 from image data I2 and assign it to band num1 in image data I1.
assign_band(I, num1, num2) will assin to band num1 of data I the value of num2
I1 * I2 will multiply I1 and I2 I1 + I2 will add I1 and I2 I1 - I2 will subtract I1 and I2 I1 / I2 will divide I1 and I2 I1 ^ I2 will do a power, raises I1 to I2 I1 | I2 will do a bitwise or operation ( will do it in unisgned char precision)
I1 & I2 will do a bitwise and operation ( will do it in unsigned char precision)
~I1 will do the ones complement of the input
I1 xor I2 will do an exclusive or operation (will do it in unsigned char precision)
Boolean ops: 1=true, 0=false I1 > I2 I1 >= I2 I1 == I2 I1 <= I2 I1 < I2 I1 <> I2
Note:
Currently an image input is reference by the variable "in[i]" where i represents the input image index starting from 0. So in[1] referes to the second image in the input source list.
Some examples:
(in[0] + in[1])/2 Will take image 0 and add it to image 1 and average them.
exp(sqrt(in[0])/4) Will take the root of the image and divide by 4 and then raise e to that amount.
128 Will return a constant value of 128 for all input bands.
shift(0, 1, 1) - in[0] Will shift the first input (0) by 1 pixel along the diagonal and then subtract the original from the shifted (edge detect).
assign_band(in[1], 1, blurr(in[1], 5, 5), 2) Will assign to the first band of input 1 the 2nd band of the 5x5 blurr of same image.
conv(0, 3, 3, -1, -2, -1, 0, 0, 0, 1, 2, 1) Will convolve the first input connection with a 3x3 matrix. The args are row ordered: -1, -2, -1 0, 0, 0 1, 2, 1
NDVI: N=(in[0]-in[1])/(in[0]+in[1])
For indexed-type values,like NDVI, (with limited values) it is better to rescale between 0.0 and 1.0 and use type NormalizedFloat.
Rescaled NDVI between 0 and 1: (N+1)/2 = in[0]/(in[0]+in[1])
With an ossimImageToPlaneNormalFilter feeding the DEM-image input, the slope at each pixel, normalized so that 1.0 = 90 deg from vertical, is computed with: "acosd(band(in[0],2))/90"
Definition at line 171 of file ossimEquationCombiner.h.
|
protected |
Enumerator | |
---|---|
OSSIM_EQU_TYPE_UNKNOWN | |
OSSIM_EQU_DOUBLE_TYPE | |
OSSIM_EQU_IMAGE_DATA_TYPE |
Definition at line 230 of file ossimEquationCombiner.h.
ossimEquationCombiner::ossimEquationCombiner | ( | ) |
Definition at line 379 of file ossimEquationCombiner.cpp.
References OSSIM_FLOAT64, ossimCastTileSourceFilter::setOutputScalarType(), theCastFilter, and theLexer.
ossimEquationCombiner::ossimEquationCombiner | ( | ossimConnectableObject::ConnectableObjectList & | inputSources | ) |
Definition at line 395 of file ossimEquationCombiner.cpp.
References OSSIM_FLOAT64, ossimCastTileSourceFilter::setOutputScalarType(), theCastFilter, and theLexer.
|
protectedvirtual |
Definition at line 411 of file ossimEquationCombiner.cpp.
References clearStacks(), ossimConnectableObject::disconnect(), theCastFilter, theCastOutputFilter, theLexer, and ossimRefPtr< T >::valid().
|
protectedvirtual |
Definition at line 2999 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimConnectableObject::disconnect(), ossimImageData::dup(), ossimRefPtr< T >::get(), ossimImageData::getImageRectangle(), ossimConnectableObject::getInput(), ossimCastTileSourceFilter::getTile(), ossimCastTileSourceFilter::initialize(), OSSIM_EQU_DOUBLE_TYPE, theCastFilter, theCurrentResLevel, theTile, and ossimRefPtr< T >::valid().
Referenced by parseStdFuncs().
|
protectedvirtual |
Definition at line 2847 of file ossimEquationCombiner.cpp.
References ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), OSSIM_EMPTY, OSSIM_EQU_DOUBLE_TYPE, OSSIM_NULL, OSSIM_PARTIAL, and status.
Referenced by parseStdFuncs().
|
protectedvirtual |
Definition at line 2929 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimConnectableObject::disconnect(), ossimImageData::dup(), ossimRefPtr< T >::get(), ossimImageData::getImageRectangle(), ossimConnectableObject::getInput(), ossimCastTileSourceFilter::getTile(), OSSIM_EQU_DOUBLE_TYPE, theCastFilter, theCurrentResLevel, theTile, and ossimRefPtr< T >::valid().
Referenced by parseStdFuncs().
|
protectedvirtual |
Definition at line 3108 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimBinaryOp::apply(), ossimEquationCombiner::ossimEquValue::d, ossimEquationCombiner::ossimEquDataType::doubleValue, ossimEquationCombiner::ossimEquDataType::imageDataValue, OSSIM_EQU_DOUBLE_TYPE, OSSIM_EQU_IMAGE_DATA_TYPE, and ossimEquationCombiner::ossimEquValue::type.
Referenced by applyOp(), parseRestOfExp(), parseRestOfTerm(), parseStdFuncs(), and parseUnaryFactor().
|
protectedvirtual |
Definition at line 3176 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimBinaryOp::apply(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getSize(), ossimImageData::getSizePerBand(), OSSIM_EMPTY, OSSIM_FULL, OSSIM_NULL, size, and status.
|
protectedvirtual |
Definition at line 3230 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimBinaryOp::apply(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getSize(), ossimImageData::getSizePerBand(), OSSIM_EMPTY, OSSIM_FULL, OSSIM_NULL, size, and status.
|
protectedvirtual |
Definition at line 3285 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimBinaryOp::apply(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), max, min, OSSIM_EMPTY, OSSIM_FULL, OSSIM_PARTIAL, ossimDataObject::setDataObjectStatus(), and size.
|
protectedvirtual |
Definition at line 3454 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimUnaryOp::apply(), applyOp(), ossimEquationCombiner::ossimEquValue::d, ossimEquationCombiner::ossimEquDataType::doubleValue, ossimEquationCombiner::ossimEquDataType::imageDataValue, OSSIM_EQU_DOUBLE_TYPE, OSSIM_EQU_IMAGE_DATA_TYPE, and ossimEquationCombiner::ossimEquValue::type.
|
protectedvirtual |
Definition at line 3481 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimUnaryOp::apply(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getSize(), ossimImageData::getSizePerBand(), OSSIM_EMPTY, OSSIM_FULL, OSSIM_NULL, size, and status.
|
protectedvirtual |
Definition at line 3056 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimConnectableObject::disconnect(), ossimImageData::dup(), ossimRefPtr< T >::get(), ossimImageData::getImageRectangle(), ossimConnectableObject::getInput(), ossimCastTileSourceFilter::getTile(), OSSIM_EQU_DOUBLE_TYPE, theCastFilter, theCurrentResLevel, theTile, ossimRefPtr< T >::valid(), x, and y.
Referenced by parseStdFuncs().
|
protectedvirtual |
Definition at line 659 of file ossimEquationCombiner.cpp.
References ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getSize(), ossimImageData::getWidth(), min, OSSIM_EQU_IMAGE_DATA_TYPE, OSSIM_FULL, OSSIM_PARTIAL, size, theTile, and theValueStack.
Referenced by parseEquation().
|
protectedvirtual |
Definition at line 784 of file ossimEquationCombiner.cpp.
References OSSIM_EQU_IMAGE_DATA_TYPE.
Referenced by parseArgList(), and parseAssignBand().
|
protectedvirtual |
Definition at line 768 of file ossimEquationCombiner.cpp.
References OSSIM_EQU_IMAGE_DATA_TYPE, and theValueStack.
Referenced by parseEquation(), and ~ossimEquationCombiner().
|
protectedvirtual |
|
inlinevirtual |
Definition at line 186 of file ossimEquationCombiner.h.
|
protectedvirtual |
Definition at line 2765 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimImageData::getImageRectangle(), ossimConnectableObject::getInput(), ossimImageData::getMaxPix(), ossimImageData::getMinPix(), ossimImageData::getNumberOfBands(), ossimCastTileSourceFilter::getTile(), ossimImageData::setMaxPix(), ossimImageData::setMinPix(), theCastFilter, theCurrentResLevel, theTile, and ossimRefPtr< T >::valid().
Referenced by getNewImageData().
|
virtual |
Returns the max pixel of the band.
Reimplemented from ossimImageCombiner.
Definition at line 467 of file ossimEquationCombiner.cpp.
References ossim::defaultMax(), ossimConnectableObject::getInput(), ossimImageSource::getMaxPixelValue(), getOutputScalarType(), PTR_CAST, and theEquation.
|
virtual |
Returns the min pixel of the band.
Reimplemented from ossimImageCombiner.
Definition at line 451 of file ossimEquationCombiner.cpp.
References ossim::defaultMin(), ossimConnectableObject::getInput(), ossimImageSource::getMinPixelValue(), getOutputScalarType(), PTR_CAST, and theEquation.
|
protectedvirtual |
Definition at line 2786 of file ossimEquationCombiner.cpp.
References ossimImageData::dup(), ossimImageData::getBuf(), getImageData(), and ossimRefPtr< T >::valid().
Referenced by parseFactor().
|
virtual |
Each band has a null pixel associated with it.
The null pixel represents an invalid value.
Reimplemented from ossimImageCombiner.
Definition at line 434 of file ossimEquationCombiner.cpp.
References ossim::defaultNull(), ossimConnectableObject::getInput(), ossimImageSource::getNullPixelValue(), getOutputScalarType(), PTR_CAST, and theEquation.
|
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 483 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::getInput(), ossimImageSource::getOutputScalarType(), PTR_CAST, theEquation, and theOutputScalarType.
Referenced by getMaxPixelValue(), getMinPixelValue(), and getNullPixelValue().
|
virtual |
Reimplemented from ossimImageSource.
Definition at line 598 of file ossimEquationCombiner.cpp.
References ossimProperty::clearChangeType(), ossimLookUpTable::getEntryString(), ossimImageSource::getProperty(), ossimLookUpTable::getTableSize(), ossimScalarTypeLut::instance(), ossimProperty::setCacheRefreshBit(), ossimProperty::setReadOnlyFlag(), theEquation, and theOutputScalarType.
|
virtual |
Reimplemented from ossimImageSource.
Definition at line 639 of file ossimEquationCombiner.cpp.
References ossimImageSource::getPropertyNames().
|
virtual |
Reimplemented from ossimImageSource.
Definition at line 502 of file ossimEquationCombiner.cpp.
References ossimCastTileSourceFilter::applyCast(), ossimImageData::getHeight(), ossimConnectableObject::getInput(), ossimImageSource::getTile(), ossimImageData::getWidth(), ossimIrect::height(), initialize(), ossimImageData::initialize(), ossimImageData::makeBlank(), parseEquation(), PTR_CAST, ossimImageData::setImageRectangle(), theCastOutputFilter, theCurrentResLevel, theEquation, theTile, ossimRefPtr< T >::valid(), and ossimIrect::width().
|
virtual |
Reimplemented from ossimImageCombiner.
Definition at line 647 of file ossimEquationCombiner.cpp.
References ossimImageDataFactory::create(), ossimImageSource::getNumberOfOutputBands(), ossimImageCombiner::getTileHeight(), ossimImageCombiner::getTileWidth(), ossimCastTileSourceFilter::initialize(), ossimImageCombiner::initialize(), ossimImageData::initialize(), ossimImageDataFactory::instance(), OSSIM_FLOAT64, theCastOutputFilter, theTile, and ossimRefPtr< T >::valid().
Referenced by getTile().
|
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 3554 of file ossimEquationCombiner.cpp.
References ossimKeywordlist::find().
|
protectedvirtual |
Definition at line 823 of file ossimEquationCombiner.cpp.
References clearArgList(), OSSIM_EQU_TOKEN_COMMA, OSSIM_EQU_TOKEN_LEFT_PAREN, OSSIM_EQU_TOKEN_RIGHT_PAREN, ossimNotify(), ossimNotifyLevel_WARN, parseExpression(), theCurrentId, theLexer, and theValueStack.
Referenced by parseAssignBand(), and parseStdFuncs().
|
protectedvirtual |
Definition at line 897 of file ossimEquationCombiner.cpp.
References ossimImageData::assignBand(), clearArgList(), ossimEquationCombiner::ossimEquValue::d, ossimEquationCombiner::ossimEquDataType::doubleValue, ossimImageData::dup(), ossimImageData::getBuf(), ossimImageData::getHeight(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), ossimEquationCombiner::ossimEquDataType::imageDataValue, OSSIM_EQU_DOUBLE_TYPE, OSSIM_EQU_IMAGE_DATA_TYPE, ossimNotify(), ossimNotifyLevel_WARN, parseArgList(), theValueStack, ossimEquationCombiner::ossimEquValue::type, and ossimImageData::validate().
Referenced by parseStdFuncs().
|
protectedvirtual |
Definition at line 2818 of file ossimEquationCombiner.cpp.
References assignValue(), clearStacks(), ossimNotify(), ossimNotifyLevel_WARN, parseExpression(), theCurrentId, theEquation, theLexer, theTile, theValueStack, and ossimImageData::validate().
Referenced by getTile().
|
protectedvirtual |
Definition at line 2802 of file ossimEquationCombiner.cpp.
References parseRestOfExp(), and parseTerm().
Referenced by parseArgList(), parseEquation(), parseFactor(), and parseStdFuncs().
|
protectedvirtual |
Definition at line 2033 of file ossimEquationCombiner.cpp.
References ossimEquationCombiner::ossimEquValue::d, ossimEquationCombiner::ossimEquDataType::doubleValue, getNewImageData(), ossimEquationCombiner::ossimEquDataType::imageDataValue, M_PI, OSSIM_EQU_DOUBLE_TYPE, OSSIM_EQU_IMAGE_DATA_TYPE, OSSIM_EQU_TOKEN_CONSTANT, OSSIM_EQU_TOKEN_IMAGE_VARIABLE, OSSIM_EQU_TOKEN_LEFT_ARRAY_BRACKET, OSSIM_EQU_TOKEN_LEFT_PAREN, OSSIM_EQU_TOKEN_PI, OSSIM_EQU_TOKEN_RIGHT_ARRAY_BRACKET, OSSIM_EQU_TOKEN_RIGHT_PAREN, ossimNotify(), ossimNotifyLevel_WARN, parseExpression(), parseStdFuncs(), parseUnaryFactor(), ossimRefPtr< T >::release(), theCurrentId, theLexer, theValueStack, ossimEquationCombiner::ossimEquValue::type, and ossimRefPtr< T >::valid().
Referenced by parseRestOfTerm(), parseTerm(), and parseUnaryFactor().
|
protectedvirtual |
Definition at line 2682 of file ossimEquationCombiner.cpp.
References applyOp(), OSSIM_EQU_TOKEN_MINUS, OSSIM_EQU_TOKEN_PLUS, parseTerm(), theCurrentId, theLexer, and theValueStack.
Referenced by parseExpression().
|
protectedvirtual |
Definition at line 2166 of file ossimEquationCombiner.cpp.
References applyOp(), OSSIM_EQU_TOKEN_AMPERSAND, OSSIM_EQU_TOKEN_BDIFFERENT, OSSIM_EQU_TOKEN_BEQUAL, OSSIM_EQU_TOKEN_BGREATER, OSSIM_EQU_TOKEN_BGREATEROREQUAL, OSSIM_EQU_TOKEN_BLESS, OSSIM_EQU_TOKEN_BLESSOREQUAL, OSSIM_EQU_TOKEN_DIV, OSSIM_EQU_TOKEN_MOD, OSSIM_EQU_TOKEN_MULT, OSSIM_EQU_TOKEN_OR_BAR, OSSIM_EQU_TOKEN_POWER, OSSIM_EQU_TOKEN_XOR, ossimNotify(), ossimNotifyLevel_WARN, parseFactor(), theCurrentId, theLexer, and theValueStack.
Referenced by parseTerm().
|
protectedvirtual |
Definition at line 1025 of file ossimEquationCombiner.cpp.
References applyBlurr(), applyClamp(), applyConvolution(), applyOp(), applyShift(), ossimImageData::assignBand(), ossimEquationCombiner::ossimEquValue::d, ossimEquationCombiner::ossimEquDataType::doubleValue, ossimImageData::getBuf(), ossimImageData::getHeight(), ossimImageData::getMaxPix(), ossimImageData::getMinPix(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getOrigin(), ossimImageData::getWidth(), ossimEquationCombiner::ossimEquDataType::imageDataValue, ossimImageData::initialize(), OSSIM_EQU_DOUBLE_TYPE, OSSIM_EQU_IMAGE_DATA_TYPE, OSSIM_EQU_TOKEN_ABS, OSSIM_EQU_TOKEN_ACOS, OSSIM_EQU_TOKEN_ACOSD, OSSIM_EQU_TOKEN_ASIN, OSSIM_EQU_TOKEN_ASIND, OSSIM_EQU_TOKEN_ASSIGN_BAND, OSSIM_EQU_TOKEN_ATAN, OSSIM_EQU_TOKEN_ATAND, OSSIM_EQU_TOKEN_BAND, OSSIM_EQU_TOKEN_BLURR, OSSIM_EQU_TOKEN_CLAMP, OSSIM_EQU_TOKEN_COMMA, OSSIM_EQU_TOKEN_CONV, OSSIM_EQU_TOKEN_COS, OSSIM_EQU_TOKEN_COSD, OSSIM_EQU_TOKEN_EXP, OSSIM_EQU_TOKEN_LEFT_PAREN, OSSIM_EQU_TOKEN_LOG, OSSIM_EQU_TOKEN_LOG10, OSSIM_EQU_TOKEN_MAX, OSSIM_EQU_TOKEN_MIN, OSSIM_EQU_TOKEN_RIGHT_PAREN, OSSIM_EQU_TOKEN_SHIFT, OSSIM_EQU_TOKEN_SIN, OSSIM_EQU_TOKEN_SIND, OSSIM_EQU_TOKEN_SQRT, OSSIM_EQU_TOKEN_TAN, OSSIM_EQU_TOKEN_TAND, OSSIM_FLOAT64, ossimNotify(), ossimNotifyLevel_WARN, parseArgList(), parseAssignBand(), parseExpression(), ossimImageData::setMaxPix(), ossimImageData::setMinPix(), ossimImageData::setNullPix(), ossimImageData::setOrigin(), ossimImageData::setWidthHeight(), theCurrentId, theLexer, theValueStack, ossimEquationCombiner::ossimEquValue::type, and ossimImageData::validate().
Referenced by parseFactor().
|
protectedvirtual |
Definition at line 2664 of file ossimEquationCombiner.cpp.
References parseFactor(), and parseRestOfTerm().
Referenced by parseExpression(), and parseRestOfExp().
|
protectedvirtual |
Definition at line 1965 of file ossimEquationCombiner.cpp.
References applyOp(), OSSIM_EQU_TOKEN_MINUS, OSSIM_EQU_TOKEN_TILDE, parseFactor(), theCurrentId, theLexer, and theValueStack.
Referenced by parseFactor().
|
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 3534 of file ossimEquationCombiner.cpp.
References ossimKeywordlist::add(), ossimLookUpTable::getEntryString(), ossimScalarTypeLut::instance(), and theOutputScalarType.
|
inlinevirtual |
Definition at line 182 of file ossimEquationCombiner.h.
Referenced by ossimShorelineTool::initProcessingChain().
|
virtual |
Definition at line 554 of file ossimEquationCombiner.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimCastTileSourceFilter::initialize(), OSSIM_FLOAT64, OSSIM_SCALAR_UNKNOWN, ossimCastTileSourceFilter::setOutputScalarType(), theCastOutputFilter, theOutputScalarType, and ossimRefPtr< T >::valid().
Referenced by ossimShorelineTool::initProcessingChain(), and setProperty().
|
virtual |
Reimplemented from ossimImageSource.
Definition at line 579 of file ossimEquationCombiner.cpp.
References ossimProperty::getName(), ossimScalarTypeLut::instance(), setOutputScalarType(), ossimImageSource::setProperty(), theEquation, and ossimProperty::valueToString().
|
protected |
Definition at line 256 of file ossimEquationCombiner.h.
Referenced by applyBlurr(), applyConvolution(), applyShift(), getImageData(), ossimEquationCombiner(), and ~ossimEquationCombiner().
|
protected |
Definition at line 257 of file ossimEquationCombiner.h.
Referenced by getTile(), initialize(), setOutputScalarType(), and ~ossimEquationCombiner().
|
mutableprotected |
Definition at line 259 of file ossimEquationCombiner.h.
Referenced by parseArgList(), parseEquation(), parseFactor(), parseRestOfExp(), parseRestOfTerm(), parseStdFuncs(), and parseUnaryFactor().
|
protected |
Definition at line 261 of file ossimEquationCombiner.h.
Referenced by applyBlurr(), applyConvolution(), applyShift(), getImageData(), and getTile().
|
protected |
Definition at line 253 of file ossimEquationCombiner.h.
Referenced by getMaxPixelValue(), getMinPixelValue(), getNullPixelValue(), getOutputScalarType(), getProperty(), getTile(), parseEquation(), and setProperty().
|
mutableprotected |
Definition at line 254 of file ossimEquationCombiner.h.
Referenced by ossimEquationCombiner(), parseArgList(), parseEquation(), parseFactor(), parseRestOfExp(), parseRestOfTerm(), parseStdFuncs(), parseUnaryFactor(), and ~ossimEquationCombiner().
|
protected |
Definition at line 252 of file ossimEquationCombiner.h.
Referenced by getOutputScalarType(), getProperty(), saveState(), and setOutputScalarType().
|
protected |
Definition at line 255 of file ossimEquationCombiner.h.
Referenced by applyBlurr(), applyConvolution(), applyShift(), assignValue(), getImageData(), getTile(), initialize(), and parseEquation().
|
mutableprotected |
Definition at line 260 of file ossimEquationCombiner.h.
Referenced by assignValue(), clearStacks(), parseArgList(), parseAssignBand(), parseEquation(), parseFactor(), parseRestOfExp(), parseRestOfTerm(), parseStdFuncs(), and parseUnaryFactor().