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

#include <ossimImageSourceSequencer.h>

Inheritance diagram for ossimImageSourceSequencer:
ossimImageSource ossimConnectableObjectListener ossimSource ossimListener ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced ossimImageMpiMWriterSequenceConnection ossimImageMpiSWriterSequenceConnection ossimMultiThreadSequencer

Public Member Functions

 ossimImageSourceSequencer (ossimImageSource *inputSource=NULL, ossimObject *owner=NULL)
 
virtual ~ossimImageSourceSequencer ()
 
ossim_int64 getNumberOfTiles () const
 
ossim_int64 getNumberOfTilesHorizontal () const
 
ossim_int64 getNumberOfTilesVertical () const
 
virtual void initialize ()
 
virtual void setAreaOfInterest (const ossimIrect &areaOfInterest)
 
const ossimIrectgetAreaOfInterest () const
 
virtual void setToStartOfSequence ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 resLevel=0)
 
virtual bool getNextTileStream (std::ostream &bos)
 
virtual bool getTileOrigin (ossim_int64 id, ossimIpt &origin) const
 
bool getTileRect (ossim_int64 tile_id, ossimIrect &rect) const
 Establishes a tile rect given tile ID. More...
 
virtual ossimRefPtr< ossimImageDatagetTile (ossim_int64 id, ossim_uint32 resLevel=0)
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 This will return the bounding rect of the source. 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 ossim_uint32 getNumberOfInputBands () const
 
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 void slaveProcessTiles ()
 
virtual bool isMaster () const
 
virtual ossimIpt getTileSize () const
 
virtual void setTileSize (const ossimIpt &tileSize)
 
virtual void setTileSize (ossim_int32 width, ossim_int32 height)
 
virtual void connectInputEvent (ossimConnectionEvent &event)
 
virtual void disconnectInputEvent (ossimConnectionEvent &event)
 
virtual bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes 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...
 
void setCreateHistogram (bool create_histogram)
 
bool loadState (const ossimKeywordlist &kwl, const char *prefix)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
void getBinInformation (ossim_uint32 &numberOfBins, ossim_float64 &minValue, ossim_float64 &maxValue, ossimScalarType stype) 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 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 bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
virtual void getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if not defined. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual void saveImageGeometry () const
 Default method to call input's saveImageGeometry. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Default method to call input's saveImageGeometry. More...
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool isIndexedData () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimConnectableObjectListener
 ossimConnectableObjectListener ()
 
virtual ~ossimConnectableObjectListener ()
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &)
 
virtual void connectionEvent (ossimConnectionEvent &)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &)
 
virtual void connectOutputEvent (ossimConnectionEvent &)
 
virtual void 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
 

Protected Member Functions

virtual void updateTileDimensions ()
 
- 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

ossimImageSourcetheInputConnection
 
ossimRefPtr< ossimImageDatatheBlankTile
 
ossimRefPtr< ossimMultiResLevelHistogramtheHistogram
 
ossimIrect theAreaOfInterest
 
ossimIpt theTileSize
 
ossim_int64 theNumberOfTilesHorizontal
 
ossim_int64 theNumberOfTilesVertical
 
ossim_int64 theCurrentTileNumber
 
bool theCreateHistogram
 
- 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 22 of file ossimImageSourceSequencer.h.

Constructor & Destructor Documentation

◆ ossimImageSourceSequencer()

ossimImageSourceSequencer::ossimImageSourceSequencer ( ossimImageSource inputSource = NULL,
ossimObject owner = NULL 
)

Definition at line 30 of file ossimImageSourceSequencer.cpp.

References ossimListenerManager::addListener(), ossimConnectableObject::connectMyInputTo(), ossim::defaultTileSize(), initialize(), ossimIrect::makeNan(), theAreaOfInterest, theInputConnection, and theTileSize.

32 :ossimImageSource(owner,
33  1,
34  1,
35  true,
36  false),
37  theBlankTile(NULL),
38  theAreaOfInterest(0,0,0,0),
43  theCreateHistogram(false)
44 {
47  theInputConnection = inputSource;
48  if(inputSource)
49  {
50  connectMyInputTo(0, inputSource);
51  initialize(); // Derived class depends on this initialization to happen now. DO NOT MOVE.
52  }
54 }
virtual bool addListener(ossimListener *listener)
OSSIM_DLL void defaultTileSize(ossimIpt &tileSize)
#define OSSIM_DEFAULT_TILE_WIDTH
ossimImageSource(ossimObject *owner=0)
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
void makeNan()
Definition: ossimIrect.h:329
#define OSSIM_DEFAULT_TILE_HEIGHT
ossimRefPtr< ossimImageData > theBlankTile

◆ ~ossimImageSourceSequencer()

ossimImageSourceSequencer::~ossimImageSourceSequencer ( )
virtual

Member Function Documentation

◆ canConnectMyInputTo()

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

required to be overriden by derived classes

Implements ossimConnectableObject.

Definition at line 165 of file ossimImageSourceSequencer.cpp.

References PTR_CAST.

167 {
168  return (object&& PTR_CAST(ossimImageSource, object));
169 }
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ connectInputEvent()

void ossimImageSourceSequencer::connectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Definition at line 171 of file ossimImageSourceSequencer.cpp.

References initialize().

172 {
173  initialize();
174 }

◆ disconnectInputEvent()

void ossimImageSourceSequencer::disconnectInputEvent ( ossimConnectionEvent event)
virtual

Reimplemented from ossimConnectableObjectListener.

Definition at line 176 of file ossimImageSourceSequencer.cpp.

References ossimConnectableObject::getInput(), PTR_CAST, and theInputConnection.

177 {
179 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321

◆ getAreaOfInterest()

const ossimIrect & ossimImageSourceSequencer::getAreaOfInterest ( ) const

Just returns the current area of interest.

Definition at line 238 of file ossimImageSourceSequencer.cpp.

References theAreaOfInterest.

Referenced by ossimArcInfoGridWriter::writeFile().

239 {
240  return theAreaOfInterest;
241 }

◆ getBinInformation()

void ossimImageSourceSequencer::getBinInformation ( ossim_uint32 numberOfBins,
ossim_float64 minValue,
ossim_float64 maxValue,
ossimScalarType  stype 
) const

Definition at line 503 of file ossimImageSourceSequencer.cpp.

References OSSIM_DEFAULT_MAX_PIX_SINT16, OSSIM_DEFAULT_MAX_PIX_UCHAR, OSSIM_DEFAULT_MAX_PIX_UINT11, OSSIM_DEFAULT_MAX_PIX_UINT12, OSSIM_DEFAULT_MAX_PIX_UINT13, OSSIM_DEFAULT_MAX_PIX_UINT14, OSSIM_DEFAULT_MAX_PIX_UINT15, OSSIM_DEFAULT_MAX_PIX_UINT16, OSSIM_DEFAULT_MIN_PIX_SINT16, OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_NORMALIZED_DOUBLE, OSSIM_NORMALIZED_FLOAT, OSSIM_SINT16, OSSIM_SINT32, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT8, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, and OSSIM_USHORT15.

Referenced by getTile().

507 {
508  numberOfBins = 0;
509  minValue = 0;
510  maxValue = 0;
511 
512  switch(stype)
513  {
514  case OSSIM_UINT8:
515  {
516  minValue = 0;
517  maxValue = OSSIM_DEFAULT_MAX_PIX_UCHAR;
518  numberOfBins = 256;
519 
520  break;
521  }
522  case OSSIM_USHORT11:
523  {
524  minValue = 0;
525  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT11;
526  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT11 + 1;
527 
528  break;
529  }
530  case OSSIM_USHORT12:
531  {
532  minValue = 0;
533  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT12;
534  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT12 + 1;
535 
536  break;
537  }
538  case OSSIM_USHORT13:
539  {
540  minValue = 0;
541  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT13;
542  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT13 + 1;
543 
544  break;
545  }
546  case OSSIM_USHORT14:
547  {
548  minValue = 0;
549  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT14;
550  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT14 + 1;
551 
552  break;
553  }
554  case OSSIM_USHORT15:
555  {
556  minValue = 0;
557  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT15;
558  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT15 + 1;
559 
560  break;
561  }
562  case OSSIM_UINT16:
563  case OSSIM_UINT32:
564  {
565  minValue = 0;
566  maxValue = OSSIM_DEFAULT_MAX_PIX_UINT16;
567  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16 + 1;
568 
569  break;
570  }
571  case OSSIM_SINT16:
572  case OSSIM_SINT32:
573  case OSSIM_FLOAT32:
574  case OSSIM_FLOAT64:
575  {
576  minValue = OSSIM_DEFAULT_MIN_PIX_SINT16;
577  maxValue = OSSIM_DEFAULT_MAX_PIX_SINT16;
579 
580  break;
581  }
584  {
585  minValue = 0;
586  maxValue = 1.0;
587  numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16+1;
588  break;
589  }
590  default:
591  {
592  if(traceDebug())
593  {
595  << "Unsupported scalar type in ossimImageHistogramSource::computeHistogram()" << endl;
596  }
597  return;
598  }
599  }
600 
601 }
16 bit unsigned integer (15 bits used)
#define OSSIM_DEFAULT_MAX_PIX_UINT16
64 bit floating point
16 bit unsigned integer
#define OSSIM_DEFAULT_MAX_PIX_UCHAR
16 bit signed integer
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
32 bit floating point
32 bit unsigned integer
#define OSSIM_DEFAULT_MAX_PIX_UINT12
#define OSSIM_DEFAULT_MIN_PIX_SINT16
32 bit signed integer
#define OSSIM_DEFAULT_MAX_PIX_UINT15
32 bit normalized floating point
#define OSSIM_DEFAULT_MAX_PIX_UINT13
#define OSSIM_DEFAULT_MAX_PIX_SINT16
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
#define OSSIM_DEFAULT_MAX_PIX_UINT14
#define OSSIM_DEFAULT_MAX_PIX_UINT11
8 bit unsigned integer
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
16 bit unsigned integer (12 bits used)

◆ getBoundingRect()

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

This will return the bounding rect of the source.

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

Reimplemented from ossimImageSource.

Definition at line 181 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getBoundingRect(), ossimIrect::hasNans(), ossimDrect::makeNan(), theAreaOfInterest, and theInputConnection.

Referenced by ossimGdalWriter::buildGdalOverviews(), ossimImageFileWriter::initialize(), ossimTiffWriter::openTiff(), ossimImageFileWriter::setAreaOfInterest(), ossimArcInfoGridWriter::writeBinaryAigBounds(), ossimNitf20Writer::writeBlockBandSeparate(), ossimNitfWriter::writeBlockBandSeparate(), ossimNitf20Writer::writeBlockBandSequential(), ossimNitfWriter::writeBlockBandSequential(), ossimNitfWriterBase::writeGeometry(), ossimKakaduJp2Writer::writeGeotiffBox(), and ossimKakaduJp2Writer::writeGmlBox().

182 {
183  ossimDrect temp;
184  temp.makeNan();
185 
186  if(!theInputConnection) return temp;
187 
189  {
190  return theInputConnection->getBoundingRect(resLevel);
191  }
192 
193  return theAreaOfInterest;
194 }
void makeNan()
Definition: ossimDrect.h:388
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
bool hasNans() const
Definition: ossimIrect.h:337

◆ getDecimationFactor()

void ossimImageSourceSequencer::getDecimationFactor ( ossim_uint32  resLevel,
ossimDpt result 
) const
virtual

Will return the decimation factor for the given resolution level.

the decimation is the scale from Resolution 0 or full res. Usually this is a power of 2 decimation where the decimation result is 1.0/2^resoltion.

Reimplemented from ossimImageSource.

Definition at line 196 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getDecimationFactor(), ossimDpt::makeNan(), and theInputConnection.

198 {
200  {
201  theInputConnection->getDecimationFactor(resLevel, result);
202  }
203  result.makeNan();
204 }
virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt &result) const
Will return the decimation factor for the given resolution level.
void makeNan()
Definition: ossimDpt.h:65

◆ getDecimationFactors()

void ossimImageSourceSequencer::getDecimationFactors ( vector< ossimDpt > &  decimations) const
virtual

Definition at line 206 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getDecimationFactors(), and theInputConnection.

207 {
209  {
211  }
212 }
virtual void getDecimationFactors(std::vector< ossimDpt > &decimations) const
Will return an array of all decimations for each resolution level.

◆ getMaxPixelValue()

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

Returns the max pixel of the band.

Reimplemented from ossimImageSource.

Definition at line 464 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getMaxPixelValue(), and theInputConnection.

Referenced by ossimArcInfoGridWriter::writeBinaryAigStats(), ossimPngWriter::writeSignificantBits(), and ossimTiffWriter::writeTiffTags().

465 {
466  if (theInputConnection)
467  {
468  return theInputConnection->getMaxPixelValue(band);
469  }
470 
472 }
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.

◆ getMinPixelValue()

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

Returns the min pixel of the band.

Reimplemented from ossimImageSource.

Definition at line 454 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getMinPixelValue(), and theInputConnection.

Referenced by ossimArcInfoGridWriter::writeBinaryAigStats(), and ossimTiffWriter::writeTiffTags().

455 {
456  if (theInputConnection)
457  {
458  return theInputConnection->getMinPixelValue(band);
459  }
460 
462 }
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.

◆ getNextTile()

ossimRefPtr< ossimImageData > ossimImageSourceSequencer::getNextTile ( ossim_uint32  resLevel = 0)
virtual

Will allow you to get the next tile in the sequence. Note the last tile returned will be an invalid ossimRefPtr<ossimImageData>. Callers should be able to do:

ossimRefPtr<ossimImageData> id = sequencer->getNextTile(); while (id.valid()) { doSomething; id = sequencer->getNextTile(); }

Reimplemented in ossimImageMpiMWriterSequenceConnection, ossimMultiThreadSequencer, and ossimImageMpiSWriterSequenceConnection.

Definition at line 318 of file ossimImageSourceSequencer.cpp.

References ossimImageData::getBuf(), ossimImageSource::getTile(), getTileRect(), ossimImageData::setImageRectangle(), theBlankTile, theCurrentTileNumber, theInputConnection, and ossimRefPtr< T >::valid().

Referenced by ossimImageHistogramSource::computeNormalModeHistogram(), ossimImageStatisticsSource::computeStatisticsTemplate(), ossimPotraceTool::convertToBitmap(), ossimImageMpiMWriterSequenceConnection::getNextTile(), getTile(), while(), ossimNitf20Writer::writeBlockBandSeparate(), ossimNitfWriter::writeBlockBandSeparate(), ossimNitf20Writer::writeBlockBandSequential(), ossimNitfWriter::writeBlockBandSequential(), and ossimArcInfoGridWriter::writeFile().

319 {
320  ossimRefPtr<ossimImageData> result = 0;
321  if ( theInputConnection )
322  {
323  ossimIrect tileRect;
324  if ( getTileRect( theCurrentTileNumber, tileRect ) )
325  {
327  result = theInputConnection->getTile(tileRect, resLevel);
328  if( !result.valid() || !result->getBuf() )
329  {
330  theBlankTile->setImageRectangle(tileRect);
331  result = theBlankTile;
332  }
333  }
334  }
335  return result;
336 }
virtual void setImageRectangle(const ossimIrect &rect)
bool valid() const
Definition: ossimRefPtr.h:75
bool getTileRect(ossim_int64 tile_id, ossimIrect &rect) const
Establishes a tile rect given tile ID.
virtual const void * getBuf() const
ossimRefPtr< ossimImageData > theBlankTile
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getNextTileStream()

bool ossimImageSourceSequencer::getNextTileStream ( std::ostream &  bos)
virtual

Definition at line 338 of file ossimImageSourceSequencer.cpp.

339 {
340  return false;
341 }

◆ getNullPixelValue()

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

Each band has a null pixel associated with it.

The null pixel represents an invalid value.

Reimplemented from ossimImageSource.

Definition at line 444 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getNullPixelValue(), and theInputConnection.

445 {
446  if (theInputConnection)
447  {
449  }
450 
452 }
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.

◆ getNumberOfDecimationLevels()

ossim_uint32 ossimImageSourceSequencer::getNumberOfDecimationLevels ( ) const
virtual

Will return the number of resolution levels.

Note: resolution level 0 is included in the return count.

Reimplemented from ossimImageSource.

Definition at line 214 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getNumberOfDecimationLevels(), and theInputConnection.

215 {
216  ossim_uint32 result = 0;
218  {
220  }
221  return result;
222 }
virtual ossim_uint32 getNumberOfDecimationLevels() const
Will return the number of resolution levels.
unsigned int ossim_uint32

◆ getNumberOfInputBands()

ossim_uint32 ossimImageSourceSequencer::getNumberOfInputBands ( ) const
virtual

Returns the number of bands available from the input.

Implements ossimImageSource.

Definition at line 474 of file ossimImageSourceSequencer.cpp.

References ossimImageSource::getNumberOfOutputBands(), and theInputConnection.

475 {
477  {
479  }
480 
481  return 0;
482 }
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.

◆ getNumberOfTiles()

ossim_int64 ossimImageSourceSequencer::getNumberOfTiles ( ) const

◆ getNumberOfTilesHorizontal()

ossim_int64 ossimImageSourceSequencer::getNumberOfTilesHorizontal ( ) const

◆ getNumberOfTilesVertical()

ossim_int64 ossimImageSourceSequencer::getNumberOfTilesVertical ( ) const

◆ getOutputScalarType()

ossimScalarType ossimImageSourceSequencer::getOutputScalarType ( ) const
virtual

◆ getTile() [1/2]

ossimRefPtr< ossimImageData > ossimImageSourceSequencer::getTile ( const ossimIrect rect,
ossim_uint32  resLevel = 0 
)
virtual
Returns
the requested region of interest

Reimplemented from ossimImageSource.

Definition at line 248 of file ossimImageSourceSequencer.cpp.

References ossimMultiBandHistogram::create(), ossimImageDataFactory::create(), ossimMultiResLevelHistogram::create(), ossimRefPtr< T >::get(), getBinInformation(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimMultiResLevelHistogram::getMultiBandHistogram(), getNextTile(), ossimImageData::getNumberOfBands(), getNumberOfTiles(), ossimRectilinearDataObject::getScalarType(), ossimImageData::initialize(), ossimImageDataFactory::instance(), ossimImageData::loadTile(), ossimImageData::makeBlank(), OSSIM_EMPTY, ossimImageData::populateHistogram(), ossimImageData::setImageRectangle(), setToStartOfSequence(), theCreateHistogram, and theInputConnection.

250 {
252  {
253  /*
254  ossimRefPtr<ossimImageData> tile =
255  theInputConnection->getTile(rect, resLevel);
256  if (tile.valid()&&tile->getBuf())
257  {
258  return tile;
259  }
260  else
261  {
262  // We should return a valid tile for the writers.
263  theBlankTile->setImageRectangle(rect);
264  return theBlankTile;
265  }
266  */
267  // For Use with multithreaded sequencer
269  tile->setImageRectangle(rect);
270  tile->initialize();
271  tile->makeBlank();
273  ossim_uint32 num_tiles = getNumberOfTiles();
274  // bool hasHistoOutput = true;
275  ossim_uint32 numberOfBands = 1;
276  ossim_uint32 numberOfBins = 0;
277  ossim_float64 minValue = 0;
278  ossim_float64 maxValue = 0;
279  ossimScalarType stype;
281 
282  if (theCreateHistogram)
283  {
284  stype = tile->getScalarType();
285  histogram = new ossimMultiResLevelHistogram;
286  histogram->create(1);
287  numberOfBands = tile->getNumberOfBands();
288 
289  getBinInformation(numberOfBins, minValue, maxValue, stype);
290  histogram->getMultiBandHistogram(0)->create(numberOfBands, numberOfBins, minValue, maxValue);
291 
292  }
293  for (ossim_uint32 tile_idx=0; tile_idx<num_tiles; ++tile_idx)
294  {
296  //tile->setDataObjectStatus(imagedata->getDataObjectStatus());
297  if(imagedata->getBuf() && (imagedata->getDataObjectStatus()!=OSSIM_EMPTY))
298  {
299  tile->loadTile(imagedata.get());
300  if (theCreateHistogram)
301  {
302  imagedata->populateHistogram(histogram->getMultiBandHistogram(0));
303  }
304  }
305  if (traceDebug())
306  {
307  ossimNotify(ossimNotifyLevel_WARN)<< "BASE SEQUENCER TILE " << tile_idx << " RECT: " << rect << std::endl;;
308  }
309  }
310  tile->validate();
311  if (theCreateHistogram) tile->setHistogram(histogram);
312  return tile;
313  }
314 
315  return 0;
316 }
virtual ossim_uint32 getNumberOfBands() const
virtual void setImageRectangle(const ossimIrect &rect)
virtual void populateHistogram(ossimRefPtr< ossimMultiBandHistogram > histo)
void getBinInformation(ossim_uint32 &numberOfBins, ossim_float64 &minValue, ossim_float64 &maxValue, ossimScalarType stype) const
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 resLevel=0)
virtual ossimDataObjectStatus getDataObjectStatus() const
void create(ossim_uint32 numberOfResLevels)
virtual void initialize()
Initialize the data buffer.
double ossim_float64
virtual void loadTile(const void *src, const ossimIrect &src_rect, ossimInterleaveType il_type)
static ossimImageDataFactory * instance()
virtual ossimDataObjectStatus validate() const
unsigned int ossim_uint32
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossimScalarType
virtual ossimScalarType getScalarType() const
virtual void makeBlank()
Initializes data to null pixel values.
virtual const void * getBuf() const
ossimRefPtr< ossimMultiBandHistogram > getMultiBandHistogram(ossim_uint32 resLevel) const
void create(const ossimImageSource *input)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual void setHistogram(ossimRefPtr< ossimMultiResLevelHistogram > histo)

◆ getTile() [2/2]

ossimRefPtr< ossimImageData > ossimImageSourceSequencer::getTile ( ossim_int64  id,
ossim_uint32  resLevel = 0 
)
virtual

Definition at line 343 of file ossimImageSourceSequencer.cpp.

345 {
346  static const char* MODULE= "ossimImageSourceSequencer::getTile(id, resLevel)";
347  if(traceDebug())
348  {
349  CLOG << "entering.."<<endl;
350  }
351 
352  ossimRefPtr<ossimImageData> result = 0;
353 
355  {
356  // if we have no tiles try to initialize.
357  if(getNumberOfTiles() == 0)
358  {
359  initialize();
360  }
361 
362  ossimIrect tileRect;
363  if ( getTileRect( id, tileRect ) )
364  {
365  result = theInputConnection->getTile(tileRect, resLevel);
366  if( !result.valid() || !result->getBuf() )
367  {
368  theBlankTile->setImageRectangle(tileRect);
369  result = theBlankTile;
370  }
371  }
372  else // getTileRect failed...
373  {
374  if(traceDebug())
375  {
376  CLOG << "was not able to get an origin for id = " << id << endl;
377  }
378  }
379  }
380  else // no connection...
381  {
382  if(traceDebug())
383  {
384  CLOG << "No input connection so returing NULL" << endl;
385  }
386  }
387  if(traceDebug())
388  {
389  CLOG << "leaving.."<<endl;
390  }
391 
392  return result;
393 }
#define CLOG
Definition: ossimTrace.h:23
virtual void setImageRectangle(const ossimIrect &rect)
bool valid() const
Definition: ossimRefPtr.h:75
bool getTileRect(ossim_int64 tile_id, ossimIrect &rect) const
Establishes a tile rect given tile ID.
virtual const void * getBuf() const
ossimRefPtr< ossimImageData > theBlankTile
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)

◆ getTileHeight()

ossim_uint32 ossimImageSourceSequencer::getTileHeight ( ) const
virtual

Returns the default processing tile height.

Reimplemented from ossimImageSource.

Definition at line 489 of file ossimImageSourceSequencer.cpp.

References theTileSize, and ossimIpt::y.

Referenced by ossimArcInfoGridWriter::writeBinaryAigHeader(), ossimArcInfoGridWriter::writeFile(), and ossimWriter::writeStream().

490 {
491  return theTileSize.y;
492 }
ossim_int32 y
Definition: ossimIpt.h:142

◆ getTileOrigin()

bool ossimImageSourceSequencer::getTileOrigin ( ossim_int64  id,
ossimIpt origin 
) const
virtual

Definition at line 395 of file ossimImageSourceSequencer.cpp.

References getNumberOfTiles(), OSSIM_DEFAULT_MAX_PIX_SINT32, theAreaOfInterest, theCurrentTileNumber, theNumberOfTilesHorizontal, theNumberOfTilesVertical, theTileSize, ossimIrect::ul(), ossimIpt::x, x, ossimIpt::y, and y.

Referenced by ossimImageMpiMWriterSequenceConnection::getNextTile(), and getTileRect().

396 {
397  bool result = false;
398  if( id >= 0 )
399  {
401  {
405  {
409  ossim_int64 ty = theTileSize.y;
410  x = ulx + x * tx;
411  y = uly + y * ty;
412 
413  //---
414  // ossimIpt currently signed 32 bit so make sure we didn't bust the
415  // bounds.
416  //---
418  {
419  origin.x = (ossim_int32)x;
420  origin.y = (ossim_int32)y;
421  result = true;
422  }
423  }
424  }
425  }
426  return result;
427 }
ossim_uint32 x
ossim_uint32 y
const ossimIpt & ul() const
Definition: ossimIrect.h:274
ossim_int32 y
Definition: ossimIpt.h:142
long long ossim_int64
#define OSSIM_DEFAULT_MAX_PIX_SINT32
ossim_int32 x
Definition: ossimIpt.h:141
int ossim_int32

◆ getTileRect()

bool ossimImageSourceSequencer::getTileRect ( ossim_int64  tile_id,
ossimIrect rect 
) const

Establishes a tile rect given tile ID.

Parameters
tile_id
rectRectangle to initialize.
Returns
true if valid; else, false.

Definition at line 429 of file ossimImageSourceSequencer.cpp.

References getTileOrigin(), ossimIrect::set_lrx(), ossimIrect::set_lry(), ossimIrect::set_ul(), theTileSize, ossimIpt::x, and ossimIpt::y.

Referenced by getNextTile(), and ossimMultiThreadSequencer::ossimGetTileJob::run().

430 {
431  // Fetch tile origin for this tile:
432  ossimIpt origin;
433  bool result = getTileOrigin(tile_id, origin);
434  if ( result )
435  {
436  // Establish the tile rect of interest for this tile:
437  tileRect.set_ul (origin);
438  tileRect.set_lrx(origin.x + theTileSize.x - 1);
439  tileRect.set_lry(origin.y + theTileSize.y - 1);
440  }
441  return result;
442 }
virtual bool getTileOrigin(ossim_int64 id, ossimIpt &origin) const
ossim_int32 y
Definition: ossimIpt.h:142
ossim_int32 x
Definition: ossimIpt.h:141

◆ getTileSize()

ossimIpt ossimImageSourceSequencer::getTileSize ( ) const
virtual

Definition at line 87 of file ossimImageSourceSequencer.cpp.

References theTileSize.

88 {
89  return theTileSize;
90 }

◆ getTileWidth()

ossim_uint32 ossimImageSourceSequencer::getTileWidth ( ) const
virtual

Returns the default processing tile width.

Reimplemented from ossimImageSource.

Definition at line 484 of file ossimImageSourceSequencer.cpp.

References theTileSize, and ossimIpt::x.

Referenced by ossimArcInfoGridWriter::writeBinaryAigHeader(), ossimArcInfoGridWriter::writeFile(), and ossimWriter::writeStream().

485 {
486  return theTileSize.x;
487 }
ossim_int32 x
Definition: ossimIpt.h:141

◆ initialize()

void ossimImageSourceSequencer::initialize ( )
virtual

This must be called. We can only initialize this object completely if we know all connections are valid. Some other object drives this and so the connection's initialize will be called after. The job of this connection is to set up the sequence. It will default to the bounding rect. The area of interest can be set to some other rectagle (use setAreaOfInterest).

Implements ossimImageSource.

Reimplemented in ossimImageMpiMWriterSequenceConnection, and ossimImageMpiSWriterSequenceConnection.

Definition at line 132 of file ossimImageSourceSequencer.cpp.

References ossimImageDataFactory::create(), ossimImageSource::getBoundingRect(), ossimConnectableObject::getInput(), ossimImageSource::getTileHeight(), ossimImageSource::getTileWidth(), ossimIpt::hasNans(), ossimDrect::hasNans(), ossimImageData::initialize(), ossimImageDataFactory::instance(), ossimIrect::makeNan(), PTR_CAST, setAreaOfInterest(), ossimDrect::stretchOut(), theAreaOfInterest, theBlankTile, theInputConnection, theTileSize, updateTileDimensions(), ossimRefPtr< T >::valid(), ossimIpt::x, and ossimIpt::y.

Referenced by ossimImageHistogramSource::computeNormalModeHistogram(), connectInputEvent(), ossimImageMpiSWriterSequenceConnection::initialize(), ossimImageMpiMWriterSequenceConnection::initialize(), ossimImageFileWriter::initialize(), ossimImageSourceSequencer(), ossimGpkgWriter::setView(), ossimArcInfoGridWriter::writeFile(), and ossimJpegWriter::writeFile().

133 {
135 
137  {
138  if(theTileSize.hasNans())
139  {
142  }
143 
145  if(rect.hasNans())
146  {
148  }
149  else
150  {
151  rect.stretchOut();
152  setAreaOfInterest(rect);
153  }
155 
157  this);
158  if(theBlankTile.valid())
159  {
161  }
162  }
163 }
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
bool valid() const
Definition: ossimRefPtr.h:75
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual void initialize()
Initialize the data buffer.
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
static ossimImageDataFactory * instance()
virtual void setAreaOfInterest(const ossimIrect &areaOfInterest)
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
bool hasNans() const
Definition: ossimDrect.h:396
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_int32 y
Definition: ossimIpt.h:142
void makeNan()
Definition: ossimIrect.h:329
ossim_int32 x
Definition: ossimIpt.h:141
bool hasNans() const
Definition: ossimIpt.h:58
ossimRefPtr< ossimImageData > theBlankTile
void stretchOut()
Definition: ossimDrect.cpp:379

◆ isMaster()

bool ossimImageSourceSequencer::isMaster ( ) const
virtual

◆ loadState()

bool ossimImageSourceSequencer::loadState ( const ossimKeywordlist kwl,
const char *  prefix 
)
virtual

Method to the load (recreate) the state of an object from a keyword list.

Return true if ok or false on error.

Reimplemented from ossimImageSource.

Reimplemented in ossimMultiThreadSequencer.

Definition at line 603 of file ossimImageSourceSequencer.cpp.

References ossimKeywordlist::find(), ossimImageSource::loadState(), setCreateHistogram(), status, and ossimString::toBool().

Referenced by ossimMultiThreadSequencer::loadState().

604 {
605  const char* lookup;
606  lookup = kwl.find(prefix, "create_histogram");
607  if(lookup)
608  {
609  bool create_histogram = ossimString(lookup).toBool();
610  setCreateHistogram(create_histogram);
611  }
612  bool status = ossimImageSource::loadState(kwl, prefix);
613 
614  return status;
615 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
const char * find(const char *key) const
void setCreateHistogram(bool create_histogram)
bool toBool() const
String to numeric methods.
return status

◆ setAreaOfInterest()

void ossimImageSourceSequencer::setAreaOfInterest ( const ossimIrect areaOfInterest)
virtual

Will set the current area of interest.

Definition at line 224 of file ossimImageSourceSequencer.cpp.

References ossimIrect::hasNans(), ossimIrect::makeNan(), theAreaOfInterest, theNumberOfTilesHorizontal, theNumberOfTilesVertical, and updateTileDimensions().

Referenced by ossimImageHistogramSource::computeNormalModeHistogram(), initialize(), ossimImageFileWriter::initialize(), ossimImageFileWriter::setAreaOfInterest(), ossimGdalWriter::writeBlockFile(), ossimArcInfoGridWriter::writeFile(), ossimKmlSuperOverlayWriter::writeFile(), and ossimGpkgWriter::writeTiles().

225 {
226  if(areaOfInterest.hasNans())
227  {
231  }
232 
233  // let's round it to the nearest pixel value before setting it.
234  theAreaOfInterest = areaOfInterest;
236 }
void makeNan()
Definition: ossimIrect.h:329
bool hasNans() const
Definition: ossimIrect.h:337

◆ setCreateHistogram()

void ossimImageSourceSequencer::setCreateHistogram ( bool  create_histogram)

Definition at line 617 of file ossimImageSourceSequencer.cpp.

References theCreateHistogram.

Referenced by loadState().

618 {
619  theCreateHistogram = create_histogram;
620 }

◆ setTileSize() [1/2]

void ossimImageSourceSequencer::setTileSize ( const ossimIpt tileSize)
virtual

◆ setTileSize() [2/2]

void ossimImageSourceSequencer::setTileSize ( ossim_int32  width,
ossim_int32  height 
)
virtual

Definition at line 99 of file ossimImageSourceSequencer.cpp.

References setTileSize().

100 {
101  setTileSize(ossimIpt(width, height));
102 }
virtual void setTileSize(const ossimIpt &tileSize)

◆ setToStartOfSequence()

void ossimImageSourceSequencer::setToStartOfSequence ( )
virtual

◆ slaveProcessTiles()

void ossimImageSourceSequencer::slaveProcessTiles ( )
virtual

◆ updateTileDimensions()

void ossimImageSourceSequencer::updateTileDimensions ( )
protectedvirtual

Definition at line 104 of file ossimImageSourceSequencer.cpp.

References ossimIpt::hasNans(), ossimIrect::hasNans(), ossimIrect::height(), status, theAreaOfInterest, theNumberOfTilesHorizontal, theNumberOfTilesVertical, theTileSize, ossimIrect::width(), ossimIpt::x, and ossimIpt::y.

Referenced by initialize(), setAreaOfInterest(), and setTileSize().

105 {
106  bool status = false;
108  {
110  ossim_float64 aoiHeight = theAreaOfInterest.height();
111  ossim_float64 tileWidth = theTileSize.x;
112  ossim_float64 tileHeight = theTileSize.y;
113 
114  if ( (aoiWidth > 0.0) && (aoiHeight > 0.0) &&
115  (tileWidth > 0.0) && (tileHeight > 0.0) )
116  {
118  = static_cast<ossim_int64>(std::ceil(aoiWidth/tileWidth));
120  = static_cast<ossim_int64>(std::ceil(aoiHeight/tileHeight));
121  status = true;
122  }
123  }
124 
125  if ( !status )
126  {
129  }
130 }
ossim_uint32 height() const
Definition: ossimIrect.h:487
double ossim_float64
ossim_uint32 width() const
Definition: ossimIrect.h:500
return status
ossim_int32 y
Definition: ossimIpt.h:142
long long ossim_int64
bool hasNans() const
Definition: ossimIrect.h:337
ossim_int32 x
Definition: ossimIpt.h:141
bool hasNans() const
Definition: ossimIpt.h:58

Member Data Documentation

◆ theAreaOfInterest

ossimIrect ossimImageSourceSequencer::theAreaOfInterest
protected

◆ theBlankTile

ossimRefPtr<ossimImageData> ossimImageSourceSequencer::theBlankTile
protected

◆ theCreateHistogram

bool ossimImageSourceSequencer::theCreateHistogram
protected

Definition at line 172 of file ossimImageSourceSequencer.h.

Referenced by getTile(), and setCreateHistogram().

◆ theCurrentTileNumber

ossim_int64 ossimImageSourceSequencer::theCurrentTileNumber
protected

◆ theHistogram

ossimRefPtr<ossimMultiResLevelHistogram> ossimImageSourceSequencer::theHistogram
protected

Definition at line 153 of file ossimImageSourceSequencer.h.

◆ theInputConnection

ossimImageSource* ossimImageSourceSequencer::theInputConnection
protected

◆ theNumberOfTilesHorizontal

ossim_int64 ossimImageSourceSequencer::theNumberOfTilesHorizontal
protected

◆ theNumberOfTilesVertical

ossim_int64 ossimImageSourceSequencer::theNumberOfTilesVertical
protected

◆ theTileSize

ossimIpt ossimImageSourceSequencer::theTileSize
protected

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