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

#include <ossimBlendMosaic.h>

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

Public Member Functions

 ossimBlendMosaic ()
 
 ossimBlendMosaic (ossimConnectableObject::ConnectableObjectList &inputSources)
 
virtual ~ossimBlendMosaic ()
 
virtual void initialize ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &origin, ossim_uint32 resLevel=0)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=NULL) const
 Method to save the state of an object to a keyword list. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=NULL)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
void setWeight (ossim_uint32 index, double weight)
 
void setWeights (const std::vector< double > &weights)
 
double getWeight (ossim_uint32 index) const
 
const std::vector< double > & getWeights () const
 
void setNumberOfWeights (ossim_uint32 numberOfWeights)
 
void setAllWeightsTo (double value)
 
void normalizeWeights ()
 Will find the min and max values and then normalize all weights to be from 0 to 1. More...
 
void findMinMax (double &minValue, double &maxValue) const
 
- Public Member Functions inherited from ossimImageMosaic
 ossimImageMosaic ()
 
 ossimImageMosaic (ossimConnectableObject::ConnectableObjectList &inputSources)
 
- Public Member Functions inherited from ossimImageCombiner
 ossimImageCombiner ()
 
 ossimImageCombiner (ossimObject *owner, int numberOfInputs, int numberOfOutputs, bool inputListIsFixedFlag, bool outputListIsFixedFlag)
 
 ossimImageCombiner (ossimConnectableObject::ConnectableObjectList &inputSources)
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 This will return the bounding rect of the source. More...
 
virtual void updateRects ()
 This will go through and precompute the bounding rects of each input image. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 Returns the number of bands available from the input. More...
 
virtual ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. More...
 
virtual ossim_uint32 getTileWidth () const
 Returns the default processing tile width. More...
 
virtual ossim_uint32 getTileHeight () const
 Returns the default processing tile height. More...
 
virtual double getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. More...
 
virtual double getMinPixelValue (ossim_uint32 band=0) const
 Returns the min pixel of the band. More...
 
virtual double getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual ossim_uint32 getNumberOfOverlappingImages (const ossimIrect &rect, ossim_uint32 resLevel=0) const
 Used to retrieve the number of overlapping images withint the given rect. More...
 
virtual void getOverlappingImages (std::vector< ossim_uint32 > &result, const ossimIrect &rect, ossim_uint32 resLevel=0) const
 Used to populate the result with the index of the overlapping images. More...
 
virtual ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextTile (ossim_uint32 &returnedIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual bool getNextTile (ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, ossimImageData *tile, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextNormTile (ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossimRefPtr< ossimImageDatagetNextNormTile (ossim_uint32 &returnedIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes More...
 
virtual void connectInputEvent (ossimConnectionEvent &event)
 
virtual void disconnectInputEvent (ossimConnectionEvent &event)
 
virtual void propertyEvent (ossimPropertyEvent &event)
 
virtual void refreshEvent (ossimRefreshEvent &event)
 
virtual bool hasDifferentInputs () const
 
- Public Member Functions inherited from ossimImageSource
 ossimImageSource (ossimObject *owner=0)
 
 ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimImageSource ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIpt &origin, ossim_uint32 resLevel=0)
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossimObjectgetObject ()
 For RTTI support. More...
 
virtual const ossimObjectgetObject () const
 For RTTI support. More...
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 Will return the decimation factor for the given resolution level. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Will return the number of resolution levels. More...
 
virtual ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. More...
 
virtual void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual void getBoundingRect (ossimIrect &rect, ossim_uint32 resLevel=0) const
 Gets the bounding rectangle of the source. More...
 
virtual void getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if not defined. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual void saveImageGeometry () const
 Default method to call input's saveImageGeometry. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Default method to call input's saveImageGeometry. More...
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool isIndexedData () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimConnectableObjectListener
 ossimConnectableObjectListener ()
 
virtual ~ossimConnectableObjectListener ()
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &)
 
virtual void connectionEvent (ossimConnectionEvent &)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &)
 
virtual void connectOutputEvent (ossimConnectionEvent &)
 
virtual void addObjectEvent (ossimContainerEvent &)
 
virtual void removeObjectEvent (ossimContainerEvent &)
 
virtual void containerEvent (ossimContainerEvent &)
 
- Public Member Functions inherited from ossimListener
 ossimListener ()
 
virtual ~ossimListener ()
 
void enableListener ()
 
void disableListener ()
 
void setListenerEnableFlag (bool flag)
 
bool isListenerEnabled () const
 
bool getListenerEnableFlag () const
 

Protected Member Functions

template<class T >
ossimRefPtr< ossimImageDatacombine (T, const ossimIrect &tileRect, ossim_uint32)
 If our inputs have output of different scalar types then we must normalize so we can blend different scalar data together. More...
 
template<class T >
ossimRefPtr< ossimImageDatacombineNorm (T, const ossimIrect &tileRect, ossim_uint32)
 
- Protected Member Functions inherited from ossimImageMosaic
virtual ~ossimImageMosaic ()
 
void allocate ()
 Called on first getTile, will initialize all data needed. More...
 
template<class T >
ossimRefPtr< ossimImageDatacombine (T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
template<class T >
ossimRefPtr< ossimImageDatacombineNorm (T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
- Protected Member Functions inherited from ossimImageCombiner
virtual ~ossimImageCombiner ()
 
void precomputeBounds () const
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

vector< double > theWeights
 
ossimRefPtr< ossimImageDatatheNormResult
 
- Protected Attributes inherited from ossimImageMosaic
ossimRefPtr< ossimImageDatatheTile
 
- Protected Attributes inherited from ossimImageCombiner
ossim_uint32 theLargestNumberOfInputBands
 
ossim_uint32 theInputToPassThrough
 
bool theHasDifferentInputs
 
ossimRefPtr< ossimImageDatatheNormTile
 
std::vector< ossimIrecttheFullResBounds
 
bool theComputeFullResBoundsFlag
 
ossim_uint32 theCurrentIndex
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 
- Protected Attributes inherited from ossimListener
bool theListenerEnableFlag
 

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file ossimBlendMosaic.h.

Constructor & Destructor Documentation

◆ ossimBlendMosaic() [1/2]

ossimBlendMosaic::ossimBlendMosaic ( )

Definition at line 17 of file ossimBlendMosaic.cpp.

18  : ossimImageMosaic(),
19  theNormResult(NULL)
20 {
21 }
ossimRefPtr< ossimImageData > theNormResult

◆ ossimBlendMosaic() [2/2]

ossimBlendMosaic::ossimBlendMosaic ( ossimConnectableObject::ConnectableObjectList inputSources)

Definition at line 23 of file ossimBlendMosaic.cpp.

References initialize().

24  : ossimImageMosaic(inputSources),
25  theNormResult(NULL)
26 {
27  initialize();
28 }
virtual void initialize()
ossimRefPtr< ossimImageData > theNormResult

◆ ~ossimBlendMosaic()

ossimBlendMosaic::~ossimBlendMosaic ( )
virtual

Definition at line 30 of file ossimBlendMosaic.cpp.

31 {
32 }

Member Function Documentation

◆ combine()

template<class T >
ossimRefPtr< ossimImageData > ossimBlendMosaic::combine ( ,
const ossimIrect tileRect,
ossim_uint32  resLevel 
)
protected

If our inputs have output of different scalar types then we must normalize so we can blend different scalar data together.

Definition at line 217 of file ossimBlendMosaic.cpp.

References ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageCombiner::getNextTile(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), ossimImageData::isNull(), OSSIM_EMPTY, OSSIM_NULL, OSSIM_PARTIAL, ossimImageCombiner::theLargestNumberOfInputBands, ossimImageMosaic::theTile, theWeights, and ossimImageData::validate().

Referenced by getTile().

221 {
222  ossimRefPtr<ossimImageData> currentImageData=NULL;
223  ossim_uint32 band;
224  double currentWeight = 1.0;
225  double previousWeight = 1.0;
226  // double sumOfWeights = 1;
227  long offset = 0;
228  long row = 0;
229  long col = 0;
230  ossim_uint32 layerIdx = 0;
231  currentImageData = getNextTile(layerIdx, 0, tileRect, resLevel);
232 
233  if(!currentImageData.get()) // if we don't have one then return theTile
234  {
235  return theTile;
236  }
237 
238  T** srcBands = new T*[theLargestNumberOfInputBands];
239  T** destBands = new T*[theLargestNumberOfInputBands];
240  T* nullPix = new T[theTile->getNumberOfBands()];
241 
242  previousWeight = theWeights[layerIdx];
243  // // now get the previous weight and then combine the two into one.
244  // let's assign the bands
245  for(band = 0; band < theLargestNumberOfInputBands; ++band)
246  {
247  destBands[band] = static_cast<T*>(theTile->getBuf(band));
248  nullPix[band] = static_cast<T>(theTile->getNullPix(band));
249  }
250  while(currentImageData.get())
251  {
252  ossimDataObjectStatus currentStatus =
253  currentImageData->getDataObjectStatus();
254 
255  // set the current weight for the current tile.
256  currentWeight = theWeights[layerIdx];
257 
258  // sumOfWeights = previousWeight+currentWeight;
259  if( (currentStatus != OSSIM_EMPTY) &&
260  (currentStatus != OSSIM_NULL))
261  {
262  long h = (long)currentImageData->getHeight();
263  long w = (long)currentImageData->getWidth();
264  offset = 0;
265  ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
266 
267  // let's assign the bands
268  for(band = 0; band < minNumberOfBands; ++band)
269  {
270  srcBands[band] = static_cast<T*>(currentImageData->getBuf(band));
271  }
272  for(;band < theLargestNumberOfInputBands; ++band)
273  {
274  srcBands[band] = srcBands[minNumberOfBands - 1];
275  }
276 
277  if(currentStatus == OSSIM_PARTIAL)
278  {
279  for(row = 0; row < h; ++row)
280  {
281  for(col = 0; col < w; ++col)
282  {
283  if(!currentImageData->isNull(offset))
284  {
285  for(band = 0; band < theLargestNumberOfInputBands; ++band)
286  {
287  if(destBands[band][offset] != nullPix[band])
288  {
289 // destBands[band][offset] = static_cast<T>((destBands[band][offset]*(1.0-currentWeight) +
290 // srcBands[band][offset]*currentWeight));
291  destBands[band][offset] = static_cast<T>((destBands[band][offset]*previousWeight +
292  srcBands[band][offset]*currentWeight)/(previousWeight+currentWeight));
293  }
294  else
295  {
296  destBands[band][offset] = srcBands[band][offset];
297  }
298  }
299  }
300  ++offset;
301  }
302  }
303  }
304  else
305  {
306  for(row = 0; row < h; ++row)
307  {
308  for(col = 0; col < w; ++col)
309  {
310  for(band = 0; band < theLargestNumberOfInputBands; ++band)
311  {
312  if(destBands[band][offset] != nullPix[band])
313  {
314  destBands[band][offset] = static_cast<T>((destBands[band][offset]*previousWeight+
315  srcBands[band][offset]*currentWeight)/(previousWeight + currentWeight));
316  }
317  else
318  {
319  destBands[band][offset] = srcBands[band][offset];
320  }
321  }
322  ++offset;
323  }
324  }
325  }
326  }
327  currentImageData = getNextTile(layerIdx, tileRect, resLevel);
328  previousWeight = (previousWeight+currentWeight)/2.0;
329  }
330  delete [] srcBands;
331  delete [] destBands;
332  delete [] nullPix;
333  theTile->validate();
334 
335  return theTile;
336 }
virtual ossim_uint32 getWidth() const
ossimRefPtr< ossimImageData > theTile
virtual ossim_uint32 getNumberOfBands() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
bool isNull(ossim_uint32 offset) const
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossim_uint32 theLargestNumberOfInputBands
virtual ossimDataObjectStatus validate() const
vector< double > theWeights
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
virtual const void * getBuf() const
ossimDataObjectStatus
Definitions for data object status.

◆ combineNorm()

template<class T >
ossimRefPtr< ossimImageData > ossimBlendMosaic::combineNorm ( ,
const ossimIrect tileRect,
ossim_uint32  resLevel 
)
protected

Definition at line 338 of file ossimBlendMosaic.cpp.

References ossimImageData::copyNormalizedBufferToTile(), ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimDataObject::getDataObjectStatus(), ossimImageData::getHeight(), ossimImageCombiner::getNextNormTile(), ossimImageData::getNullPix(), ossimImageData::getNumberOfBands(), ossimImageData::getWidth(), ossimImageData::isNull(), ossimImageData::makeBlank(), OSSIM_EMPTY, OSSIM_NULL, OSSIM_PARTIAL, ossimImageCombiner::theLargestNumberOfInputBands, theNormResult, ossimImageMosaic::theTile, theWeights, and ossimImageData::validate().

Referenced by getTile().

340 {
341  ossimRefPtr<ossimImageData> currentImageData=NULL;
342  ossim_uint32 band;
343  double currentWeight = 1.0;
344  double previousWeight = 1.0;
345  // double sumOfWeights = 1;
346  long offset = 0;
347  long row = 0;
348  long col = 0;
349  ossim_uint32 layerIdx = 0;
350  currentImageData = getNextNormTile(layerIdx, 0, tileRect, resLevel);
351 
352  if(!currentImageData.get()) // if we don't have one then return theTile
353  {
354  return theTile;
355  }
357  float** srcBands = new float*[theLargestNumberOfInputBands];
358  float** destBands = new float*[theLargestNumberOfInputBands];
359  float* nullPix = new float[theTile->getNumberOfBands()];
360 
361  previousWeight = theWeights[layerIdx];
362  // // now get the previous weight and then combine the two into one.
363  // let's assign the bands
364  for(band = 0; band < theLargestNumberOfInputBands; ++band)
365  {
366  destBands[band] = static_cast<float*>(theNormResult->getBuf(band));
367  nullPix[band] = static_cast<float>(theNormResult->getNullPix(band));
368  }
369  while(currentImageData.get())
370  {
371  ossimDataObjectStatus currentStatus = currentImageData->getDataObjectStatus();
372 
373  // set the current weight for the current tile.
374  currentWeight = theWeights[layerIdx];
375 
376  // sumOfWeights = previousWeight+currentWeight;
377  if( (currentStatus != OSSIM_EMPTY) &&
378  (currentStatus != OSSIM_NULL))
379  {
380  long h = (long)currentImageData->getHeight();
381  long w = (long)currentImageData->getWidth();
382  offset = 0;
383  ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
384 
385  // let's assign the bands
386  for(band = 0; band < minNumberOfBands; ++band)
387  {
388  srcBands[band] = static_cast<float*>(currentImageData->getBuf(band));
389  }
390  for(;band < theLargestNumberOfInputBands; ++band)
391  {
392  srcBands[band] = srcBands[minNumberOfBands - 1];
393  }
394 
395  if(currentStatus == OSSIM_PARTIAL)
396  {
397  for(row = 0; row < h; ++row)
398  {
399  for(col = 0; col < w; ++col)
400  {
401  if(!currentImageData->isNull(offset))
402  {
403  for(band = 0; band < theLargestNumberOfInputBands; ++band)
404  {
405  if(destBands[band][offset] != nullPix[band])
406  {
407  destBands[band][offset] = static_cast<float>((destBands[band][offset]*previousWeight +
408  srcBands[band][offset]*currentWeight)/(previousWeight+currentWeight));
409  }
410  else
411  {
412  destBands[band][offset] = srcBands[band][offset];
413  }
414  }
415  }
416  ++offset;
417  }
418  }
419  }
420  else
421  {
422  for(row = 0; row < h; ++row)
423  {
424  for(col = 0; col < w; ++col)
425  {
426  for(band = 0; band < theLargestNumberOfInputBands; ++band)
427  {
428  if(destBands[band][offset] != nullPix[band])
429  {
430  destBands[band][offset] = static_cast<float>((destBands[band][offset]*previousWeight+
431  srcBands[band][offset]*currentWeight)/(previousWeight + currentWeight));
432  }
433  else
434  {
435  destBands[band][offset] = srcBands[band][offset];
436  }
437  }
438  ++offset;
439  }
440  }
441  }
442  }
443  currentImageData = getNextNormTile(layerIdx, tileRect, resLevel);
444  previousWeight = (previousWeight+currentWeight)/2.0;
445  }
448  delete [] srcBands;
449  delete [] destBands;
450  delete [] nullPix;
451  theTile->validate();
452 
453  return theTile;
454 }
virtual ossim_uint32 getWidth() const
ossimRefPtr< ossimImageData > theNormResult
ossimRefPtr< ossimImageData > theTile
virtual ossim_uint32 getNumberOfBands() const
virtual ossimRefPtr< ossimImageData > getNextNormTile(ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
bool isNull(ossim_uint32 offset) const
ossim_uint32 theLargestNumberOfInputBands
virtual ossimDataObjectStatus validate() const
vector< double > theWeights
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
virtual void makeBlank()
Initializes data to null pixel values.
virtual const void * getBuf() const
ossimDataObjectStatus
Definitions for data object status.

◆ findMinMax()

void ossimBlendMosaic::findMinMax ( double &  minValue,
double &  maxValue 
) const

Definition at line 554 of file ossimBlendMosaic.cpp.

References theWeights.

555 {
556  if(theWeights.size() > 0)
557  {
558  minValue = maxValue = theWeights[0];
559 
560  for(ossim_uint32 index = 1; index < theWeights.size(); ++index)
561  {
562  minValue = minValue < theWeights[index]?minValue:theWeights[index];
563  maxValue = maxValue > theWeights[index]?maxValue:theWeights[index];
564  }
565  }
566 }
vector< double > theWeights
unsigned int ossim_uint32

◆ getTile()

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

Reimplemented from ossimImageMosaic.

Definition at line 60 of file ossimBlendMosaic.cpp.

References combine(), combineNorm(), ossimRefPtr< T >::get(), ossimConnectableObject::getNumberOfInputs(), ossimRectilinearDataObject::getScalarType(), ossimImageMosaic::getTile(), ossimImageCombiner::hasDifferentInputs(), initialize(), ossimSource::isSourceEnabled(), ossimImageData::makeBlank(), OSSIM_FLOAT32, OSSIM_FLOAT64, OSSIM_NORMALIZED_DOUBLE, OSSIM_NORMALIZED_FLOAT, OSSIM_SCALAR_UNKNOWN, OSSIM_SINT16, OSSIM_SINT32, OSSIM_SINT8, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT8, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, ossimNotify(), ossimNotifyLevel_NOTICE, ossimImageData::setImageRectangle(), size, theNormResult, ossimImageMosaic::theTile, and ossimRefPtr< T >::valid().

63 {
64  // ossimIpt origin = tileRect.ul();
65  if(!isSourceEnabled())
66  {
67  return ossimImageMosaic::getTile(tileRect, resLevel);
68  }
69 
71  if(!theTile.get())
72  {
73  // try to initialize
74  initialize();
75 
76  // if we still don't have a buffer
77  // then we will leave
78  if(!theTile.get())
79  {
80  return theTile;
81  }
82  }
83 
84  if(size == 0)
85  {
87  }
88  if(size == 1)
89  {
90  return ossimImageMosaic::getTile(tileRect, resLevel);
91  }
92 
93  theTile->setImageRectangle(tileRect);
94  theTile->makeBlank();
95  if(theNormResult.valid())
96  {
99  }
100 
101  switch(theTile->getScalarType())
102  {
103  case OSSIM_UINT8:
104  {
105  if(!hasDifferentInputs())
106  {
107  return combine(static_cast<ossim_uint8>(0), tileRect, resLevel);
108  }
109  else
110  {
111  return combineNorm(static_cast<ossim_uint8>(0), tileRect,
112  resLevel);
113  }
114  }
115  case OSSIM_SINT8:
116  {
117  if(!hasDifferentInputs())
118  {
119  return combine(static_cast<ossim_sint8>(0), tileRect, resLevel);
120  }
121  else
122  {
123  return combineNorm(static_cast<ossim_sint8>(0), tileRect,
124  resLevel);
125  }
126  }
127  case OSSIM_FLOAT32:
129  {
130  if(!hasDifferentInputs())
131  {
132  return combine(static_cast<float>(0), tileRect, resLevel);
133  }
134  else
135  {
136  return combineNorm(static_cast<float>(0), tileRect, resLevel);
137  }
138  }
139  case OSSIM_UINT16:
140  case OSSIM_USHORT11:
141  case OSSIM_USHORT12:
142  case OSSIM_USHORT13:
143  case OSSIM_USHORT14:
144  case OSSIM_USHORT15:
145  {
146  if(!hasDifferentInputs())
147  {
148  return combine(static_cast<ossim_uint16>(0), tileRect, resLevel);
149  }
150  else
151  {
152  return combineNorm(static_cast<ossim_uint16>(0), tileRect,
153  resLevel);
154  }
155  }
156  case OSSIM_SINT16:
157  {
158  if(!hasDifferentInputs())
159  {
160  return combine(static_cast<ossim_sint16>(0), tileRect, resLevel);
161  }
162  else
163  {
164  return combineNorm(static_cast<ossim_sint16>(0), tileRect,
165  resLevel);
166  }
167  }
168  case OSSIM_SINT32:
169  {
170  if(!hasDifferentInputs())
171  {
172  return combine(static_cast<ossim_sint32>(0), tileRect, resLevel);
173  }
174  else
175  {
176  return combineNorm(static_cast<ossim_sint32>(0), tileRect,
177  resLevel);
178  }
179  }
180  case OSSIM_UINT32:
181  {
182  if(!hasDifferentInputs())
183  {
184  return combine(static_cast<ossim_uint32>(0), tileRect, resLevel);
185  }
186  else
187  {
188  return combineNorm(static_cast<ossim_uint32>(0), tileRect,
189  resLevel);
190  }
191  }
192  case OSSIM_FLOAT64:
194  {
195  if(!hasDifferentInputs())
196  {
197  return combine(static_cast<double>(0), tileRect, resLevel);
198  }
199  else
200  {
201  return combineNorm(static_cast<double>(0), tileRect, resLevel);
202  }
203  }
205  default:
206  {
208  << "ossimBlendMosaic::getTile NOTICE:\n"
209  << "Scalar type = " << theTile->getScalarType()
210  << " Not supported by ossimImageMosaic" << endl;
211  }
212  }
213 
214  return ossimRefPtr<ossimImageData>();
215 }
16 bit unsigned integer (15 bits used)
8 bit signed integer
virtual void initialize()
ossimRefPtr< ossimImageData > theNormResult
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
ossimRefPtr< ossimImageData > theTile
64 bit floating point
virtual void setImageRectangle(const ossimIrect &rect)
16 bit unsigned integer
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimImageData > combineNorm(T, const ossimIrect &tileRect, ossim_uint32)
16 bit signed integer
16 bit unsigned integer (14 bits used)
16 bit unsigned integer (13 bits used)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &origin, ossim_uint32 resLevel=0)
32 bit floating point
32 bit unsigned integer
yy_size_t size
32 bit signed integer
unsigned int ossim_uint32
32 bit normalized floating point
virtual bool hasDifferentInputs() const
virtual ossimScalarType getScalarType() const
virtual void makeBlank()
Initializes data to null pixel values.
64 bit normalized floating point
16 bit unsigned integer (11 bits used)
ossimRefPtr< ossimImageData > combine(T, const ossimIrect &tileRect, ossim_uint32)
If our inputs have output of different scalar types then we must normalize so we can blend different ...
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
8 bit unsigned integer
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
16 bit unsigned integer (12 bits used)

◆ getWeight()

double ossimBlendMosaic::getWeight ( ossim_uint32  index) const

Definition at line 586 of file ossimBlendMosaic.cpp.

References theWeights.

587 {
588  if(index < theWeights.size())
589  {
590  return theWeights[index];
591  }
592  if(theWeights.size())
593  {
594  return theWeights[theWeights.size()-1];
595  }
596  return 0;
597 }
vector< double > theWeights

◆ getWeights()

const vector< double > & ossimBlendMosaic::getWeights ( ) const

Definition at line 581 of file ossimBlendMosaic.cpp.

References theWeights.

582 {
583  return theWeights;
584 }
vector< double > theWeights

◆ initialize()

void ossimBlendMosaic::initialize ( )
virtual

Reimplemented from ossimImageMosaic.

Definition at line 34 of file ossimBlendMosaic.cpp.

References ossimImageMosaic::allocate(), ossimImageCombiner::hasDifferentInputs(), ossimImageMosaic::initialize(), ossimImageData::initialize(), OSSIM_NORMALIZED_FLOAT, ossimConnectableObject::theInputObjectList, ossimImageCombiner::theLargestNumberOfInputBands, theNormResult, and theWeights.

Referenced by getTile(), and ossimBlendMosaic().

35 {
37 
38  allocate();
39 
40  // only allocate this space if we have to
41  if(hasDifferentInputs())
42  {
43  theNormResult = new ossimImageData(this,
47  }
48 
49  if(theWeights.size() < theInputObjectList.size())
50  {
51  for(ossim_uint32 index =(ossim_uint32)theWeights.size();
52  index < theInputObjectList.size();
53  ++index)
54  {
55  theWeights.push_back(1.0);
56  }
57  }
58 }
ossimRefPtr< ossimImageData > theNormResult
virtual void initialize()
Initialize the data buffer.
void allocate()
Called on first getTile, will initialize all data needed.
virtual void initialize()
ossim_uint32 theLargestNumberOfInputBands
vector< double > theWeights
unsigned int ossim_uint32
32 bit normalized floating point
virtual bool hasDifferentInputs() const
ConnectableObjectList theInputObjectList
Holds a list of input objects.

◆ loadState()

bool ossimBlendMosaic::loadState ( const ossimKeywordlist kwl,
const char *  prefix = NULL 
)
virtual

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

Return true if ok or false on error.

Reimplemented from ossimImageMosaic.

Definition at line 475 of file ossimBlendMosaic.cpp.

References ossimString::c_str(), ossimKeywordlist::find(), ossimKeywordlist::getNumberOfSubstringKeys(), ossimImageMosaic::loadState(), theWeights, and ossimString::toString().

477 {
478  bool result = ossimImageMosaic::loadState(kwl, prefix);
479  ossim_uint32 count = 0;
480  theWeights.clear();
481  if(result)
482  {
483  ossimString copyPrefix = prefix;
484  ossimString regExpression = ossimString("^(") + copyPrefix + "weight[0-9]+)";
485  ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
486 
487  ossim_uint32 numberOfMatches = 0;
488  while(numberOfMatches < result)
489  {
490  ossimString value = ossimString("weight") + ossimString::toString(count);
491 
492  const char* lookup = kwl.find(copyPrefix.c_str(),
493  value.c_str());
494 
495  if(lookup)
496  {
497  ++numberOfMatches;
498  theWeights.push_back(ossimString(lookup).toDouble());
499  }
500 
501  ++count;
502  }
503  }
504 
505  return result;
506 }
ossim_uint32 getNumberOfSubstringKeys(const ossimString &regularExpression) const
const char * find(const char *key) const
static ossimString toString(bool aValue)
Numeric to string methods.
vector< double > theWeights
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
unsigned int ossim_uint32
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ normalizeWeights()

void ossimBlendMosaic::normalizeWeights ( )

Will find the min and max values and then normalize all weights to be from 0 to 1.

Definition at line 537 of file ossimBlendMosaic.cpp.

References theWeights.

538 {
539  double sumWeights=0.0;
540  ossim_uint32 index = 0;
541  for(index = 0; index < theWeights.size(); ++index)
542  {
543  sumWeights+=theWeights[index];
544  }
545  if(sumWeights > 0.0)
546  {
547  for(index = 0; index < theWeights.size(); ++index)
548  {
549  theWeights[index] /= sumWeights;
550  }
551  }
552 }
vector< double > theWeights
unsigned int ossim_uint32

◆ saveState()

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

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

Return true if ok or false on error.

Reimplemented from ossimImageMosaic.

Definition at line 456 of file ossimBlendMosaic.cpp.

References ossimKeywordlist::add(), ossimString::c_str(), ossimImageMosaic::saveState(), theWeights, and ossimString::toString().

458 {
459  bool result = ossimImageMosaic::saveState(kwl, prefix);
460 
461  ossimString copyPrefix = prefix;
462  for(ossim_uint32 index = 0; index < theWeights.size(); ++index)
463  {
464  ossimString weightStr = ossimString("weight") +
465  ossimString::toString(index);
466  kwl.add(copyPrefix.c_str(),
467  weightStr.c_str(),
468  theWeights[index],
469  true);
470  }
471 
472  return result;
473 }
static ossimString toString(bool aValue)
Numeric to string methods.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
vector< double > theWeights
unsigned int ossim_uint32
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setAllWeightsTo()

void ossimBlendMosaic::setAllWeightsTo ( double  value)

Definition at line 529 of file ossimBlendMosaic.cpp.

References theWeights.

530 {
531  for(ossim_uint32 index = 0; index < theWeights.size(); ++index)
532  {
533  theWeights[index] = value;
534  }
535 }
vector< double > theWeights
unsigned int ossim_uint32

◆ setNumberOfWeights()

void ossimBlendMosaic::setNumberOfWeights ( ossim_uint32  numberOfWeights)

Definition at line 509 of file ossimBlendMosaic.cpp.

References theWeights.

510 {
511  if(numberOfWeights > theWeights.size())
512  {
513  ossim_uint32 length = numberOfWeights - (ossim_uint32) theWeights.size();
514  for(ossim_uint32 index= 0; index < length; ++ index)
515  {
516  theWeights.push_back(1.0);
517  }
518  }
519  else if(numberOfWeights < theWeights.size())
520  {
521  // copy the list
522  vector<double> temp(theWeights.begin(),
523  theWeights.begin()+numberOfWeights);
524  // now shrink
525  theWeights = temp;
526  }
527 }
vector< double > theWeights
unsigned int ossim_uint32

◆ setWeight()

void ossimBlendMosaic::setWeight ( ossim_uint32  index,
double  weight 
)

Definition at line 568 of file ossimBlendMosaic.cpp.

References theWeights.

569 {
570  if(index < theWeights.size())
571  {
572  theWeights[index] = weight;
573  }
574 }
vector< double > theWeights

◆ setWeights()

void ossimBlendMosaic::setWeights ( const std::vector< double > &  weights)

Definition at line 576 of file ossimBlendMosaic.cpp.

References theWeights.

577 {
578  theWeights = weights;
579 }
vector< double > theWeights

Member Data Documentation

◆ theNormResult

ossimRefPtr<ossimImageData> ossimBlendMosaic::theNormResult
protected

Definition at line 59 of file ossimBlendMosaic.h.

Referenced by combineNorm(), getTile(), and initialize().

◆ theWeights

vector<double> ossimBlendMosaic::theWeights
protected

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