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

This will be a base for all combiners. More...

#include <ossimImageCombiner.h>

Inheritance diagram for ossimImageCombiner:
ossimImageSource ossimConnectableObjectListener ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced ATP::AtpTileSource ossimBandMergeSource ossimBumpShadeTileSource ossimElevationMosaic ossimEquationCombiner ossimFusionCombiner ossimImageMosaic ossimMaxMosaic ossimTopographicCorrectionFilter ossimTwoColorView

Public Member Functions

 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 initialize ()
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=NULL)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=NULL) const
 Method to save the state of an object to a keyword list. 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 ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. 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 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
 
- 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 ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, 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 ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool isIndexedData () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimConnectableObjectListener
 ossimConnectableObjectListener ()
 
virtual ~ossimConnectableObjectListener ()
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &)
 
virtual void connectionEvent (ossimConnectionEvent &)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &)
 
virtual void connectOutputEvent (ossimConnectionEvent &)
 
virtual void addObjectEvent (ossimContainerEvent &)
 
virtual void removeObjectEvent (ossimContainerEvent &)
 
virtual void containerEvent (ossimContainerEvent &)
 
- Public Member Functions inherited from ossimListener
 ossimListener ()
 
virtual ~ossimListener ()
 
void enableListener ()
 
void disableListener ()
 
void setListenerEnableFlag (bool flag)
 
bool isListenerEnabled () const
 
bool getListenerEnableFlag () const
 

Protected Member Functions

virtual ~ossimImageCombiner ()
 
void precomputeBounds () const
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

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 will be a base for all combiners.

Combiners take N inputs and will produce a single output.

Definition at line 21 of file ossimImageCombiner.h.

Constructor & Destructor Documentation

◆ ossimImageCombiner() [1/3]

ossimImageCombiner::ossimImageCombiner ( )

Definition at line 20 of file ossimImageCombiner.cpp.

References ossimListenerManager::addListener(), and theComputeFullResBoundsFlag.

21  :ossimImageSource(NULL,
22  0,
23  0,
24  false,
25  false),
28  theHasDifferentInputs(false),
29  theNormTile(NULL),
31 {
33  // until something is set we will just set the blank tile
34  // to a 1 band unsigned char type
36 }
virtual bool addListener(ossimListener *listener)
ossim_uint32 theInputToPassThrough
ossim_uint32 theCurrentIndex
ossim_uint32 theLargestNumberOfInputBands
ossimRefPtr< ossimImageData > theNormTile
ossimImageSource(ossimObject *owner=0)

◆ ossimImageCombiner() [2/3]

ossimImageCombiner::ossimImageCombiner ( ossimObject owner,
int  numberOfInputs,
int  numberOfOutputs,
bool  inputListIsFixedFlag,
bool  outputListIsFixedFlag 
)

Definition at line 37 of file ossimImageCombiner.cpp.

References ossimListenerManager::addListener(), and theComputeFullResBoundsFlag.

42  :ossimImageSource(owner,
43  numberOfInputs,
44  numberOfOutputs,
45  inputListIsFixedFlag,
46  outputListIsFixedFlag),
49  theHasDifferentInputs(false),
50  theNormTile(NULL),
52 {
55 }
virtual bool addListener(ossimListener *listener)
ossim_uint32 theInputToPassThrough
ossim_uint32 theCurrentIndex
ossim_uint32 theLargestNumberOfInputBands
ossimRefPtr< ossimImageData > theNormTile
ossimImageSource(ossimObject *owner=0)

◆ ossimImageCombiner() [3/3]

ossimImageCombiner::ossimImageCombiner ( ossimConnectableObject::ConnectableObjectList inputSources)

Definition at line 57 of file ossimImageCombiner.cpp.

References ossimListenerManager::addListener(), ossimConnectableObject::connectMyInputTo(), initialize(), and theComputeFullResBoundsFlag.

58  :ossimImageSource(NULL,
59  (ossim_uint32)inputSources.size(),
60  0,
61  false,
62  false),
65  theHasDifferentInputs(false),
66  theNormTile(NULL),
68 {
70  for(ossim_uint32 index = 0; index < inputSources.size(); ++index)
71  {
72  connectMyInputTo(index, inputSources[index].get());
73  }
75  initialize();
76 }
virtual bool addListener(ossimListener *listener)
ossim_uint32 theInputToPassThrough
ossim_uint32 theCurrentIndex
ossim_uint32 theLargestNumberOfInputBands
unsigned int ossim_uint32
ossimRefPtr< ossimImageData > theNormTile
ossimImageSource(ossimObject *owner=0)
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.

◆ ~ossimImageCombiner()

ossimImageCombiner::~ossimImageCombiner ( )
protectedvirtual

Member Function Documentation

◆ canConnectMyInputTo()

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

required to be overriden by derived classes

Implements ossimConnectableObject.

Reimplemented in ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, and ossimFusionCombiner.

Definition at line 652 of file ossimImageCombiner.cpp.

References PTR_CAST.

654 {
655  return (object&& PTR_CAST(ossimImageSource, object));
656 }
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ connectInputEvent()

void ossimImageCombiner::connectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Reimplemented in ossimBumpShadeTileSource, and ossimTopographicCorrectionFilter.

Definition at line 621 of file ossimImageCombiner.cpp.

References initialize().

622 {
623  initialize();
624 }

◆ disconnectInputEvent()

void ossimImageCombiner::disconnectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Reimplemented in ossimBumpShadeTileSource, and ossimTopographicCorrectionFilter.

Definition at line 626 of file ossimImageCombiner.cpp.

References initialize().

627 {
628  initialize();
629 }

◆ getBoundingRect()

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

This will return the bounding rect of the source.

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

Reimplemented from ossimImageSource.

Reimplemented in ossimTopographicCorrectionFilter, ossimFusionCombiner, and ossimOrthoImageMosaic.

Definition at line 83 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), ossimIrect::hasNans(), ossimIrect::makeNan(), precomputeBounds(), PTR_CAST, theComputeFullResBoundsFlag, and theFullResBounds.

84 {
85  static const char* MODULE = "ossimImageCombiner::getBoundingRect";
86  ossimIrect result;
88  {
90  }
91 
92  double scale = 1.0/std::pow(2.0, (double)resLevel);
93  ossimDpt scalar(scale, scale);
94  result.makeNan();
95 
96  ossim_uint32 inputIndex = 0;
97  ossimImageSource* interface;
98  for(inputIndex = 0;inputIndex < getNumberOfInputs(); ++inputIndex)
99  {
100  interface = PTR_CAST(ossimImageSource, getInput(inputIndex));
101  if(interface)
102  {
103  ossimIrect rect = theFullResBounds[inputIndex];
104  if(result.hasNans())
105  {
106  result = rect;
107  }
108  else if(!rect.hasNans())
109  {
110  if(traceDebug())
111  {
112  CLOG << "rect " << inputIndex << " = " << result << endl;
113  }
114  rect = rect*scale;
115  result = result.combine(rect);
116  }
117  }
118  }
119  if(traceDebug())
120  {
121  CLOG << "resulting bounding rect = " << result << endl;
122  }
123 
124  return result;
125 }
#define CLOG
Definition: ossimTrace.h:23
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
void makeNan()
Definition: ossimIrect.h:329
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
bool hasNans() const
Definition: ossimIrect.h:337
ossimIrect combine(const ossimIrect &rect) const
Definition: ossimIrect.cpp:543

◆ getMaxPixelValue()

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

Returns the max pixel of the band.

Reimplemented from ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ossimBandMergeSource, and ossimTwoColorView.

Definition at line 236 of file ossimImageCombiner.cpp.

References DBL_EPSILON, ossimConnectableObject::getInput(), ossimImageSource::getMaxPixelValue(), ossimConnectableObject::getNumberOfInputs(), ossimImageSource::getNumberOfOutputBands(), ossim::nan(), and PTR_CAST.

Referenced by ossimTwoColorView::getMaxPixelValue(), and ossimTopographicCorrectionFilter::getMaxPixelValue().

237 {
238  const char* MODULE = "ossimImageCombiner::getMaxPixelValue";
239 
240  if(!getNumberOfInputs())
241  {
242  return ossim::nan();
243  }
244  double result = -1.0/DBL_EPSILON;
245 
246  for(ossim_uint32 idx = 0; idx < getNumberOfInputs();++idx)
247  {
249  if(input)
250  {
251  ossim_uint32 bands = input->getNumberOfOutputBands();
252  double temp = 0;
253  if(band < bands)
254  {
255  temp = input->getMaxPixelValue(band);
256  }
257  else
258  {
259  temp = input->getMaxPixelValue(0);
260  }
261  if(temp > result)
262  {
263  result = temp;
264  }
265  }
266  }
267 
268  if(traceDebug())
269  {
270  CLOG << "max pixel returned is = " << result;
271  }
272 
273  return result;
274 }
#define CLOG
Definition: ossimTrace.h:23
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
#define DBL_EPSILON
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ getMinPixelValue()

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

Returns the min pixel of the band.

Reimplemented from ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ossimBandMergeSource, and ossimTwoColorView.

Definition at line 196 of file ossimImageCombiner.cpp.

References DBL_EPSILON, ossimConnectableObject::getInput(), ossimImageSource::getMinPixelValue(), ossimConnectableObject::getNumberOfInputs(), ossimImageSource::getNumberOfOutputBands(), ossim::nan(), and PTR_CAST.

Referenced by ossimTwoColorView::getMinPixelValue(), and ossimTopographicCorrectionFilter::getMinPixelValue().

197 {
198  const char* MODULE = "ossimImageCombiner::getMinPixelValue";
199 
200  if(!getNumberOfInputs())
201  {
202  return ossim::nan();
203  }
204  double result = 1.0/DBL_EPSILON;
205 
206  for(ossim_uint32 index = 0; index < getNumberOfInputs();++index)
207  {
209  if(input)
210  {
211  ossim_uint32 bands = input->getNumberOfOutputBands();
212  double temp = 0;
213  if(band < bands)
214  {
215  temp = input->getMinPixelValue(band);
216  }
217  else
218  {
219  temp = input->getMinPixelValue(0);
220  }
221 
222  if(temp < result)
223  {
224  result = temp;
225  }
226  }
227  }
228  if(traceDebug())
229  {
230  CLOG << "min pixel returned is = " << result;
231  }
232 
233  return result;
234 }
#define CLOG
Definition: ossimTrace.h:23
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
#define DBL_EPSILON
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ getNextNormTile() [1/2]

ossimRefPtr< ossimImageData > ossimImageCombiner::getNextNormTile ( ossim_uint32 returnedIdx,
const ossim_uint32  index,
const ossimIrect tileRect,
ossim_uint32  resLevel = 0 
)
virtual

Definition at line 511 of file ossimImageCombiner.cpp.

References theCurrentIndex.

Referenced by ossimElevationMosaic::combine(), ossimImageMosaic::combine(), ossimElevationMosaic::combineNorm(), ossimImageMosaic::combineNorm(), ossimMaxMosaic::combineNorm(), ossimBlendMosaic::combineNorm(), and ossimClosestToCenterCombiner::getTile().

515 {
516  theCurrentIndex = startIdx;
517  return getNextNormTile(returnedIdx, tileRect, resLevel);
518 }
virtual ossimRefPtr< ossimImageData > getNextNormTile(ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossim_uint32 theCurrentIndex

◆ getNextNormTile() [2/2]

ossimRefPtr< ossimImageData > ossimImageCombiner::getNextNormTile ( ossim_uint32 returnedIdx,
const ossimIrect tileRect,
ossim_uint32  resLevel = 0 
)
virtual

Definition at line 536 of file ossimImageCombiner.cpp.

References ossimImageData::copyTileToNormalizedBuffer(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getImageRectangle(), getNextTile(), ossimImageData::getNumberOfBands(), ossimConnectableObject::getNumberOfInputs(), ossimImageData::initialize(), OSSIM_NORMALIZED_FLOAT, ossimDataObject::setDataObjectStatus(), ossimImageData::setImageRectangleAndBands(), size, theCurrentIndex, theNormTile, and ossimRefPtr< T >::valid().

539 {
541 
542  if(theCurrentIndex >= size)
543  {
544  return 0;
545  }
546 
547  if(!theNormTile)
548  {
549  theNormTile = new ossimImageData(this,
552  }
553 
554  ossimRefPtr<ossimImageData> result = getNextTile(returnedIdx, tileRect, resLevel);
555 
556  if(result.valid())
557  {
559  result->getNumberOfBands());
560  result->copyTileToNormalizedBuffer((float*)theNormTile->getBuf());
561 
563  result = theNormTile;
564  }
565 
566  return result;
567 }
virtual ossim_uint32 getNumberOfBands() const
bool valid() const
Definition: ossimRefPtr.h:75
virtual ossimDataObjectStatus getDataObjectStatus() const
ossim_uint32 theCurrentIndex
virtual void initialize()
Initialize the data buffer.
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
yy_size_t size
virtual void setImageRectangleAndBands(const ossimIrect &rect, ossim_uint32 numberOfBands)
unsigned int ossim_uint32
ossimRefPtr< ossimImageData > theNormTile
32 bit normalized floating point
virtual ossimIrect getImageRectangle() const
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
virtual const void * getBuf() const
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
virtual void setDataObjectStatus(ossimDataObjectStatus status) const
Full list found in ossimConstants.h.

◆ getNextTile() [1/3]

ossimRefPtr< ossimImageData > ossimImageCombiner::getNextTile ( ossim_uint32 returnedIdx,
const ossim_uint32  startIdx,
const ossimIrect tileRect,
ossim_uint32  resLevel = 0 
)
virtual

Definition at line 356 of file ossimImageCombiner.cpp.

References theCurrentIndex.

Referenced by ossimElevationMosaic::combine(), ossimImageMosaic::combine(), ossimMaxMosaic::combine(), ossimBlendMosaic::combine(), ossimFeatherMosaic::combine(), getNextNormTile(), ossimElevationMosaic::getTile(), ossimImageMosaic::getTile(), ossimBandMergeSource::getTile(), ossimMaxMosaic::getTile(), and ossimTwoColorView::getTile().

360 {
361  theCurrentIndex = startIdx;
362  return getNextTile(returnedIdx, tileRect, resLevel);
363 }
ossim_uint32 theCurrentIndex
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)

◆ getNextTile() [2/3]

ossimRefPtr< ossimImageData > ossimImageCombiner::getNextTile ( ossim_uint32 returnedIdx,
const ossimIrect tileRect,
ossim_uint32  resLevel = 0 
)
virtual

Reimplemented in ossimOrthoImageMosaic.

Definition at line 380 of file ossimImageCombiner.cpp.

References ossimDataObject::getDataObjectStatus(), ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), ossimImageSource::getTile(), ossimIrect::hasNans(), ossimIrect::intersects(), OSSIM_EMPTY, OSSIM_NULL, precomputeBounds(), PTR_CAST, size, status, theComputeFullResBoundsFlag, theCurrentIndex, theFullResBounds, and ossimRefPtr< T >::valid().

383 {
385  if ( theCurrentIndex >= size)
386  {
387  return 0;
388  }
389 
391  {
393  }
394 
395  ossimImageSource* temp = 0;
396  ossimRefPtr<ossimImageData> result = 0;
398 
399  double scale = 1.0/std::pow(2.0, (double)resLevel);
400  ossimDpt scalar(scale, scale);
401 
402  while( (theCurrentIndex<size) && !result)
403  {
405  if(!rect.hasNans())
406  {
407  rect = rect * scalar;
408  temp = PTR_CAST(ossimImageSource,
410 
411  if(rect.intersects(tileRect)&&temp)
412  {
413  result = temp->getTile(tileRect, resLevel);
414  status = (result.valid() ?
415  result->getDataObjectStatus():OSSIM_NULL);
416  if((status == OSSIM_NULL)||
417  (status == OSSIM_EMPTY))
418  {
419  result = 0;
420  }
421  }
422  else
423  {
424  status = OSSIM_NULL;
425  result = 0;
426  }
427  }
428  else
429  {
430  status = OSSIM_NULL;
431  result = NULL;
432  }
433 
434  // Go to next source.
435  ++theCurrentIndex;
436  }
437  returnedIdx = theCurrentIndex;
438  if(result.valid())
439  {
440  --returnedIdx;
441  }
442 
443  return result;
444 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual ossimDataObjectStatus getDataObjectStatus() const
ossim_uint32 theCurrentIndex
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
yy_size_t size
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
return status
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
bool hasNans() const
Definition: ossimIrect.h:337
ossimDataObjectStatus
Definitions for data object status.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getNextTile() [3/3]

bool ossimImageCombiner::getNextTile ( ossim_uint32 returnedIdx,
const ossim_uint32  startIdx,
ossimImageData tile,
ossim_uint32  resLevel = 0 
)
virtual

Definition at line 447 of file ossimImageCombiner.cpp.

References ossimDataObject::getDataObjectStatus(), ossimImageData::getImageRectangle(), ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), ossimImageSource::getTile(), ossimIrect::hasNans(), ossimIrect::intersects(), OSSIM_EMPTY, OSSIM_NULL, precomputeBounds(), PTR_CAST, size, status, theComputeFullResBoundsFlag, theCurrentIndex, and theFullResBounds.

451 {
452  if (!tile)
453  return false;
454 
456  theCurrentIndex = startIdx;
457 
460 
461  ossimImageSource* temp = 0;
463 
464  double scale = 1.0/std::pow(2.0, (double)resLevel);
465  ossimDpt scalar(scale, scale);
466 
467  while( (theCurrentIndex<size))
468  {
470  if(!rect.hasNans())
471  {
472  rect = rect * scalar;
473  temp = PTR_CAST(ossimImageSource,
475 
476  if(rect.intersects(tile->getImageRectangle()) && temp)
477  {
478  temp->getTile(tile, resLevel);
479  status = tile->getDataObjectStatus();
480  if((status != OSSIM_NULL) && (status != OSSIM_EMPTY))
481  {
482  break;
483  }
484  }
485  }
486 
487  // Go to next source.
488  ++theCurrentIndex;
489  }
490 
491  returnedIdx = theCurrentIndex;
492  if((status == OSSIM_NULL) || (status == OSSIM_EMPTY))
493  {
494  --returnedIdx;
495  return false;
496  }
497 
498  return true;
499 }
virtual ossimDataObjectStatus getDataObjectStatus() const
ossim_uint32 theCurrentIndex
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
yy_size_t size
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossimIrect getImageRectangle() const
return status
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
bool hasNans() const
Definition: ossimIrect.h:337
ossimDataObjectStatus
Definitions for data object status.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getNullPixelValue()

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

Each band has a null pixel associated with it.

The null pixel represents an invalid value.

Reimplemented from ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimTopographicCorrectionFilter, ossimBandMergeSource, and ossimTwoColorView.

Definition at line 174 of file ossimImageCombiner.cpp.

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

Referenced by ossimTwoColorView::getNullPixelValue(), and ossimTopographicCorrectionFilter::getNullPixelValue().

175 {
177  {
179  if(temp)
180  {
181  ossim_uint32 bands = temp->getNumberOfOutputBands();
182  if(band < bands)
183  {
184  return temp->getNullPixelValue(band);
185  }
186  else
187  {
188  return temp->getNullPixelValue(bands-1);
189  }
190  }
191  }
192 
193  return 0.0;
194 }
ossim_uint32 theInputToPassThrough
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.

◆ getNumberOfInputBands()

ossim_uint32 ossimImageCombiner::getNumberOfInputBands ( ) const
virtual

Returns the number of bands available from the input.

Implements ossimImageSource.

Definition at line 127 of file ossimImageCombiner.cpp.

References theLargestNumberOfInputBands.

128 {
130 }
ossim_uint32 theLargestNumberOfInputBands

◆ getNumberOfOverlappingImages()

ossim_uint32 ossimImageCombiner::getNumberOfOverlappingImages ( const ossimIrect rect,
ossim_uint32  resLevel = 0 
) const
virtual

Used to retrieve the number of overlapping images withint the given rect.

Reimplemented in ossimOrthoImageMosaic.

Definition at line 569 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getNumberOfInputs(), ossimIrect::intersects(), precomputeBounds(), theComputeFullResBoundsFlag, and theFullResBounds.

571 {
573  {
575  }
576  double scale = 1.0/std::pow(2.0, (double)resLevel);
577  ossimDpt scalar(scale, scale);
578  ossim_uint32 result = 0;
579  ossim_uint32 maxIndex = getNumberOfInputs();
580  for(ossim_uint32 inputIndex = 0; inputIndex < maxIndex; ++inputIndex)
581  {
582  if(!theFullResBounds[inputIndex].hasNans())
583  {
584  ossimIrect boundingRect = theFullResBounds[inputIndex] * scalar;
585  if(rect.intersects(boundingRect))
586  {
587  ++result;
588  }
589  }
590  }
591 
592  return result;
593 }
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ getOutputScalarType()

ossimScalarType ossimImageCombiner::getOutputScalarType ( ) const
virtual

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

Please ignore the argument. It will soon be removed.

Reimplemented from ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ATP::AtpTileSource, ossimTwoColorView, and ossimFusionCombiner.

Definition at line 132 of file ossimImageCombiner.cpp.

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

Referenced by ossimFusionCombiner::getOutputScalarType(), ossimTwoColorView::getOutputScalarType(), and ossimTopographicCorrectionFilter::getOutputScalarType().

133 {
135  {
137  if(temp)
138  {
139  return temp->getOutputScalarType();
140  }
141  }
142 
143  return OSSIM_SCALAR_UNKNOWN;
144 }
ossim_uint32 theInputToPassThrough
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.

◆ getOverlappingImages()

void ossimImageCombiner::getOverlappingImages ( std::vector< ossim_uint32 > &  result,
const ossimIrect rect,
ossim_uint32  resLevel = 0 
) const
virtual

Used to populate the result with the index of the overlapping images.

Reimplemented in ossimOrthoImageMosaic.

Definition at line 595 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getNumberOfInputs(), ossimIrect::intersects(), precomputeBounds(), theComputeFullResBoundsFlag, and theFullResBounds.

598 {
600  {
602  }
603  double scale = 1.0/std::pow(2.0, (double)resLevel);
604  ossimDpt scalar(scale, scale);
605 
606  ossim_uint32 inputIndex;
607  ossimIrect boundingRect;
608  for(inputIndex = 0; inputIndex < getNumberOfInputs(); ++inputIndex)
609  {
610  if(!theFullResBounds[inputIndex].hasNans())
611  {
612  boundingRect = theFullResBounds[inputIndex]*scalar;
613  if(rect.intersects(boundingRect))
614  {
615  result.push_back(inputIndex);
616  }
617  }
618  }
619 }
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ getTileHeight()

ossim_uint32 ossimImageCombiner::getTileHeight ( ) const
virtual

Returns the default processing tile height.

Reimplemented from ossimImageSource.

Definition at line 160 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getInput(), ossimImageSource::getTileHeight(), PTR_CAST, and theInputToPassThrough.

Referenced by ossimEquationCombiner::initialize().

161 {
163  {
165  if(temp)
166  {
167  return temp->getTileHeight();
168  }
169  }
170 
171  return 1;
172 }
ossim_uint32 theInputToPassThrough
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ getTileWidth()

ossim_uint32 ossimImageCombiner::getTileWidth ( ) const
virtual

Returns the default processing tile width.

Reimplemented from ossimImageSource.

Definition at line 146 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getInput(), ossimImageSource::getTileWidth(), PTR_CAST, and theInputToPassThrough.

Referenced by ossimEquationCombiner::initialize().

147 {
149  {
151  if(temp)
152  {
153  return temp->getTileWidth();
154  }
155  }
156 
157  return 1;
158 }
ossim_uint32 theInputToPassThrough
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ hasDifferentInputs()

bool ossimImageCombiner::hasDifferentInputs ( ) const
virtual

◆ initialize()

void ossimImageCombiner::initialize ( )
virtual

Implements ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ossimTwoColorView, ossimLocalCorrelationFusion, ossimSFIMFusion, ossimBandMergeSource, ossimMaxMosaic, ossimElevationMosaic, ossimImageMosaic, ATP::AtpTileSource, ossimFeatherMosaic, ossimFusionCombiner, ATP::ossimCorrelationSource, ATP::ossimDescriptorSource, ossimOrthoImageMosaic, ossimBlendMosaic, and ossimLandsatTopoCorrectionFilter.

Definition at line 276 of file ossimImageCombiner.cpp.

References ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), ossimImageSource::getNumberOfOutputBands(), ossimImageSource::getOutputScalarType(), OSSIM_SCALAR_UNKNOWN, PTR_CAST, ossim::scalarSizeInBytes(), size, theComputeFullResBoundsFlag, theHasDifferentInputs, theInputToPassThrough, and theLargestNumberOfInputBands.

Referenced by connectInputEvent(), disconnectInputEvent(), ossimFusionCombiner::initialize(), ATP::AtpTileSource::initialize(), ossimElevationMosaic::initialize(), ossimImageMosaic::initialize(), ossimBandMergeSource::initialize(), ossimMaxMosaic::initialize(), ossimTwoColorView::initialize(), ossimTopographicCorrectionFilter::initialize(), ossimBumpShadeTileSource::initialize(), ossimEquationCombiner::initialize(), ossimImageCombiner(), propertyEvent(), refreshEvent(), and ossimGpkgWriter::reInitializeCombiners().

277 {
278 
281 
282  // now find the largest number of bands
283  //
288  theHasDifferentInputs= false;
289  if(size > 0)
290  {
291  for(ossim_uint32 idx = 0; idx < size; ++idx)
292  {
294  if(temp)
295  {
296  ossim_uint32 numberOfBands = temp->getNumberOfOutputBands();
297  if(numberOfBands > theLargestNumberOfInputBands)
298  {
299  theLargestNumberOfInputBands = numberOfBands;
300  }
301  ossimScalarType current = temp->getOutputScalarType();
302  if(current != scalarType)
303  {
304  if(scalarType == OSSIM_SCALAR_UNKNOWN)
305  {
306  scalarType = current;
308  theInputToPassThrough = idx;
309  }
310  else
311  {
312  theHasDifferentInputs = true;
314  {
315  scalarType = current;
317  theInputToPassThrough = idx;
318  }
319  }
320  }
321  }
322  }
323  }
324 }
ossim_uint32 theInputToPassThrough
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
ossim_uint32 theLargestNumberOfInputBands
yy_size_t size
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
OSSIM_DLL ossim_uint32 scalarSizeInBytes(ossimScalarType scalarType)
ossimScalarType
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ loadState()

bool ossimImageCombiner::loadState ( const ossimKeywordlist kwl,
const char *  prefix = NULL 
)
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 ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ossimLocalCorrelationFusion, ossimSFIMFusion, ossimMaxMosaic, ossimElevationMosaic, ossimImageMosaic, ossimBlendMosaic, and ossimLandsatTopoCorrectionFilter.

Definition at line 326 of file ossimImageCombiner.cpp.

References ossimImageSource::loadState().

Referenced by ossimElevationMosaic::loadState(), ossimImageMosaic::loadState(), ossimMaxMosaic::loadState(), ossimSFIMFusion::loadState(), and ossimLocalCorrelationFusion::loadState().

327 {
328  bool result = ossimImageSource::loadState(kwl, prefix);
329 
330  return result;
331 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.

◆ precomputeBounds()

void ossimImageCombiner::precomputeBounds ( ) const
protected

Definition at line 658 of file ossimImageCombiner.cpp.

References ossimImageSource::getBoundingRect(), ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), PTR_CAST, theComputeFullResBoundsFlag, and theFullResBounds.

Referenced by getBoundingRect(), getNextTile(), getNumberOfOverlappingImages(), and getOverlappingImages().

659 {
660 
661  ossim_uint32 inputSize = getNumberOfInputs();
662 
663  if(inputSize)
664  {
665  ossimImageSource* tempInterface=0;
666  if(theFullResBounds.size() != inputSize)
667  {
668  theFullResBounds.resize(inputSize);
669  }
670  for(ossim_uint32 inputIndex = 0; inputIndex < inputSize; ++inputIndex)
671  {
672  tempInterface = PTR_CAST(ossimImageSource, getInput(inputIndex));
673  if(tempInterface)
674  {
675  theFullResBounds[inputIndex] = tempInterface->getBoundingRect();
676  }
677  else
678  {
679  theFullResBounds[inputIndex].makeNan();
680  }
681  }
683  }
684  else
685  {
686  theFullResBounds.clear();
687  }
688 }
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
std::vector< ossimIrect > theFullResBounds
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ propertyEvent()

void ossimImageCombiner::propertyEvent ( ossimPropertyEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Reimplemented in ossimBumpShadeTileSource, and ossimTopographicCorrectionFilter.

Definition at line 631 of file ossimImageCombiner.cpp.

References initialize().

632 {
633  initialize();
634 }

◆ refreshEvent()

void ossimImageCombiner::refreshEvent ( ossimRefreshEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Reimplemented in ossimBumpShadeTileSource, and ossimTopographicCorrectionFilter.

Definition at line 636 of file ossimImageCombiner.cpp.

References initialize().

637 {
638  initialize();
639 }

◆ saveState()

bool ossimImageCombiner::saveState ( ossimKeywordlist kwl,
const char *  prefix = NULL 
) const
virtual

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

Return true if ok or false on error.

Reimplemented from ossimImageSource.

Reimplemented in ossimEquationCombiner, ossimBumpShadeTileSource, ossimTopographicCorrectionFilter, ossimLocalCorrelationFusion, ossimSFIMFusion, ossimMaxMosaic, ossimElevationMosaic, ossimImageMosaic, ossimLandsatTopoCorrectionFilter, and ossimBlendMosaic.

Definition at line 646 of file ossimImageCombiner.cpp.

References ossimImageSource::saveState().

Referenced by ossimElevationMosaic::saveState(), ossimImageMosaic::saveState(), ossimMaxMosaic::saveState(), ossimSFIMFusion::saveState(), and ossimLocalCorrelationFusion::saveState().

648 {
649  return ossimImageSource::saveState(kwl, prefix);
650 }
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ updateRects()

void ossimImageCombiner::updateRects ( )
virtual

This will go through and precompute the bounding rects of each input image.

Definition at line 333 of file ossimImageCombiner.cpp.

References theComputeFullResBoundsFlag.

334 {
336 }

Member Data Documentation

◆ theComputeFullResBoundsFlag

bool ossimImageCombiner::theComputeFullResBoundsFlag
mutableprotected

◆ theCurrentIndex

ossim_uint32 ossimImageCombiner::theCurrentIndex
protected

◆ theFullResBounds

std::vector<ossimIrect> ossimImageCombiner::theFullResBounds
mutableprotected

◆ theHasDifferentInputs

bool ossimImageCombiner::theHasDifferentInputs
protected

Definition at line 131 of file ossimImageCombiner.h.

Referenced by hasDifferentInputs(), and initialize().

◆ theInputToPassThrough

ossim_uint32 ossimImageCombiner::theInputToPassThrough
protected

◆ theLargestNumberOfInputBands

ossim_uint32 ossimImageCombiner::theLargestNumberOfInputBands
protected

◆ theNormTile

ossimRefPtr<ossimImageData> ossimImageCombiner::theNormTile
protected

Definition at line 132 of file ossimImageCombiner.h.

Referenced by getNextNormTile().


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