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

#include <ossimOrthoImageMosaic.h>

Inheritance diagram for ossimOrthoImageMosaic:
ossimImageMosaic ossimImageCombiner ossimImageSource ossimConnectableObjectListener ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimOrthoImageMosaic ()
 
 ossimOrthoImageMosaic (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 ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the geometry associated with the full mosaic. 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 ossimIrect &origin, ossim_uint32 resLevel=0)
 
ossimIrect getRelativeRect (ossim_uint32 index, ossim_uint32 resLevel=0) const
 
- Public Member Functions inherited from ossimImageMosaic
 ossimImageMosaic ()
 
 ossimImageMosaic (ossimConnectableObject::ConnectableObjectList &inputSources)
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &origin, ossim_uint32 resLevel=0)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
- Public Member Functions inherited from ossimImageCombiner
 ossimImageCombiner ()
 
 ossimImageCombiner (ossimObject *owner, int numberOfInputs, int numberOfOutputs, bool inputListIsFixedFlag, bool outputListIsFixedFlag)
 
 ossimImageCombiner (ossimConnectableObject::ConnectableObjectList &inputSources)
 
virtual void updateRects ()
 This will go through and precompute the bounding rects of each input image. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 Returns the number of bands available from the input. More...
 
virtual 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 ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, 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 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 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 ~ossimOrthoImageMosaic ()
 
void computeBoundingRect (ossim_uint32 resLevel=0)
 
void updateGeometry ()
 If this object is maintaining an ossimImageGeometry, this method needs to be called after each time the contents of the mosaic changes. More...
 
- Protected Member Functions inherited from ossimImageMosaic
virtual ~ossimImageMosaic ()
 
void allocate ()
 Called on first getTile, will initialize all data needed. More...
 
template<class T >
ossimRefPtr< ossimImageDatacombine (T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
template<class T >
ossimRefPtr< ossimImageDatacombineNorm (T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
- Protected Member Functions inherited from ossimImageCombiner
virtual ~ossimImageCombiner ()
 
void precomputeBounds () const
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

std::vector< ossimDptm_InputTiePoints
 
ossimDpt m_Delta
 Holds R0 delta and will be scaled for different r-level requests. More...
 
ossimDpt m_UpperLeftTie
 Will hold the upper left tie of the mosaic. More...
 
ossimIrect m_BoundingRect
 
ossimString m_Units
 
ossimRefPtr< ossimImageGeometrym_Geometry
 The input image geometry, altered by the map tiepoint. More...
 
- Protected Attributes inherited from ossimImageMosaic
ossimRefPtr< ossimImageDatatheTile
 
- Protected Attributes inherited from ossimImageCombiner
ossim_uint32 theLargestNumberOfInputBands
 
ossim_uint32 theInputToPassThrough
 
bool theHasDifferentInputs
 
ossimRefPtr< ossimImageDatatheNormTile
 
std::vector< ossimIrecttheFullResBounds
 
bool theComputeFullResBoundsFlag
 
ossim_uint32 theCurrentIndex
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 
- Protected Attributes inherited from ossimListener
bool theListenerEnableFlag
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file ossimOrthoImageMosaic.h.

Constructor & Destructor Documentation

◆ ossimOrthoImageMosaic() [1/2]

ossimOrthoImageMosaic::ossimOrthoImageMosaic ( )

Definition at line 24 of file ossimOrthoImageMosaic.cpp.

References m_Delta, m_UpperLeftTie, and ossimDpt::makeNan().

26 {
27  m_Delta.makeNan();
29 }
ossimDpt m_Delta
Holds R0 delta and will be scaled for different r-level requests.
ossimDpt m_UpperLeftTie
Will hold the upper left tie of the mosaic.
void makeNan()
Definition: ossimDpt.h:65

◆ ossimOrthoImageMosaic() [2/2]

ossimOrthoImageMosaic::ossimOrthoImageMosaic ( ossimConnectableObject::ConnectableObjectList inputSources)

Definition at line 34 of file ossimOrthoImageMosaic.cpp.

References m_Delta, m_UpperLeftTie, and ossimDpt::makeNan().

35  :ossimImageMosaic(inputSources)
36 {
37  m_Delta.makeNan();
39 }
ossimDpt m_Delta
Holds R0 delta and will be scaled for different r-level requests.
ossimDpt m_UpperLeftTie
Will hold the upper left tie of the mosaic.
void makeNan()
Definition: ossimDpt.h:65

◆ ~ossimOrthoImageMosaic()

ossimOrthoImageMosaic::~ossimOrthoImageMosaic ( )
protectedvirtual

Definition at line 44 of file ossimOrthoImageMosaic.cpp.

45 {
46 }

Member Function Documentation

◆ computeBoundingRect()

void ossimOrthoImageMosaic::computeBoundingRect ( ossim_uint32  resLevel = 0)
protected

Definition at line 367 of file ossimOrthoImageMosaic.cpp.

References getRelativeRect(), m_BoundingRect, m_InputTiePoints, and ossimIrect::makeNan().

368 {
369  const char* MODULE = "ossimOrthoImageMosaic::computeBoundingRect";
370 
372 
373  for(ossim_uint32 i = 0; i < m_InputTiePoints.size(); ++ i)
374  {
375  ossimIrect shiftedRect = getRelativeRect(i, resLevel);
376 
377  if(traceDebug())
378  {
379  CLOG << "bounding rect for input " << (i+1)
380  << ":" << shiftedRect << endl;
381  }
382  if(!shiftedRect.hasNans())
383  {
384  if(m_BoundingRect.hasNans())
385  {
386  m_BoundingRect = shiftedRect;
387  }
388  else
389  {
390  m_BoundingRect = m_BoundingRect.combine(shiftedRect);
391  }
392  }
393  }
394 }
std::vector< ossimDpt > m_InputTiePoints
#define CLOG
Definition: ossimTrace.h:23
ossimIrect getRelativeRect(ossim_uint32 index, ossim_uint32 resLevel=0) const
unsigned int ossim_uint32
void makeNan()
Definition: ossimIrect.h:329
bool hasNans() const
Definition: ossimIrect.h:337
ossimIrect combine(const ossimIrect &rect) const
Definition: ossimIrect.cpp:543

◆ getBoundingRect()

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

This will return the bounding rect of the source.

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

Reimplemented from ossimImageCombiner.

Definition at line 158 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), ossimDpt::hasNans(), m_BoundingRect, ossimDpt::makeNan(), and PTR_CAST.

159 {
160  ossimDpt decimation;
161 
162  decimation.makeNan();
163 
165  getInput(0));
166  if(interface)
167  {
168  interface->getDecimationFactor(resLevel,
169  decimation);
170  }
171  if(decimation.hasNans())
172  {
173  return m_BoundingRect;
174  }
175  return m_BoundingRect*decimation;
176 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimDpt.h:67
void makeNan()
Definition: ossimDpt.h:65

◆ getImageGeometry()

ossimRefPtr< ossimImageGeometry > ossimOrthoImageMosaic::getImageGeometry ( )
virtual

Returns the geometry associated with the full mosaic.

This object maintains it's own geometry instance.

Reimplemented from ossimImageSource.

Definition at line 108 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), m_Geometry, PTR_CAST, updateGeometry(), and ossimRefPtr< T >::valid().

Referenced by ossimTiledElevationDatabase::mapRegion().

109 {
110  if ( !m_Geometry.valid() )
111  {
112  // The geometry (projection) associated with this mosaic is necessarily the same for all
113  // single-image objects feeding into this combiner, So we will copy the first image source's
114  // geometry, and modify our copy to reflect the mosaic-specific items.
116  if(interface)
117  {
118  ossimRefPtr<ossimImageGeometry> inputGeom = interface->getImageGeometry();
119  if ( inputGeom.valid() )
120  {
121  m_Geometry = new ossimImageGeometry(*inputGeom);
122  updateGeometry();
123  }
124  }
125  }
126  return m_Geometry;
127 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
void updateGeometry()
If this object is maintaining an ossimImageGeometry, this method needs to be called after each time t...
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimRefPtr< ossimImageGeometry > m_Geometry
The input image geometry, altered by the map tiepoint.

◆ getNextTile()

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

Reimplemented from ossimImageCombiner.

Definition at line 290 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), ossimConnectableObject::getNumberOfInputs(), getRelativeRect(), OSSIM_NULL, PTR_CAST, size, status, and ossimImageCombiner::theCurrentIndex.

293 {
294  const char *MODULE="ossimOrthoImageMosaic::getNextTile";
295 
297 
298  if(theCurrentIndex >= size)
299  {
301  }
302 
303  ossimImageSource* temp = NULL;
306 
307  do
308  {
310  if(temp)
311  {
312  ossimIrect relRect = getRelativeRect(theCurrentIndex, resLevel);
313 
314  if(traceDebug())
315  {
316  CLOG << "Rel rect for input " << theCurrentIndex
317  << " = " << relRect
318  << "\nRes level: " << resLevel
319  << endl;
320  }
321 
322  if(origin.intersects(relRect))
323  {
324  // get the rect relative to the input rect
325  //
326  ossimIrect shiftedRect = origin + (ossimIpt(-relRect.ul().x,
327  -relRect.ul().y));
328 
329  // request that tile from the input space.
330  result = temp->getTile(shiftedRect, resLevel);
331 
332  // now change the origin to the output origin.
333  if (result.valid())
334  {
335  result->setOrigin(origin.ul());
336 
337  status = result->getDataObjectStatus();
338 
339  if((status == OSSIM_NULL)||(status == OSSIM_EMPTY))
340  {
341  result = NULL;
342  }
343  }
344  }
345  else
346  {
347  result = NULL;
348  }
349  }
350 
351  // Go to next source.
352  ++theCurrentIndex;
353 
354  } while(!result.valid() && (theCurrentIndex<size));
355 
356  returnedIdx = theCurrentIndex;
357  if(result.valid())
358  {
359  --returnedIdx;
360  }
361  return result;
362 }
#define CLOG
Definition: ossimTrace.h:23
bool valid() const
Definition: ossimRefPtr.h:75
const ossimIpt & ul() const
Definition: ossimIrect.h:274
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
ossimIrect getRelativeRect(ossim_uint32 index, ossim_uint32 resLevel=0) const
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
virtual void setOrigin(const ossimIpt &origin)
return status
ossim_int32 y
Definition: ossimIpt.h:142
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
ossim_int32 x
Definition: ossimIpt.h:141
ossimDataObjectStatus
Definitions for data object status.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getNumberOfOverlappingImages()

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

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

Reimplemented from ossimImageCombiner.

Definition at line 51 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), getRelativeRect(), ossimIrect::hasNans(), ossimIrect::intersects(), m_InputTiePoints, and PTR_CAST.

53 {
54  ossim_uint32 result = 0;
55  for(ossim_uint32 i = 0; i < m_InputTiePoints.size(); ++i)
56  {
58  getInput(i));
59  if(interface&&
60  !m_InputTiePoints[i].hasNans())
61  {
62  ossimIrect tempRect = getRelativeRect(i, resLevel);
63 
64  if(!tempRect.hasNans())
65  {
66  if(tempRect.intersects(rect))
67  {
68  ++result;
69  }
70  }
71  }
72  }
73 
74  return 0;
75 }
std::vector< ossimDpt > m_InputTiePoints
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
ossimIrect getRelativeRect(ossim_uint32 index, ossim_uint32 resLevel=0) const
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimIrect.h:337

◆ getOverlappingImages()

void ossimOrthoImageMosaic::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 from ossimImageCombiner.

Definition at line 80 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), getRelativeRect(), ossimIrect::hasNans(), ossimIrect::intersects(), m_InputTiePoints, and PTR_CAST.

83 {
84  result.clear();
85  for(ossim_uint32 i = 0; i < m_InputTiePoints.size(); ++i)
86  {
88  getInput(i));
89  if(interface&&
90  !m_InputTiePoints[i].hasNans())
91  {
92  ossimIrect tempRect = getRelativeRect(i, resLevel);
93 
94  if(!tempRect.hasNans())
95  {
96  if(tempRect.intersects(rect))
97  {
98  result.push_back(i);
99  }
100  }
101  }
102  }
103 }
std::vector< ossimDpt > m_InputTiePoints
bool intersects(const ossimIrect &rect) const
Definition: ossimIrect.cpp:183
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
ossimIrect getRelativeRect(ossim_uint32 index, ossim_uint32 resLevel=0) const
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimIrect.h:337

◆ getRelativeRect()

ossimIrect ossimOrthoImageMosaic::getRelativeRect ( ossim_uint32  index,
ossim_uint32  resLevel = 0 
) const

Definition at line 399 of file ossimOrthoImageMosaic.cpp.

References ossimConnectableObject::getInput(), ossimDpt::hasNans(), ossimIrect::hasNans(), m_Delta, m_InputTiePoints, m_UpperLeftTie, ossimIrect::makeNan(), PTR_CAST, ossimDpt::x, and ossimDpt::y.

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

401 {
402  ossimIrect result;
404  getInput(index));
405  result.makeNan();
406  if(interface&&
407  !m_InputTiePoints[index].hasNans())
408  {
409  ossimIrect inputRect = interface->getBoundingRect();
410  result = inputRect;
411 
412  if(!inputRect.hasNans())
413  {
414  ossimDpt shift = (m_InputTiePoints[index] - m_UpperLeftTie);
415 
416  shift.x/= m_Delta.x;
417  shift.y/=-m_Delta.y;
418 
419  result = result + shift;
420  if(!resLevel)
421  {
422  return result;
423  }
424  ossimDpt decimation;
425  interface->getDecimationFactor(resLevel, decimation);
426  if(!decimation.hasNans())
427  {
428  result = result * decimation;
429  }
430  }
431  }
432 
433  return result;
434 }
std::vector< ossimDpt > m_InputTiePoints
double y
Definition: ossimDpt.h:165
ossimDpt m_Delta
Holds R0 delta and will be scaled for different r-level requests.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimDpt.h:67
ossimDpt m_UpperLeftTie
Will hold the upper left tie of the mosaic.
void makeNan()
Definition: ossimIrect.h:329
double x
Definition: ossimDpt.h:164
bool hasNans() const
Definition: ossimIrect.h:337

◆ initialize()

void ossimOrthoImageMosaic::initialize ( )
virtual

Reimplemented from ossimImageMosaic.

Definition at line 181 of file ossimOrthoImageMosaic.cpp.

References m_Delta, m_InputTiePoints, m_UpperLeftTie, and ossimDpt::makeNan().

182 {
183  m_InputTiePoints.clear();
184  m_Delta.makeNan();
186 
187  if(traceDebug())
188  {
190  << "ossimOrthoImageMosaic::initialize() DEBUG: Entered..."
191  << "Number of inputs = " << getNumberOfInputs()
192  << std::endl;
193  }
194  if(getNumberOfInputs())
195  {
197  for(ossim_uint32 i = 0; i < getNumberOfInputs(); ++i)
198  {
200  m_InputTiePoints[i].makeNan();
201  if(interface)
202  {
203  ossimRefPtr<ossimImageGeometry> geom = interface->getImageGeometry();
204  if( geom.valid() )
205  {
207  if(mapPrj)
208  {
209  if(!mapPrj->isGeographic())
210  {
211  m_Units = "meters";
212  m_Delta = mapPrj->getMetersPerPixel();
213  }
214  else
215  {
216  m_Units = "degrees";
218  }
219  if(m_Units == "degrees")
220  {
221  m_InputTiePoints[i].x = mapPrj->getUlGpt().lond();
222  m_InputTiePoints[i].y = mapPrj->getUlGpt().latd();
223  }
224  else if(m_Units == "meters")
225  {
226  m_InputTiePoints[i].x = mapPrj->getUlEastingNorthing().x;;
227  m_InputTiePoints[i].y = mapPrj->getUlEastingNorthing().y;
228  }
229 
230  if(traceDebug())
231  {
233  << "tie points for input " << i << " = "
234  << m_InputTiePoints[i] << std::endl;
235  }
236 
237  }
238  }
239  if(!m_InputTiePoints[i].hasNans())
240  {
241  if(m_UpperLeftTie.hasNans())
242  {
244  }
245  else if(!m_InputTiePoints[i].hasNans())
246  {
247  if(m_Units == "meters")
248  {
251  }
252  else
253  {
256  }
257  }
258  }
259  }
260  else
261  {
262  m_InputTiePoints[i].makeNan();
263 // CLOG << "Input " << i << " will not be used since no ortho information exists" << endl;
264  }
265  }
266  }
267 
269  if(traceDebug())
270  {
272  << "m_UpperLeftTie = " << m_UpperLeftTie << std::endl
273  << "delta per pixel = " << m_Delta << std::endl
274  << "bounding rect = " << m_BoundingRect << std::endl;
275  }
277 
278  // Finally, update the geometry (if there was one already defined), to reflect the change in input
279  updateGeometry();
280 
281  if(traceDebug())
282  {
283  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOrthoImageMosaic::initialize() DEBUG: Leaving..." << std::endl;
284  }
285 }
virtual const ossimDpt & getDecimalDegreesPerPixel() const
Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing...
std::vector< ossimDpt > m_InputTiePoints
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
bool valid() const
Definition: ossimRefPtr.h:75
void computeBoundingRect(ossim_uint32 resLevel=0)
double y
Definition: ossimDpt.h:165
ossimDpt m_Delta
Holds R0 delta and will be scaled for different r-level requests.
virtual bool isGeographic() const
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void initialize()
double lat
Definition: ossimDpt.h:165
unsigned int ossim_uint32
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimDpt.h:67
double lon
Definition: ossimDpt.h:164
virtual const ossimGpt & getUlGpt() const
void updateGeometry()
If this object is maintaining an ossimImageGeometry, this method needs to be called after each time t...
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
ossimDpt m_UpperLeftTie
Will hold the upper left tie of the mosaic.
#define max(a, b)
Definition: auxiliary.h:76
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
double x
Definition: ossimDpt.h:164
virtual const ossimDpt & getUlEastingNorthing() const
virtual ossimDpt getMetersPerPixel() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void makeNan()
Definition: ossimDpt.h:65
#define min(a, b)
Definition: auxiliary.h:75

◆ updateGeometry()

void ossimOrthoImageMosaic::updateGeometry ( )
protected

If this object is maintaining an ossimImageGeometry, this method needs to be called after each time the contents of the mosaic changes.

Definition at line 133 of file ossimOrthoImageMosaic.cpp.

References ossimGpt::datum(), ossimImageGeometry::getProjection(), m_Delta, m_Geometry, m_Units, m_UpperLeftTie, ossimMapProjection::origin(), PTR_CAST, ossimMapProjection::setDecimalDegreesPerPixel(), ossimMapProjection::setMetersPerPixel(), ossimMapProjection::setUlEastingNorthing(), ossimMapProjection::setUlGpt(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.

Referenced by getImageGeometry().

134 {
135  if (!m_Geometry.valid())
136  return;
137 
139  if (mapProj)
140  {
141  if(m_Units == "degrees")
142  {
145  mapProj->origin().datum()));
146  }
147  else if(m_Units == "meters")
148  {
149  mapProj->setMetersPerPixel(m_Delta);
151  }
152  }
153 }
bool valid() const
Definition: ossimRefPtr.h:75
double y
Definition: ossimDpt.h:165
ossimDpt m_Delta
Holds R0 delta and will be scaled for different r-level requests.
virtual void setDecimalDegreesPerPixel(const ossimDpt &gsd)
virtual void setUlGpt(const ossimGpt &ulGpt)
virtual void setMetersPerPixel(const ossimDpt &gsd)
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
virtual void setUlEastingNorthing(const ossimDpt &ulEastingNorthing)
virtual ossimGpt origin() const
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
ossimDpt m_UpperLeftTie
Will hold the upper left tie of the mosaic.
double x
Definition: ossimDpt.h:164
ossimRefPtr< ossimImageGeometry > m_Geometry
The input image geometry, altered by the map tiepoint.

Member Data Documentation

◆ m_BoundingRect

ossimIrect ossimOrthoImageMosaic::m_BoundingRect
protected

Definition at line 54 of file ossimOrthoImageMosaic.h.

Referenced by computeBoundingRect(), and getBoundingRect().

◆ m_Delta

ossimDpt ossimOrthoImageMosaic::m_Delta
protected

Holds R0 delta and will be scaled for different r-level requests.

Definition at line 52 of file ossimOrthoImageMosaic.h.

Referenced by getRelativeRect(), initialize(), ossimOrthoImageMosaic(), and updateGeometry().

◆ m_Geometry

ossimRefPtr<ossimImageGeometry> ossimOrthoImageMosaic::m_Geometry
protected

The input image geometry, altered by the map tiepoint.

Definition at line 56 of file ossimOrthoImageMosaic.h.

Referenced by getImageGeometry(), and updateGeometry().

◆ m_InputTiePoints

std::vector<ossimDpt> ossimOrthoImageMosaic::m_InputTiePoints
protected

◆ m_Units

ossimString ossimOrthoImageMosaic::m_Units
protected

Definition at line 55 of file ossimOrthoImageMosaic.h.

Referenced by updateGeometry().

◆ m_UpperLeftTie

ossimDpt ossimOrthoImageMosaic::m_UpperLeftTie
protected

Will hold the upper left tie of the mosaic.

Definition at line 53 of file ossimOrthoImageMosaic.h.

Referenced by getRelativeRect(), initialize(), ossimOrthoImageMosaic(), and updateGeometry().


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