16 static const ossimTrace traceDebug(
"ossimImageMosaic:debug");
48 return getNextTile(layerIdx, 0, tileRect, resLevel);
75 if((w*h)!=(tileW*tileH))
100 return combine(static_cast<ossim_uint8>(0),
115 return combine(static_cast<ossim_sint8>(0),
131 return combine(static_cast<float>(0),
151 return combine(static_cast<ossim_uint16>(0),
166 return combine(static_cast<ossim_sint16>(0),
181 return combine(static_cast<ossim_sint32>(0),
196 return combine(static_cast<ossim_uint32>(0),
212 return combine(static_cast<double>(0),
228 <<
" Not supported by ossimImageMosaic" << endl;
253 const char* prefix)
const 276 if(!currentImageData)
295 for(band = 0; band < minNumberOfBands; ++band)
297 srcBands[band] =
static_cast<float*
>(currentImageData->
getBuf(band));
298 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(band));
310 srcBands[band] =
static_cast<float*
>(srcBands[minNumberOfBands - 1]);
311 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(minNumberOfBands - 1));
320 while(currentImageData.
valid())
336 for(band = 0; band < minNumberOfBands; ++band)
338 srcBands[band] =
static_cast<float*
>(currentImageData->
getBuf(band));
339 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(band));
345 srcBands[band] = srcBands[minNumberOfBands - 1];
346 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
355 float delta = destBandsMaxPix[band] - destBandsMinPix[band];
356 float minP = destBandsMinPix[band];
358 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
360 destBands[band][offset] =
361 (T)( minP + delta*srcBands[band][offset]);
369 float delta = destBandsMaxPix[band] - destBandsMinPix[band];
370 float minP = destBandsMinPix[band];
372 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
374 if (destBands[band][offset] == destBandsNullPix[band])
376 if (srcBands[band][offset] != srcBandsNullPix[band])
378 destBands[band][offset] =
379 (T)(minP + delta*srcBands[band][offset]);
387 destinationStatus = destination->
validate();
401 delete [] srcBandsNullPix;
402 delete [] destBandsNullPix;
403 delete [] destBandsMinPix;
404 delete [] destBandsMaxPix;
421 if (!currentImageData)
437 for(band = 0; band < minNumberOfBands; ++band)
439 srcBands[band] =
static_cast<T*
>(currentImageData->
getBuf(band));
441 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(band));
448 srcBands[band] =
static_cast<T*
>(srcBands[minNumberOfBands - 1]);
450 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
455 while(currentImageData.
valid())
471 for(band = 0; band < minNumberOfBands; ++band)
473 srcBands[band] =
static_cast<T*
>(currentImageData->
getBuf(band));
474 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(band));
480 srcBands[band] = srcBands[minNumberOfBands - 1];
481 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
490 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
492 destBands[band][offset] = srcBands[band][offset];
501 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
503 if(destBands[band][offset] == destBandsNullPix[band])
505 destBands[band][offset] = srcBands[band][offset];
512 destinationStatus = destination->
validate();
519 currentImageData =
getNextTile(layerIdx, tileRect, resLevel);
525 delete [] srcBandsNullPix;
526 delete [] destBandsNullPix;
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
ossimRefPtr< ossimImageData > theTile
virtual const ossim_float64 * getMaxPix() const
virtual ossim_uint32 getNumberOfBands() const
ossimRefPtr< ossimImageData > combineNorm(T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
This will be a base for all combiners.
Represents serializable keyword/value map.
virtual ossimRefPtr< ossimImageData > getNextNormTile(ossim_uint32 &returnedIdx, const ossim_uint32 index, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossim_uint32 height() const
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
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)
An image mosaic is a simple combiner that will just do a simple mosaic.
virtual void initialize()
Initialize the data buffer.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void setHeight(ossim_uint32 height)
void allocate()
Called on first getTile, will initialize all data needed.
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual void initialize()
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
static ossimImageDataFactory * instance()
ossimRefPtr< ossimImageData > combine(T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossim_uint32 theLargestNumberOfInputBands
virtual ossimDataObjectStatus validate() const
virtual void initialize()
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
virtual const ossim_float64 * getNullPix() const
32 bit normalized floating point
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual void setWidth(ossim_uint32 width)
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
virtual bool hasDifferentInputs() const
virtual void setOrigin(const ossimIpt &origin)
virtual const ossim_float64 * getMinPix() 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)
virtual const void * getBuf() const
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
#define RTTI_DEF1(cls, name, b1)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
Method to the load (recreate) the state of an object from a keyword list.
ossimDataObjectStatus
Definitions for data object status.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
Method to save the state of an object to a keyword list.
virtual ~ossimImageMosaic()
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
16 bit unsigned integer (12 bits used)