33 d_cacheTileSize(1024),
112 if ((inputIndex == 0) && (h != NULL))
131 ossimIpt lr (origin.
x + w - 1, origin.
y + h - 1);
135 return getTile(tile_rect, rLevel);
147 std::cout <<
"TILE: " << tile_rect << std::endl;
170 std::cout <<
"WAIT LOCK: " << tile_rect << std::endl;
172 std::lock_guard<std::mutex> lock(
m_mutex);
176 std::cout <<
"START LOCK: " << tile_rect << std::endl;
189 if (temp_tile.
valid())
190 *tile = *(temp_tile.
get());
197 std::cout <<
"END LOCK: " << tile_rect << std::endl;
201 std::cout <<
"END TILE: " << tile_rect << std::endl;
217 std::lock_guard<std::mutex> lock(
m_mutex);
231 if (temp_tile.
valid())
232 *tile = *(temp_tile.
get());
386 gettimeofday(&tv, &tz);
387 tm=localtime(&tv.tv_sec);
388 printf(
"%d:%02d:%02d.%ld ", tm->tm_hour, tm->tm_min,tm->tm_sec,tv.tv_usec);
393 strftime(buf, 9,
"%H:%M:%S", gmtime(&rawTime));
394 cerr << buf << std::endl;
virtual bool open()=0
Pure virtual open.
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
ossimRefPtr< ossimImageHandler > m_adaptedHandler
OSSIM_DLL ossim_int64 getTime()
Gets the current time.
virtual void disconnectAllOutputs()
Will disconnect all of the output objects.
ossim_uint32 d_cacheTileSize
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
Intended mainly to provide a mechanism for mutex-locking access to a shared resource during a getTile...
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
const char * find(const char *key) const
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual ~ossimImageHandlerMtAdaptor()
Protected destructor forces using reference pointer for instantiation.
virtual ossim_float64 getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual ossimString getLongName() const
const ossimIpt & ul() const
void setAdaptee(ossimImageHandler *handler)
Sets the handler being adapted.
virtual void closeOverview()
If theOverview is initialized it will be deleted and set to NULL.
virtual ossim_float64 getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool canConnectMyInputTo(ossim_int32 i, const ossimConnectableObject *obj) const
Only an ossimImageHandler is allowed as input here.
virtual bool open()
Pure virtual open.
ossim_int64 getId() const
virtual ossimString getShortName() const
ossimImageHandlerMtAdaptor(ossimImageHandler *adaptee=0, bool use_cache=false, ossim_uint32 cache_tile_size=64)
void ref() const
increment the reference count by one, indicating that this object has another pointer which is refere...
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual ossimObject * dup() const
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
virtual void changeOwner(ossimObject *owner)
Permits changing the object's owner.
virtual ossim_float64 getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
const ossimId & getId() const
Will allow us to get this object's id.
static ossimTimer * instance()
virtual ossim_uint32 getImageTileHeight() const =0
Returns the tile width of the image or 0 if the image is not tiled.
double time_s() const
Get elapsed time in seconds.
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
void setTileSize(const ossimIpt &size)
Set the tile size.
virtual ossimIrect getImageRectangle() const
virtual ossimString getLongName() const
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const
Pure virtual, derived classes must implement.
virtual ossimString getShortName() const
void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it...
virtual void setOrigin(const ossimIpt &origin)
static const char * ADAPTEE_ID_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
const ConnectableObjectList & getOutputList() const
virtual ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossim_int32 connectMyOutputTo(ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
Will try to connect this objects output to the passed in object.
ossimRefPtr< ossimCacheTileSource > m_cache
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual void close()
Deletes the overview and clears the valid image vertices.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossim_uint32 getNumberOfInputBands() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const
Pure virtual, derived classes must implement.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
void setUseCache(bool use_cache)
virtual ossim_uint32 getNumberOfInputBands() const =0
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
Intercepts the getTile call intended for the adaptee and sets a mutex lock around the adaptee's getTi...
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
ossimRefPtr< ossimImageData > d_fauxTile
RTTI_DEF1(ossimImageHandlerMtAdaptor, "ossimImageHandlerMtAdaptor", ossimImageHandler)
Intended mainly to provide a mechanism for mutex-locking access to a shared resource during a getTile...
virtual void disconnectMyOutputs(ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
void setCacheTileSize(ossim_uint32 cache_tile_size)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
virtual bool removeListener(ossimListener *listener)