13 #if defined(__BORLANDC__) 56 static ossimTrace traceDebug(
"ossimJpegTileSource:debug");
73 jpeg_destroy_decompress( &
theCinfo );
89 theBufferRect(0, 0, 0, 0),
90 theImageRect(0, 0, 0, 0),
109 theBufferRect(0, 0, 0, 0),
110 theImageRect(0, 0, 0, 0),
132 theBufferRect(0, 0, 0, 0),
133 theImageRect(0, 0, 0, 0),
139 static const char MODULE[]
140 =
"ossimJpegTileSource::ossimJpegTileSource";
148 <<
"\nCannot open: " << jpeg_file
216 <<
"ossimJpegTileSource::allocate DEBUG:" 313 <<
"tiles high: " << number_of_cache_tiles
320 for (
int tileIdx = 0; tileIdx < number_of_cache_tiles; ++tileIdx)
326 if (tempTile.
valid())
350 if (start_line < thePrivateData->theCinfo.output_scanline)
384 for (
ossim_uint32 sample = 0; sample < SAMPLES; ++sample)
395 buf[band] += SAMPLES;
430 const char* prefix)
const 470 static const char MODULE[] =
"ossimJpegTileSource::open";
488 << MODULE <<
"\nERROR:\n" 501 if( c[0] != 0xFF || c[1] != 0xD8 )
506 << MODULE <<
" NOTICE:\n" 507 <<
"Not a jpeg file..." << endl;
555 if(name ==
"file_type")
565 propertyNames.push_back(
"file_type");
589 static const char MODULE[] =
"ossimJpegTileSource::isValidRLevel";
591 if (reduced_res_level == 0)
601 cerr << MODULE <<
" Invalid reduced_res_level: " << reduced_res_level
613 if (reduced_res_level == 0)
630 if (reduced_res_level == 0)
virtual void deleteCache(ossimAppFixedCacheId cacheId)
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
static ossimImageGeometryRegistry * instance()
ossimRefPtr< ossimImageGeometry > theGeometry
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
OSSIM_DLL void ossimJpegStdIOSrc(jpeg_decompress_struct *cinfo, FILE *infile)
Method which uses memory instead of a FILE* to read from.
virtual ossim_uint32 getNumberOfBands() const
ossimFilename theImageFile
virtual void setImageRectangle(const ossimIrect &rect)
virtual ossimString getLongName() const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
Gets a list of property names available.
virtual const ossim_uint8 * getUcharBuf() const
Represents serializable keyword/value map.
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry() const
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 =0
Pure virtual, derived classes must implement.
ossimRefPtr< ossimImageData > theTile
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
Gets a property for matching name.
ossim_uint32 height() const
ossim_uint8 * theLineBuffer
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
Returns the zero based image rectangle for the reduced resolution data set (rrds) passed in...
OSSIM_DLL void defaultTileSize(ossimIpt &tileSize)
const ossimIpt & ul() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
static const ossimErrorCode OSSIM_ERROR
virtual bool open(const ossimFilename &file)
open method.
virtual bool extendGeometry(ossimImageHandler *handler) const
void ref() const
increment the reference count by one, indicating that this object has another pointer which is refere...
virtual void initialize()
Initialize the data buffer.
static ossimAppFixedTileCache * instance(ossim_uint32 maxSize=0)
virtual ossimObject * dup() const
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
virtual bool isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
bool completely_within(const ossimIrect &rect) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual void loadTile(const void *src, const ossimIrect &src_rect, ossimInterleaveType il_type)
#define RTTI_DEF1_INST(cls, name, b1)
virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData *result)
Method to get an overview tile.
static ossimImageDataFactory * instance()
virtual ossimDataObjectStatus validate() const
virtual const ossimFilename & getFilename() const
Returns the filename.
ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId
struct jpeg_error_mgr theJerr
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual ossimIrect getImageRectangle() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void fillTile(const ossimIrect &clip_rect, ossimImageData *tile)
const ossimIpt & lr() const
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
bool isOpen() const
Derived classes must implement this method to be concrete.
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
ossimErrorCode theErrorStatus
void initImageParameters(ossimImageGeometry *geom) const
Convenience method to set things needed in the image geometry from the image handler.
ossimIrect clipToRect(const ossimIrect &rect) const
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it...
virtual ossimRefPtr< ossimImageGeometry > getExternalImageGeometry() const
Returns the image geometry object associated with this tile source or NULL if non defined...
void set_lrx(ossim_int32 x)
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual ossim_uint32 getTileHeight() const
Returns the height of the output tile.
virtual void makeBlank()
Initializes data to null pixel values.
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
virtual void completeOpen()
Will complete the opening process.
PrivateData * thePrivateData
virtual bool open()
Returns true if no errors initializing object.
ossimRefPtr< ossimImageHandler > theOverview
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
ossimRefPtr< ossimImageData > theCacheTile
ossim_uint32 theNumberOfBands
virtual ossimString getShortName() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
void stretchToTileBoundary(const ossimIpt &tileWidthHeight)
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 getTileWidth() const
Returns the width of the output tile.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &rect, ossim_uint32 resLevel=0)
Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab fr...
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
struct jpeg_decompress_struct theCinfo
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
Returns the number of lines in the image.
ossimAppFixedCacheId newTileCache(const ossimIrect &tileBoundaryRect, const ossimIpt &tileSize=ossimIpt(0, 0))
bool isValidRLevel(ossim_uint32 reduced_res_level) const
Determines if the passed in reslution level is valid.
ossimRefPtr< ossimProjection > getProjection(const ossimDrect &imageRect) const
Method to get a projection if possible.
int completely_within(extent_type extent1, extent_type extent2)
unsigned char ossim_uint8
virtual ~ossimJpegTileSource()
ossimRefPtr< ossimImageData > addTile(ossimAppFixedCacheId cacheId, ossimRefPtr< ossimImageData > data, bool duplicateData=true)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
Returns the number of samples in the image.
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
Returns the number of bands in the image.
void set_ulx(ossim_int32 x)