21 static const ossimTrace traceDebug(
"ossimMaxMosaic:debug");
52 return getNextTile(layerIdx, 0, tileRect, resLevel);
78 if((w*h)!=(tileW*tileH))
102 return combine(static_cast<ossim_uint8>(0),
117 return combine(static_cast<ossim_sint8>(0),
133 return combine(static_cast<float>(0),
153 return combine(static_cast<ossim_uint16>(0),
168 return combine(static_cast<ossim_sint16>(0),
183 return combine(static_cast<ossim_sint32>(0),
198 return combine(static_cast<ossim_uint32>(0),
214 return combine(static_cast<double>(0),
230 <<
" Not supported by ossimMaxMosaic" << endl;
255 const char* prefix)
const 277 if(!currentImageData)
279 return currentImageData;
298 for(band = 0; band < minNumberOfBands; ++band)
300 srcBands[band] =
static_cast<float*
>(currentImageData->
getBuf(band));
301 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(band));
312 srcBands[band] =
static_cast<float*
>(srcBands[minNumberOfBands - 1]);
313 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(minNumberOfBands - 1));
326 if(band < currentImageData->getNumberOfBands())
329 (
float*)currentImageData->
getBuf(band));
337 (
float*)currentImageData->
getBuf(tempBandIdx-1));
345 while(currentImageData.
valid())
355 for(band = 0; band < minNumberOfBands; ++band)
357 srcBands[band] =
static_cast<float*
>(currentImageData->
getBuf(band));
358 srcBandsNullPix[band] =
static_cast<float>(currentImageData->
getNullPix(band));
364 srcBands[band] = srcBands[minNumberOfBands - 1];
365 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
375 float delta = destBandsMaxPix[band] - destBandsMinPix[band];
376 float minP = destBandsMinPix[band];
377 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
379 destBands[band][offset] = (T)( minP + delta*srcBands[band][offset]);
390 float delta = destBandsMaxPix[band] - destBandsMinPix[band];
391 float minP = destBandsMinPix[band];
397 if(destBands[band][offset] == destBandsNullPix[band])
399 destBands[band][offset] = (T)(minP + delta*srcBands[band][offset]);
428 if(!currentImageData)
430 return currentImageData;
444 for(band = 0; band < minNumberOfBands; ++band)
446 srcBands[band] =
static_cast<T*
>(currentImageData->
getBuf(band));
448 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(band));
455 srcBands[band] =
static_cast<T*
>(srcBands[minNumberOfBands - 1]);
457 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
465 T* destBand = destBands[band];
466 T* srcBand = srcBands[band];
467 if(destBand&&srcBand)
469 for(offset = 0; offset < upperBound;++offset)
471 *destBand = *srcBand;
472 ++srcBand; ++destBand;
482 while(currentImageData.
valid())
488 for(band = 0; band < minNumberOfBands; ++band)
490 srcBands[band] =
static_cast<T*
>(currentImageData->
getBuf(band));
491 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(band));
497 srcBands[band] = srcBands[minNumberOfBands - 1];
498 srcBandsNullPix[band] =
static_cast<T
>(currentImageData->
getNullPix(minNumberOfBands - 1));
512 if(srcBands[bandIndex][offset] > destBands[bandIndex][offset])
514 destBands[bandIndex][offset] = srcBands[bandIndex][offset];
524 for(
ossim_uint32 offset = 0; offset < upperBound; ++offset)
526 if(srcBands[band][offset] > destBands[band][offset])
528 destBands[band][offset] = srcBands[band][offset];
536 currentImageData =
getNextTile(layerIdx,tileRect, resLevel);
540 delete [] srcBandsNullPix;
542 delete [] destBandsNullPix;
558 return ossimString(
"Combiner which puts maximum dn value on image.");
16 bit unsigned integer (15 bits used)
virtual ossim_uint32 getWidth() const
virtual ossimString getLongName() const
virtual const ossim_float64 * getMaxPix() const
virtual ossim_uint32 getNumberOfBands() const
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
virtual void initialize()
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 void initialize()
Initialize the data buffer.
void allocate()
Called on first getTile, will initialize all data needed.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
ossimRefPtr< ossimImageData > combine(T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual void setHeight(ossim_uint32 height)
virtual ossimRefPtr< ossimImageData > getNextTile(ossim_uint32 &returnedIdx, const ossim_uint32 startIdx, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &origin, ossim_uint32 resLevel=0)
static ossimImageDataFactory * instance()
virtual ossimString getDescription() const
ossim_uint32 theLargestNumberOfInputBands
virtual ossimDataObjectStatus validate() const
virtual void initialize()
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
32 bit normalized floating point
virtual void setWidth(ossim_uint32 width)
virtual ~ossimMaxMosaic()
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
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)
ossimRefPtr< ossimImageData > combineNorm(T, const ossimIrect &tileRect, ossim_uint32 resLevel=0)
ossimRefPtr< ossimImageData > theTile
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual const void * getBuf() const
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
virtual void setDataObjectStatus(ossimDataObjectStatus status) const
Full list found in ossimConstants.h.
#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 ossimString getShortName() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
An image mosaic is a simple combiner that will just do a simple mosaic.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
16 bit unsigned integer (12 bits used)