OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
This class supports multi-threading of image chain getTile() requests and associated chain updating. More...
#include <ossimImageChainMtAdaptor.h>
Public Member Functions | |
ossimImageChainMtAdaptor () | |
ossimImageChainMtAdaptor (ossimImageChain *original, ossim_uint32 num_threads=0, bool use_shared_handlers=false, bool use_cache=false, ossim_uint32 cache_tile_size=64) | |
Full constructor accepts the original image chain to clone. More... | |
~ossimImageChainMtAdaptor () | |
void | setNumberOfThreads (ossim_uint32 num_threads) |
Alternate way of specifying number of threads to support. More... | |
void | setUseSharedHandlers (bool use_shared_handlers) |
void | setCacheTileSize (ossim_uint32 cache_tile_size) |
void | setUseCache (bool use_cache) |
void | setOriginalChain (ossimImageChain *original) |
Alternate way of specifying the original chain being adapted for multi-threading. More... | |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIrect &tileRect, ossim_uint32 resLevel=0) |
Intercepts the getTile because it should never be called directly. More... | |
virtual void | initialize () |
Adapts call to original chain so that all clones are initialized. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=NULL) |
Adapts call to original chain so that clones are replicated after original's loadState. More... | |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=NULL) const |
Adapts call to original chain so that adapter-specific keywords can be added to KWL. More... | |
virtual void | processEvent (ossimEvent &event) |
Adapts the image chain event handler. More... | |
ossimImageSource * | getClone (ossim_uint32 index) |
Returns pointer to a specific clone image chain, or NULL if index exceeds the max available. More... | |
ossim_uint32 | getNumberOfClones () const |
Returns the number of clones available. The original chain always counts as the first clone. More... | |
virtual ossimConnectableObject::ConnectableObjectList & | imageChainList () |
These overriding access methods greatly facilitate the implementation of an image chain adapter class operating on the member original chain. More... | |
virtual const ossimConnectableObject::ConnectableObjectList & | imageChainList () const |
virtual ossim_int32 | connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true) |
Overrides base class implementation in order to make the connection to each clone. More... | |
![]() | |
ossimImageChain () | |
virtual | ~ossimImageChain () |
ossimConnectableObject::ConnectableObjectList & | getChainList () |
const ossimConnectableObject::ConnectableObjectList & | getChainList () const |
ossimConnectableObject * | operator[] (ossim_uint32 index) |
virtual ossimConnectableObject * | getConnectableObject (ossim_uint32 index) |
Same as operator[](ossim_uint32 i) More... | |
virtual ossim_int32 | indexOf (ossimConnectableObject *obj) const |
virtual ossimImageSource * | getFirstSource () |
Return the first source which is the one that first receives the getTile request. More... | |
virtual const ossimImageSource * | getFirstSource () const |
virtual ossimObject * | getFirstObject () |
virtual ossimImageSource * | getLastSource () |
Return the last source which is the one that last receives the getTile request. More... | |
virtual const ossimImageSource * | getLastSource () const |
virtual ossimObject * | getLastObject () |
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 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< ossimImageGeometry > | getImageGeometry () |
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 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 ossimConnectableObject * | removeChild (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 | accept (ossimVisitor &visitor) |
We will add a visitor interface for all connectable objects. More... | |
void | deleteList () |
![]() | |
ossimImageSource (ossimObject *owner=0) | |
ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimImageSource () |
virtual ossimRefPtr< ossimImageData > | getTile (const ossimIpt &origin, ossim_uint32 resLevel=0) |
virtual bool | getTile (ossimImageData *result, ossim_uint32 resLevel=0) |
Method to get a tile. More... | |
virtual ossimObject * | getObject () |
For RTTI support. More... | |
virtual const ossimObject * | getObject () const |
For RTTI support. More... | |
virtual void | 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< ossimProperty > | getProperty (const ossimString &name) const |
virtual void | setProperty (ossimRefPtr< ossimProperty > property) |
virtual void | getPropertyNames (std::vector< ossimString > &propertyNames) const |
virtual bool | isIndexedData () const |
![]() | |
ossimSource (ossimObject *owner=0) | |
ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimSource () |
virtual bool | isSourceEnabled () const |
virtual bool | getEnableFlag () const |
virtual void | setEnableFlag (bool flag) |
virtual bool | isInitialized () const |
virtual void | setInitializedFlag (bool flag) |
virtual std::ostream & | print (std::ostream &out) const |
Outputs theErrorStatus as an ossimErrorCode and an ossimString. More... | |
![]() | |
ossimConnectableObject (ossimObject *owner=0) | |
Base constructor of this object. More... | |
ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true) | |
virtual | ~ossimConnectableObject () |
void | setId (const ossimId &id) |
All connectable objects will have id's. More... | |
const ossimId & | getId () const |
Will allow us to get this object's id. More... | |
const ossimObject * | getOwner () const |
Fetches the current owner, most likely a container but not limited to one. More... | |
virtual void | changeOwner (ossimObject *owner) |
Permits changing the object's owner. More... | |
virtual void | setDescription (const ossimString &description) |
virtual ossimString | getDescription () const |
virtual bool | isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const |
will check the direction specified to see if all slots are full. More... | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className)) | |
virtual ossim_int32 | findInputIndex (const ossimConnectableObject *object) |
Return a valid index of the input list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | findInputIndex (const ossimId &id) |
Return a valid index of the input list if the passed id is found else return -1. More... | |
virtual ossim_int32 | findOutputIndex (const ossimConnectableObject *object) |
Return a valid index of the output list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | findOutputIndex (const ossimId &id) |
Return a valid index of the output list if the passed in object is found else return -1. More... | |
virtual ossim_int32 | getMyInputIndexToConnectTo (ossimConnectableObject *object) const |
Should return the first available index to connect to. More... | |
virtual ossim_int32 | getMyOutputIndexToConnectTo (ossimConnectableObject *object) const |
Should return the first available index to connect to. More... | |
virtual bool | canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const |
default implementation is to allow anyone to connect to us. More... | |
virtual void | disconnect (ossimConnectableObject *object=0) |
Will disconnect the object passed in. More... | |
virtual void | disconnect (const ossimId &id) |
Will disconnect the object passed in. More... | |
virtual ossimRefPtr< ossimConnectableObject > | disconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true) |
Will disconnect the object at the given input index and generate a connection event. More... | |
virtual void | disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true) |
Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More... | |
virtual void | disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true) |
virtual ossimRefPtr< ossimConnectableObject > | disconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true) |
Will disconnect the object at the given output index and generate a connection event. More... | |
virtual void | disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true) |
Will disconnect the output object. More... | |
virtual void | disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true) |
virtual void | disconnectAllInputs () |
Will disconnect all of the input objects. More... | |
virtual void | disconnectAllOutputs () |
Will disconnect all of the output objects. More... | |
virtual ossim_int32 | connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true) |
Will try to connect this objects input to the passed in object. More... | |
virtual ossim_int32 | connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true) |
Will connect the specified input to the passed in object. More... | |
virtual bool | connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true) |
virtual bool | connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true) |
virtual bool | connectInputList (ConnectableObjectList &inputList) |
Will disconnect itself from all inputs and reset to the passed in input list. More... | |
virtual bool | connectOutputList (ConnectableObjectList &outputList) |
Will disconnect itself from all outputs and reset to the passed in output list. More... | |
virtual ossim_uint32 | getNumberOfInputs () const |
Returns the number of input objects. More... | |
virtual ossim_uint32 | getNumberOfOutputs () const |
Return the number of output objects. More... | |
ossimConnectableObject * | getInput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getInput (ossim_uint32 index=0) const |
returns the object at the specified index. More... | |
ossimConnectableObject * | getOutput (ossim_uint32 index=0) |
returns the object at the specified index. More... | |
const ossimConnectableObject * | getOutput (ossim_uint32 index=0) const |
returns the object at the specified index. More... | |
virtual void | setNumberOfInputs (ossim_int32 numberOfInputs) |
Will set the number of inputs. More... | |
virtual bool | getInputListIsFixedFlag () const |
virtual bool | getOutputListIsFixedFlag () const |
virtual void | setNumberOfOutputs (ossim_int32 numberOfInputs) |
Will set the number of outputs. More... | |
const ConnectableObjectList & | getInputList () const |
const ConnectableObjectList & | getOutputList () const |
ConnectableObjectList & | getInputList () |
ConnectableObjectList & | getOutputList () |
OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true)) | |
OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true)) | |
virtual void | 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... | |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () const |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
![]() | |
ossimListenerManager () | |
virtual | ~ossimListenerManager () |
virtual void | fireEvent (ossimEvent &event) |
virtual bool | addListener (ossimListener *listener) |
virtual bool | removeListener (ossimListener *listener) |
virtual bool | findListener (ossimListener *listener) |
![]() | |
ossimPropertyInterface () | |
virtual | ~ossimPropertyInterface () |
virtual ossimString | getPropertyValueAsString (const ossimString &name) const |
void | getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const |
void | setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList) |
![]() | |
ossimErrorStatusInterface () | |
virtual | ~ossimErrorStatusInterface () |
virtual ossimErrorCode | getErrorStatus () const |
virtual ossimString | getErrorStatusString () const |
virtual void | setErrorStatus (ossimErrorCode error_status) const |
virtual void | setErrorStatus () const |
virtual void | clearErrorStatus () const |
bool | hasError () const |
![]() | |
ossimConnectableObjectListener () | |
virtual | ~ossimConnectableObjectListener () |
virtual void | connectionEvent (ossimConnectionEvent &) |
virtual void | propertyEvent (ossimPropertyEvent &) |
virtual void | addObjectEvent (ossimContainerEvent &) |
virtual void | removeObjectEvent (ossimContainerEvent &) |
virtual void | containerEvent (ossimContainerEvent &) |
virtual void | refreshEvent (ossimRefreshEvent &) |
![]() | |
ossimListener () | |
virtual | ~ossimListener () |
void | enableListener () |
void | disableListener () |
void | setListenerEnableFlag (bool flag) |
bool | isListenerEnabled () const |
bool | getListenerEnableFlag () const |
![]() | |
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 ossimConnectableObject * | findFirstObjectOfType (const RTTItypeid &typeInfo, bool recurse=true)=0 |
virtual ossimConnectableObject * | findFirstObjectOfType (const ossimString &className, bool recurse=true)=0 |
virtual ossimConnectableObject * | findObject (const ossimId &id, bool recurse=true)=0 |
virtual ossimConnectableObject * | findObject (const ossimConnectableObject *obj, bool recurse=true)=0 |
ossimObject * | getObject () |
const ossimObject * | getObject () const |
void | deleteAllChildren () |
virtual void | getChildren (std::vector< ossimConnectableObject *> &children, bool immediateChildrenOnlyFlag)=0 |
Protected Types | |
typedef std::vector< ossimRefPtr< ossimImageHandlerMtAdaptor > > | SharedHandlerList |
List of handlers that are being shared among all clones (if requested). More... | |
Protected Member Functions | |
void | deleteReplicas () |
Deletes instances of all replicas from the clone list and leaves only the original. More... | |
bool | replicate () |
Creates clones of original and pushes them onto the clone list. Returns TRUE if successful. More... | |
bool | connectSharedHandlers (ossim_uint32 index) |
Manages reconnecting shared image handlers to a cloned image chain (identified by index) after its creation. More... | |
![]() | |
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) |
![]() | |
ossimImageSource (const ossimImageSource &rhs) | |
const ossimImageSource & | operator= (const ossimImageSource &) |
![]() | |
ossimSource (const ossimSource &rhs) | |
const ossimSource & | operator= (const ossimSource &rhs) |
![]() | |
ossimConnectableObject * | findObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor) |
![]() | |
virtual | ~ossimReferenced () |
![]() | |
ossimListenerManager (const ossimListenerManager &rhs) | |
Friends | |
class | ossimMultiThreadSequencer |
Additional Inherited Members | |
![]() | |
enum | ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 } |
typedef std::vector< ossimRefPtr< ossimConnectableObject > > | ConnectableObjectList |
This class supports multi-threading of image chain getTile() requests and associated chain updating.
It accepts an original ossimImageChain object which is then cloned (replicated). One clone per thread is created, counting the original as clone(0), with all clones sharing a common input handler (if directed) so that disk access is serialized and thread-safe.
Definition at line 25 of file ossimImageChainMtAdaptor.h.
|
protected |
List of handlers that are being shared among all clones (if requested).
It is a list since the original chain may involve a combiner with multiple image inputs.
Definition at line 116 of file ossimImageChainMtAdaptor.h.
ossimImageChainMtAdaptor::ossimImageChainMtAdaptor | ( | ) |
Definition at line 30 of file ossimImageChainMtAdaptor.cpp.
References ossimMtDebug::chainDebugEnabled, d_debugEnabled, and ossimMtDebug::instance().
ossimImageChainMtAdaptor::ossimImageChainMtAdaptor | ( | ossimImageChain * | original, |
ossim_uint32 | num_threads = 0 , |
||
bool | use_shared_handlers = false , |
||
bool | use_cache = false , |
||
ossim_uint32 | cache_tile_size = 64 |
||
) |
Full constructor accepts the original image chain to clone.
num_threads | Total number of cloned chains to make available. |
Definition at line 47 of file ossimImageChainMtAdaptor.cpp.
References ossimMtDebug::chainDebugEnabled, d_debugEnabled, ossimMtDebug::instance(), setCacheTileSize(), setNumberOfThreads(), setOriginalChain(), setUseCache(), and setUseSharedHandlers().
ossimImageChainMtAdaptor::~ossimImageChainMtAdaptor | ( | ) |
Definition at line 71 of file ossimImageChainMtAdaptor.cpp.
References d_useSharedHandlers, m_chainContainers, m_clones, m_sharedHandlers, and ossimListenerManager::removeListener().
|
virtual |
Overrides base class implementation in order to make the connection to each clone.
This connection is typically to the multi-thread sequencer object.
Reimplemented from ossimConnectableObject.
Definition at line 473 of file ossimImageChainMtAdaptor.cpp.
References ossimConnectableObject::connectMyOutputTo(), and m_clones.
|
protected |
Manages reconnecting shared image handlers to a cloned image chain (identified by index) after its creation.
This is in support of shared image handlers. Returns TRUE if successful.
Definition at line 388 of file ossimImageChainMtAdaptor.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimId::getId(), ossimIdVisitor::getObject(), m_chainContainers, and m_sharedHandlers.
Referenced by replicate().
|
protected |
Deletes instances of all replicas from the clone list and leaves only the original.
Definition at line 230 of file ossimImageChainMtAdaptor.cpp.
References m_clones, and m_numThreads.
Referenced by loadState().
ossimImageSource * ossimImageChainMtAdaptor::getClone | ( | ossim_uint32 | index | ) |
Returns pointer to a specific clone image chain, or NULL if index exceeds the max available.
The clone at index=0 corresponds to the original, though this detail should be ignored.
Definition at line 461 of file ossimImageChainMtAdaptor.cpp.
References m_clones.
Referenced by ossimMultiThreadSequencer::ossimGetTileJob::run().
|
inline |
Returns the number of clones available. The original chain always counts as the first clone.
Definition at line 73 of file ossimImageChainMtAdaptor.h.
|
virtual |
Intercepts the getTile because it should never be called directly.
The tile request must go to the specific chain clone.
Reimplemented from ossimImageChain.
Definition at line 371 of file ossimImageChainMtAdaptor.cpp.
References ossimImageChain::getTile(), m_adaptedChain, ossimNotify(), ossimNotifyLevel_WARN, and ossimRefPtr< T >::valid().
|
virtual |
These overriding access methods greatly facilitate the implementation of an image chain adapter class operating on the member original chain.
These methods really should be "protected" but the compiler complains if the base class declarations are "protected".
Reimplemented from ossimImageChain.
Definition at line 428 of file ossimImageChainMtAdaptor.cpp.
References ossimImageChain::imageChainList(), m_adaptedChain, ossimImageChain::theImageChainList, and ossimRefPtr< T >::valid().
|
virtual |
Reimplemented from ossimImageChain.
Definition at line 441 of file ossimImageChainMtAdaptor.cpp.
References ossimImageChain::imageChainList(), m_adaptedChain, ossimImageChain::theImageChainList, and ossimRefPtr< T >::valid().
|
virtual |
Adapts call to original chain so that all clones are initialized.
Reimplemented from ossimImageChain.
Definition at line 361 of file ossimImageChainMtAdaptor.cpp.
References m_clones.
|
virtual |
Adapts call to original chain so that clones are replicated after original's loadState.
Reimplemented from ossimImageChain.
Definition at line 264 of file ossimImageChainMtAdaptor.cpp.
References deleteReplicas(), and ossimKeywordlist::find().
Referenced by replicate().
|
virtual |
Adapts the image chain event handler.
If the event involves a change to the original image chain, then the clones will need to be regenerated here.
Reimplemented from ossimImageChain.
Definition at line 454 of file ossimImageChainMtAdaptor.cpp.
References ossimNotify(), and ossimNotifyLevel_WARN.
|
protected |
Creates clones of original and pushes them onto the clone list. Returns TRUE if successful.
Definition at line 162 of file ossimImageChainMtAdaptor.cpp.
References ossimConnectableObject::changeOwner(), connectSharedHandlers(), d_cacheTileSize, d_useCache, d_useSharedHandlers, ossimRefPtr< T >::get(), ossimCollectionVisitor::getObjectAs(), loadState(), m_chainContainers, m_clones, m_numThreads, m_sharedHandlers, and saveState().
Referenced by setNumberOfThreads(), and setOriginalChain().
|
virtual |
Adapts call to original chain so that adapter-specific keywords can be added to KWL.
Reimplemented from ossimImageChain.
Definition at line 244 of file ossimImageChainMtAdaptor.cpp.
References ossimKeywordlist::add(), and m_chainContainers.
Referenced by replicate().
void ossimImageChainMtAdaptor::setCacheTileSize | ( | ossim_uint32 | cache_tile_size | ) |
Definition at line 118 of file ossimImageChainMtAdaptor.cpp.
References d_cacheTileSize.
Referenced by ossimImageChainMtAdaptor(), ossimMultiThreadSequencer::setCacheTileSize(), and ossimMultiThreadSequencer::setToStartOfSequence().
void ossimImageChainMtAdaptor::setNumberOfThreads | ( | ossim_uint32 | num_threads | ) |
Alternate way of specifying number of threads to support.
This is the same as the number of clones that will be available after replicating the original chain.
num_threads | Total number of cloned chains to make available. |
This is the same as the number of clones that will be available after replicating the original chain.
Definition at line 90 of file ossimImageChainMtAdaptor.cpp.
References ossimString::empty(), ossimPreferences::findPreference(), ossimPreferences::instance(), m_chainContainers, m_numThreads, replicate(), and ossimString::toUInt32().
Referenced by ossimImageChainMtAdaptor(), ossimMultiThreadSequencer::setNumberOfThreads(), and ossimMultiThreadSequencer::setToStartOfSequence().
void ossimImageChainMtAdaptor::setOriginalChain | ( | ossimImageChain * | original | ) |
Alternate way of specifying the original chain being adapted for multi-threading.
original | Image chain to be adapted. |
Definition at line 131 of file ossimImageChainMtAdaptor.cpp.
References ossimConnectableObject::fillContainer(), ossimImageChain::getFirstSource(), m_adaptedChain, m_chainContainers, m_clones, m_numThreads, and replicate().
Referenced by ossimImageChainMtAdaptor().
void ossimImageChainMtAdaptor::setUseCache | ( | bool | use_cache | ) |
Definition at line 123 of file ossimImageChainMtAdaptor.cpp.
References d_useCache.
Referenced by ossimImageChainMtAdaptor(), ossimMultiThreadSequencer::setToStartOfSequence(), and ossimMultiThreadSequencer::setUseCache().
void ossimImageChainMtAdaptor::setUseSharedHandlers | ( | bool | use_shared_handlers | ) |
Definition at line 113 of file ossimImageChainMtAdaptor.cpp.
References d_useSharedHandlers.
Referenced by ossimImageChainMtAdaptor(), ossimMultiThreadSequencer::setToStartOfSequence(), and ossimMultiThreadSequencer::setUseSharedHandlers().
|
friend |
Definition at line 27 of file ossimImageChainMtAdaptor.h.
|
protected |
Definition at line 122 of file ossimImageChainMtAdaptor.h.
Referenced by replicate(), and setCacheTileSize().
|
protected |
Definition at line 124 of file ossimImageChainMtAdaptor.h.
Referenced by ossimImageChainMtAdaptor().
|
protected |
Definition at line 123 of file ossimImageChainMtAdaptor.h.
Referenced by replicate(), and setUseCache().
|
protected |
Definition at line 121 of file ossimImageChainMtAdaptor.h.
Referenced by replicate(), setUseSharedHandlers(), and ~ossimImageChainMtAdaptor().
|
protected |
This is the adaptee image chain.
Definition at line 99 of file ossimImageChainMtAdaptor.h.
Referenced by getTile(), imageChainList(), and setOriginalChain().
|
protected |
The container objects must be kept alive in this vector while their child chains in m_clones are used.
Containers are used because they are the only way of "duping" a complete chain with all connections properly done. The containers need to persist in order for the chain connections to be maintained (apparent bug in connectable object code). I found it impossible to dissociate the chain from its container. As soon as the container disappeared, the chain's internal connections would be disrupted. (OLK 11/11)
Definition at line 112 of file ossimImageChainMtAdaptor.h.
Referenced by connectSharedHandlers(), replicate(), saveState(), setNumberOfThreads(), setOriginalChain(), and ~ossimImageChainMtAdaptor().
|
protected |
List of replicated child chains' first source (the one receiving the getTile call).
The first in the list is always the original (adaptee) source. These are owned by the m_chainContainers that are maintained here.
Definition at line 104 of file ossimImageChainMtAdaptor.h.
Referenced by connectMyOutputTo(), deleteReplicas(), getClone(), initialize(), replicate(), setOriginalChain(), and ~ossimImageChainMtAdaptor().
|
protected |
Definition at line 119 of file ossimImageChainMtAdaptor.h.
Referenced by deleteReplicas(), replicate(), setNumberOfThreads(), and setOriginalChain().
|
protected |
Definition at line 117 of file ossimImageChainMtAdaptor.h.
Referenced by connectSharedHandlers(), ossimMultiThreadSequencer::handlerGetTileT(), replicate(), and ~ossimImageChainMtAdaptor().