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

For engineering use in ATP. More...

#include <AtpAnnotatedImage.h>

Inheritance diagram for ATP::AtpAnnotatedImage:
ossimImageChain ossimImageSource ossimConnectableObjectListener ossimConnectableContainerInterface ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 AtpAnnotatedImage (ossimRefPtr< ossimImageChain > &sourceChain, ossimRefPtr< ossimImageViewProjectionTransform > &ivt, const ossimDrect &aoi)
 
 ~AtpAnnotatedImage ()
 
void setImageName (const std::string &name)
 
void setAOI (const ossimDrect &aoi)
 
void annotateFeatureSearchTiles (std::vector< ossimIrect > &tileRects)
 
void annotateFeatures (std::vector< ossimDpt > &atpList, int r, int g, int b)
 
void annotateCorrelations (AtpList &atpList, int r, int g, int b)
 
void annotateCorrelationSearchTile (const ossimIrect &tileRect)
 
void annotateOverlap (ossimPolygon &poly)
 
void annotateResiduals (AtpList &atps, int r, int g, int b)
 
void annotateTPIDs (AtpList &atps, int r, int g, int b)
 
void annotateCorrBoxes (AtpList &atpList, int r)
 
bool write ()
 
- Public Member Functions inherited from ossimImageChain
 ossimImageChain ()
 
virtual ~ossimImageChain ()
 
ossimConnectableObject::ConnectableObjectListgetChainList ()
 
const ossimConnectableObject::ConnectableObjectListgetChainList () const
 
ossimConnectableObjectoperator[] (ossim_uint32 index)
 
virtual ossimConnectableObjectgetConnectableObject (ossim_uint32 index)
 Same as operator[](ossim_uint32 i) More...
 
virtual ossim_int32 indexOf (ossimConnectableObject *obj) const
 
virtual ossimImageSourcegetFirstSource ()
 Return the first source which is the one that first receives the getTile request. More...
 
virtual const ossimImageSourcegetFirstSource () const
 
virtual ossimObjectgetFirstObject ()
 
virtual ossimImageSourcegetLastSource ()
 Return the last source which is the one that last receives the getTile request. More...
 
virtual const ossimImageSourcegetLastSource () const
 
virtual ossimObjectgetLastObject ()
 
bool addFirst (ossimConnectableObject *obj)
 Adds it to the start of the chain. More...
 
bool addLast (ossimConnectableObject *obj)
 Adds it to the end. More...
 
bool deleteFirst ()
 Deletes the first object. More...
 
bool deleteLast ()
 Deletes the last object. More...
 
bool insertRight (ossimConnectableObject *newObj, ossimConnectableObject *rightOfThisObj)
 
bool insertRight (ossimConnectableObject *newObj, const ossimId &id)
 
bool insertLeft (ossimConnectableObject *newObj, const ossimId &id)
 
bool insertLeft (ossimConnectableObject *newObj, ossimConnectableObject *leftOfThisObj)
 
bool replace (ossimConnectableObject *newObj, ossimConnectableObject *oldObj)
 
virtual bool add (ossimConnectableObject *source)
 Will return true or false if an image source was added to the chain. More...
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 Within the image chain will pass the head of the list. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 this call is passed to the head of the list. More...
 
virtual ossimScalarType getOutputScalarType () const
 This call is passed to the head of the list. 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 void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual ossim_uint32 getTileWidth () const
 This call is passed to the head of the list. More...
 
virtual ossim_uint32 getTileHeight () const
 This call is passed to the head of the list. More...
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 Will pass this call to the head of the list. More...
 
virtual void getValidImageVertices (vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if not defined. More...
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 Will return the decimation factor for the given resolution level. More...
 
virtual void getDecimationFactors (vector< ossimDpt > &decimations) const
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Will return the number of resolution levels. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=NULL) const
 Will save the state of the chain. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=NULL)
 Will load the state. More...
 
virtual void initialize ()
 
virtual void enableSource ()
 
virtual void disableSource ()
 
bool canConnectMyInputTo (ossim_int32 myInputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const ossimString &className, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findFirstObjectOfType(const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findFirstObjectOfType(const ossimString &className, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObject(const ossimId &id, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObject(const ossimConnectableObject *obj, bool recurse=true))
 
virtual void makeUniqueIds ()
 Will cycle through all sources setting their ids. More...
 
virtual ossim_uint32 getNumberOfObjects (bool recurse=true) const
 Returns the number of objects within this container and all child containers. More...
 
virtual ossim_uint32 getNumberOfSources () const
 Deprecated! Please use getNumberOfObjects(false). More...
 
virtual bool addChild (ossimConnectableObject *attachableObject)
 Will add an object to the container and then set the added objects owner to this. More...
 
virtual bool removeChild (ossimConnectableObject *object)
 Will remove the child from the container. More...
 
virtual ossimConnectableObjectremoveChild (const ossimId &id)
 
virtual void getChildren (vector< ossimConnectableObject *> &children, bool immediateChildrenOnlyFlag)
 
virtual void disconnectInputEvent (ossimConnectionEvent &event)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &event)
 
virtual void connectInputEvent (ossimConnectionEvent &event)
 
virtual void connectOutputEvent (ossimConnectionEvent &event)
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &event)
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
void deleteList ()
 
virtual ossimConnectableObject::ConnectableObjectListimageChainList ()
 These access methods greatly facilitate the implementation of an image chain adaptor class. More...
 
virtual const ossimConnectableObject::ConnectableObjectListimageChainList () const
 
- Public Member Functions inherited from ossimImageSource
 ossimImageSource (ossimObject *owner=0)
 
 ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimImageSource ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIpt &origin, ossim_uint32 resLevel=0)
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossimObjectgetObject ()
 For RTTI support. More...
 
virtual const ossimObjectgetObject () const
 For RTTI support. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. 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 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 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...
 
- 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 connectionEvent (ossimConnectionEvent &)
 
virtual void propertyEvent (ossimPropertyEvent &)
 
virtual void addObjectEvent (ossimContainerEvent &)
 
virtual void removeObjectEvent (ossimContainerEvent &)
 
virtual void containerEvent (ossimContainerEvent &)
 
virtual void refreshEvent (ossimRefreshEvent &)
 
- Public Member Functions inherited from ossimListener
 ossimListener ()
 
virtual ~ossimListener ()
 
void enableListener ()
 
void disableListener ()
 
void setListenerEnableFlag (bool flag)
 
bool isListenerEnabled () const
 
bool getListenerEnableFlag () const
 
- Public Member Functions inherited from ossimConnectableContainerInterface
 ossimConnectableContainerInterface (ossimObject *obj)
 
virtual ~ossimConnectableContainerInterface ()
 
virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType (const RTTItypeid &typeInfo, bool recurse=true)=0
 
virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType (const ossimString &className, bool recurse=true)=0
 
virtual ossimConnectableObjectfindFirstObjectOfType (const RTTItypeid &typeInfo, bool recurse=true)=0
 
virtual ossimConnectableObjectfindFirstObjectOfType (const ossimString &className, bool recurse=true)=0
 
virtual ossimConnectableObjectfindObject (const ossimId &id, bool recurse=true)=0
 
virtual ossimConnectableObjectfindObject (const ossimConnectableObject *obj, bool recurse=true)=0
 
ossimObjectgetObject ()
 
const ossimObjectgetObject () const
 
void deleteAllChildren ()
 
virtual void getChildren (std::vector< ossimConnectableObject *> &children, bool immediateChildrenOnlyFlag)=0
 

Protected Member Functions

void drawBox (const ossimIrect &rect, int r, int g, int b)
 
- Protected Member Functions inherited from ossimImageChain
void prepareForRemoval (ossimConnectableObject *connectableObject)
 Inserts all of this object's children and inputs into the container provided. More...
 
bool addAllSources (map< ossimId, vector< ossimId > > &idMapping, const ossimKeywordlist &kwl, const char *prefix=NULL)
 For dynamic loading to take place we must allocate all objects first and then assign id's later. More...
 
void findInputConnectionIds (vector< ossimId > &result, const ossimKeywordlist &kwl, const char *prefix=NULL)
 
bool connectAllSources (const map< ossimId, vector< ossimId > > &idMapping)
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossimRefPtr< ossimAnnotationSourcem_annSource
 
ossimDpt m_annScale
 
ossimDpt m_annScaleInverse
 
ossimIrect m_annScaledAoi
 
ossimFilename m_annFilename
 
- Protected Attributes inherited from ossimImageChain
ossimConnectableObject::ConnectableObjectList theImageChainList
 This will hold a sequence of image sources. More...
 
ossimRefPtr< ossimImageDatatheBlankTile
 
bool theLoadStateFlag
 
- 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
 
- Protected Attributes inherited from ossimConnectableContainerInterface
ossimObjecttheBaseObject
 

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

For engineering use in ATP.

Definition at line 27 of file AtpAnnotatedImage.h.

Constructor & Destructor Documentation

◆ AtpAnnotatedImage()

ATP::AtpAnnotatedImage::AtpAnnotatedImage ( ossimRefPtr< ossimImageChain > &  sourceChain,
ossimRefPtr< ossimImageViewProjectionTransform > &  ivt,
const ossimDrect aoi 
)

Definition at line 29 of file AtpAnnotatedImage.cpp.

References ossimImageChain::accept(), ossimImageChain::add(), ossim::JsonParam::asInt(), ossimRefPtr< T >::get(), ossim::JsonConfig::getParameter(), ossimDrect::height(), ossimImageChain::initialize(), ATP::AtpConfig::instance(), m_annScale, m_annScaleInverse, m_annSource, setAOI(), ossimBandSelector::setOutputBandList(), ossimDrect::width(), ossimDpt::x, and ossimDpt::y.

32 : m_annFilename("annotated.tif")
33 {
34  const char* MODULE = "AtpGenerator::setupAnnotatedChain() ";
35 
36  // Combine inputs into a two-color multiview
37 // ossimRefPtr<ossimTwoColorView> mosaic (new ossimTwoColorView);
38 // mosaic->connectMyInputTo(m_refChain.get());
39 // mosaic->connectMyInputTo(m_cmpChain.get());
40 // m_annChain->add(mosaic.get());
41  add(sourceChain.get()); // just use ref image.
42 
43  // Insure there is a renderer to output to a common view space:
44  ossimTypeNameVisitor vref ("ossimImageRenderer");
45  sourceChain->accept(vref);
46  ossimImageRenderer* r = vref.getObjectAs<ossimImageRenderer>();
47  if (!r)
48  {
49  auto renderer = new ossimImageRenderer;
50  add(renderer);
51  renderer->setImageViewTransform(ivt.get());
52 
53  // Add cache after resampler:
54  auto * cache = new ossimCacheTileSource();
55  add(cache);
56  }
57 
58  // The ref chain is necessarily single band. Need to map to RGB:
60  add(band_selector.get());
61  vector<ossim_uint32> bandList;
62  bandList.push_back(0);
63  bandList.push_back(0);
64  bandList.push_back(0);
65  band_selector->setOutputBandList(bandList, true);
66 
67  // Add the graphics annotation source:
69  add(m_annSource.get());
70 
71  initialize();
72 
73  // Keep track of the view geometry's image size to scale output when writing annotated chain:
74  int annSize = AtpConfig::instance().getParameter("annotatedImageSize").asInt();
75  if (annSize <= 0)
76  m_annScale = ossimDpt(1, 1);
77  else
78  m_annScale = ossimDpt(aoi.width()/annSize, aoi.height()/annSize);
79 
80  if (m_annScale.y > m_annScale.x)
82  else
84  if (m_annScale.x < 1.0)
85  m_annScale = ossimDpt(1.0, 1.0);
87 
88  setAOI(aoi);
89 }
JsonParam & getParameter(const char *paramName)
Returns a parameter (might be a null parameter if paramName not found in the configuration.
Definition: JsonConfig.cpp:377
ossim_float64 width() const
Definition: ossimDrect.h:522
double y
Definition: ossimDpt.h:165
virtual void initialize()
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.
Cache Tile Source.
void setAOI(const ossimDrect &aoi)
virtual bool add(ossimConnectableObject *source)
Will return true or false if an image source was added to the chain.
ossim_float64 height() const
Definition: ossimDrect.h:517
ossimRefPtr< ossimAnnotationSource > m_annSource
virtual void setOutputBandList(const vector< ossim_uint32 > &outputBandList, bool disablePassThru=false)
Sets the output band list.
double x
Definition: ossimDpt.h:164
static AtpConfig & instance()
Singleton implementation.
Definition: AtpConfig.cpp:20
int asInt() const
Definition: JsonConfig.cpp:271

◆ ~AtpAnnotatedImage()

ATP::AtpAnnotatedImage::~AtpAnnotatedImage ( )

Definition at line 91 of file AtpAnnotatedImage.cpp.

92 {
93 }

Member Function Documentation

◆ annotateCorrBoxes()

void ATP::AtpAnnotatedImage::annotateCorrBoxes ( AtpList atpList,
int  r 
)

◆ annotateCorrelations()

void ATP::AtpAnnotatedImage::annotateCorrelations ( AtpList atpList,
int  r,
int  g,
int  b 
)

Definition at line 175 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ossim::JsonParam::asFloat(), ossim::JsonParam::asUint(), drawBox(), ossimRefPtr< T >::get(), ossim::JsonConfig::getParameter(), ATP::AtpConfig::instance(), m_annScaleInverse, m_annSource, ossimIrect::set_ll(), ossimIrect::set_lr(), ossimIrect::set_ul(), ossimIrect::set_ur(), ossimDpt::x, and ossimDpt::y.

176 {
177  if (!m_annSource)
178  return;
179 
180  AtpConfig& config = AtpConfig::instance();
181  int halfWidth = config.getParameter("corrWindowSize").asUint() * m_annScaleInverse.x / 2 ;
182  if (halfWidth < 3)
183  halfWidth = 3;
184 
185  double residualMultiplier = config.getParameter("residualMultiplier").asFloat();
186  if (residualMultiplier < 1)
187  residualMultiplier = 1.0;
188 
189  ossimDpt refPt, cmpPt, residual;
190  for (auto &atp : atpList)
191  {
192  // For each correlation, draw a box, scaling to the size of the annotated image:
193  atp->getCmpViewPoint(cmpPt);
194  cmpPt *= m_annScaleInverse.x;
195 
196  ossimIrect box;
197  box.set_ul (ossimIpt(cmpPt.x - halfWidth, cmpPt.y - halfWidth));
198  box.set_ur (ossimIpt(cmpPt.x + halfWidth, cmpPt.y - halfWidth));
199  box.set_lr (ossimIpt(cmpPt.x + halfWidth, cmpPt.y + halfWidth));
200  box.set_ll (ossimIpt(cmpPt.x - halfWidth, cmpPt.y + halfWidth));
201  drawBox(box, r, g, b);
202 
203  // Draw residual vector:
204  atp->getVectorResidual(residual);
205  refPt.x = cmpPt.x - residualMultiplier*residual.x;
206  refPt.y = cmpPt.y - residualMultiplier*residual.y;
208  m_annSource->addObject(l.get());
209  }
210 }
double y
Definition: ossimDpt.h:165
virtual bool addObject(ossimAnnotationObject *anObject)
void set_ul(const ossimIpt &pt)
Definition: ossimIrect.h:589
ossimRefPtr< ossimAnnotationSource > m_annSource
void set_lr(const ossimIpt &pt)
Definition: ossimIrect.h:623
void set_ll(const ossimIpt &pt)
Definition: ossimIrect.h:640
double x
Definition: ossimDpt.h:164
static AtpConfig & instance()
Singleton implementation.
Definition: AtpConfig.cpp:20
void drawBox(const ossimIrect &rect, int r, int g, int b)
void set_ur(const ossimIpt &pt)
Definition: ossimIrect.h:606

◆ annotateCorrelationSearchTile()

void ATP::AtpAnnotatedImage::annotateCorrelationSearchTile ( const ossimIrect tileRect)

Definition at line 273 of file AtpAnnotatedImage.cpp.

References drawBox(), m_annScaleInverse, m_annSource, and ossimDpt::x.

274 {
275  if (!m_annSource)
276  return;
277 
278  ossimIrect scaledRect = tileRect * m_annScaleInverse.x;
279  drawBox(scaledRect, 255, 200, 100);
280 }
ossimRefPtr< ossimAnnotationSource > m_annSource
double x
Definition: ossimDpt.h:164
void drawBox(const ossimIrect &rect, int r, int g, int b)

◆ annotateFeatures()

void ATP::AtpAnnotatedImage::annotateFeatures ( std::vector< ossimDpt > &  atpList,
int  r,
int  g,
int  b 
)

Definition at line 150 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ATP::AtpConfig::instance(), m_annScaleInverse, m_annSource, and ossimDpt::x.

151 {
152  if (!m_annSource)
153  return;
154 
155  AtpConfig& config = AtpConfig::instance();
156  int d = 1 ;
157 
158  for (auto &p : features)
159  {
160  // For each correlation, draw +, scaling to the size of the annotated image:
161  p *= m_annScaleInverse.x;
162  ossimDpt p1 (p.x, p.y-d);
163  ossimDpt p2 (p.x, p.y+d);
164  ossimDpt p3 (p.x-d, p.y);
165  ossimDpt p4 (p.x+1, p.y);
166 
167  ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(p1, p2, r, g, b);
168  ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(p3, p4, r, g, b);
169 
170  m_annSource->addObject(line1);
171  m_annSource->addObject(line2);
172  }
173 }
virtual bool addObject(ossimAnnotationObject *anObject)
ossimRefPtr< ossimAnnotationSource > m_annSource
double x
Definition: ossimDpt.h:164
static AtpConfig & instance()
Singleton implementation.
Definition: AtpConfig.cpp:20

◆ annotateFeatureSearchTiles()

void ATP::AtpAnnotatedImage::annotateFeatureSearchTiles ( std::vector< ossimIrect > &  tileRects)

Definition at line 233 of file AtpAnnotatedImage.cpp.

References CINFO, drawBox(), m_annScaleInverse, m_annSource, ossimIrect::set_ll(), ossimIrect::set_lr(), ossimIrect::set_ul(), ossimIrect::set_ur(), ossimDpt::x, and ossimDpt::y.

234 {
235  const char* MODULE = "AtpAnnotatedImage::annotateFeatureSearchTiles() ";
236 
237  if (!m_annSource)
238  return;
239 
240  if (searchTileRects.empty())
241  {
242  CINFO<<MODULE<<"No feature search tiles were established in the overlap."<<endl;
243  return;
244  }
245 
246  ossimDpt pt;
247 
248  for (auto &searchTileRect : searchTileRects)
249  {
250  ossimIrect box;
251 
252  // For each search rect, draw a box:
253  pt.x = searchTileRect.ul().x;
254  pt.y = searchTileRect.ul().y;
255  box.set_ul(pt * m_annScaleInverse.x);
256 
257  pt.x = searchTileRect.ur().x;
258  pt.y = searchTileRect.ur().y;
259  box.set_ur(pt * m_annScaleInverse.x);
260 
261  pt.x = searchTileRect.lr().x;
262  pt.y = searchTileRect.lr().y;
263  box.set_lr(pt * m_annScaleInverse.x);
264 
265  pt.x = searchTileRect.ll().x;
266  pt.y = searchTileRect.ll().y;
267  box.set_ll(pt * m_annScaleInverse.x);
268 
269  drawBox(box, 200, 255, 100);
270  }
271 }
double y
Definition: ossimDpt.h:165
void set_ul(const ossimIpt &pt)
Definition: ossimIrect.h:589
ossimRefPtr< ossimAnnotationSource > m_annSource
void set_lr(const ossimIpt &pt)
Definition: ossimIrect.h:623
void set_ll(const ossimIpt &pt)
Definition: ossimIrect.h:640
double x
Definition: ossimDpt.h:164
void drawBox(const ossimIrect &rect, int r, int g, int b)
#define CINFO
void set_ur(const ossimIpt &pt)
Definition: ossimIrect.h:606

◆ annotateOverlap()

void ATP::AtpAnnotatedImage::annotateOverlap ( ossimPolygon poly)

Definition at line 212 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ossimPolygon::getVertexList(), m_annScaleInverse, m_annSource, and ossimDpt::x.

213 {
214  ossimDpt ptA, ptB;
215  const vector<ossimDpt>& vlist = poly.getVertexList();
216 
217  for (size_t i=0; i<vlist.size(); ++i)
218  {
219  ptA = vlist[i];
220  if (i==0)
221  ptB = vlist.back();
222  else
223  ptB = vlist[i-1];
224 
225  ptA *= m_annScaleInverse.x;
226  ptB *= m_annScaleInverse.x;
227 
228  ossimAnnotationLineObject* line = new ossimAnnotationLineObject(ptA, ptB, 0,255,255);
229  m_annSource->addObject(line);
230  }
231 }
virtual bool addObject(ossimAnnotationObject *anObject)
const vector< ossimDpt > & getVertexList() const
ossimRefPtr< ossimAnnotationSource > m_annSource
double x
Definition: ossimDpt.h:164

◆ annotateResiduals()

void ATP::AtpAnnotatedImage::annotateResiduals ( AtpList atps,
int  r,
int  g,
int  b 
)

Definition at line 101 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ossim::JsonParam::asFloat(), ossim::JsonParam::asUint(), drawBox(), ossimRefPtr< T >::get(), ossim::JsonConfig::getParameter(), ATP::AtpConfig::instance(), m_annScaleInverse, m_annSource, ossimIrect::set_ll(), ossimIrect::set_lr(), ossimIrect::set_ul(), ossimIrect::set_ur(), ossimDpt::x, and ossimDpt::y.

102 {
103  if (!m_annSource)
104  return;
105 
106  int halfWidth = AtpConfig::instance().getParameter("corrWindowSize").asUint() * m_annScaleInverse.x / 2 ;
107  if (halfWidth < 3)
108  halfWidth = 3;
109 
110  AtpConfig& config = AtpConfig::instance();
111  double residualMultiplier = config.getParameter("residualMultiplier").asFloat();
112 
113  ossimDpt refPt, cmpPt, residual;
114  for (auto &atp : atps)
115  {
116  atp->getRefViewPoint(refPt);
117  refPt *= m_annScaleInverse.x;
118 
119  // Draw box around feature:
120  ossimIrect box;
121  box.set_ul (ossimIpt(refPt.x - halfWidth, refPt.y - halfWidth));
122  box.set_ur (ossimIpt(refPt.x + halfWidth, refPt.y - halfWidth));
123  box.set_lr (ossimIpt(refPt.x + halfWidth, refPt.y + halfWidth));
124  box.set_ll (ossimIpt(refPt.x - halfWidth, refPt.y + halfWidth));
125  drawBox(box, r, g, 0);
126 
127  // Draw residual vector:
128  atp->getVectorResidual(residual);
129  cmpPt.x = refPt.x + residualMultiplier*residual.x;
130  cmpPt.y = refPt.y + residualMultiplier*residual.y;
132  m_annSource->addObject(l.get());
133  }
134 }
JsonParam & getParameter(const char *paramName)
Returns a parameter (might be a null parameter if paramName not found in the configuration.
Definition: JsonConfig.cpp:377
double y
Definition: ossimDpt.h:165
unsigned int asUint() const
Definition: JsonConfig.cpp:264
virtual bool addObject(ossimAnnotationObject *anObject)
void set_ul(const ossimIpt &pt)
Definition: ossimIrect.h:589
ossimRefPtr< ossimAnnotationSource > m_annSource
void set_lr(const ossimIpt &pt)
Definition: ossimIrect.h:623
void set_ll(const ossimIpt &pt)
Definition: ossimIrect.h:640
double x
Definition: ossimDpt.h:164
static AtpConfig & instance()
Singleton implementation.
Definition: AtpConfig.cpp:20
void drawBox(const ossimIrect &rect, int r, int g, int b)
void set_ur(const ossimIpt &pt)
Definition: ossimIrect.h:606

◆ annotateTPIDs()

void ATP::AtpAnnotatedImage::annotateTPIDs ( AtpList atps,
int  r,
int  g,
int  b 
)

Definition at line 135 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ossimRefPtr< T >::get(), and m_annSource.

136 {
137  if (!m_annSource)
138  return;
139 
140  ossimDpt refPt, cmpPt, residual;
141  for (auto &atp : atps)
142  {
143  atp->getRefViewPoint(refPt);
145  new ossimAnnotationFontObject(refPt, atp->getTiePointId());
146  m_annSource->addObject(f.get());
147  }
148 }
virtual bool addObject(ossimAnnotationObject *anObject)
Class to draw fonts onto an image.
ossimRefPtr< ossimAnnotationSource > m_annSource

◆ drawBox()

void ATP::AtpAnnotatedImage::drawBox ( const ossimIrect rect,
int  r,
int  g,
int  b 
)
protected

Definition at line 298 of file AtpAnnotatedImage.cpp.

References ossimAnnotationSource::addObject(), ossimIrect::ll(), ossimIrect::lr(), m_annSource, ossimIrect::ul(), and ossimIrect::ur().

Referenced by annotateCorrelations(), annotateCorrelationSearchTile(), annotateFeatureSearchTiles(), and annotateResiduals().

299 {
300  ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(box.ul(), box.ur(), r, g, b);
301  ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(box.ur(), box.lr(), r, g, b);
302  ossimAnnotationLineObject* line3 = new ossimAnnotationLineObject(box.lr(), box.ll(), r, g, b);
303  ossimAnnotationLineObject* line4 = new ossimAnnotationLineObject(box.ll(), box.ul(), r, g, b);
304 
305  m_annSource->addObject(line1);
306  m_annSource->addObject(line2);
307  m_annSource->addObject(line3);
308  m_annSource->addObject(line4);
309 }
virtual bool addObject(ossimAnnotationObject *anObject)
ossimRefPtr< ossimAnnotationSource > m_annSource

◆ setAOI()

void ATP::AtpAnnotatedImage::setAOI ( const ossimDrect aoi)

Definition at line 95 of file AtpAnnotatedImage.cpp.

References m_annScaledAoi, m_annScaleInverse, and ossimDpt::x.

Referenced by AtpAnnotatedImage().

96 {
97  // Establish the AOI in scaled space:
99 }
double x
Definition: ossimDpt.h:164

◆ setImageName()

void ATP::AtpAnnotatedImage::setImageName ( const std::string &  name)
inline

Definition at line 36 of file AtpAnnotatedImage.h.

References m_annFilename.

36 { m_annFilename = name; }

◆ write()

bool ATP::AtpAnnotatedImage::write ( )

Definition at line 282 of file AtpAnnotatedImage.cpp.

References CINFO, ossimTiffWriter::close(), ossimConnectableObject::connectMyInputTo(), ossimImageFileWriter::execute(), ossimImageFileWriter::initialize(), m_annFilename, m_annScaledAoi, ossimImageFileWriter::setAreaOfInterest(), ossimImageFileWriter::setFilename(), and status.

283 {
285  writer->setFilename(m_annFilename);
286  writer->connectMyInputTo(this);
287  writer->setAreaOfInterest(m_annScaledAoi);
288  writer->initialize();
289  bool status = writer->execute();
290  writer->close();
291 
292  if (status)
293  CINFO<<"\nAtpAnnotatedImage::write() -- Wrote "<<m_annFilename<<endl;
294 
295  return status;
296 }
return status
#define CINFO

Member Data Documentation

◆ m_annFilename

ossimFilename ATP::AtpAnnotatedImage::m_annFilename
protected

Definition at line 56 of file AtpAnnotatedImage.h.

Referenced by setImageName(), and write().

◆ m_annScale

ossimDpt ATP::AtpAnnotatedImage::m_annScale
protected

Definition at line 53 of file AtpAnnotatedImage.h.

Referenced by AtpAnnotatedImage().

◆ m_annScaledAoi

ossimIrect ATP::AtpAnnotatedImage::m_annScaledAoi
protected

Definition at line 55 of file AtpAnnotatedImage.h.

Referenced by setAOI(), and write().

◆ m_annScaleInverse

ossimDpt ATP::AtpAnnotatedImage::m_annScaleInverse
protected

◆ m_annSource

ossimRefPtr<ossimAnnotationSource> ATP::AtpAnnotatedImage::m_annSource
protected

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