OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimJpegTileSource.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken
6 //
7 // Description:
8 //
9 // Contains class definition for JpegTileSource.
10 //*******************************************************************
11 // $Id: ossimJpegTileSource.cpp 22117 2013-01-18 21:04:23Z dburken $
12 
13 #if defined(__BORLANDC__)
14 # include <iostream>
15 using std::size_t;
16 # include <stdlib.h>
17 # include <stdio.h>
18 #endif
19 
20 extern "C"
21 {
22 #include <stdio.h>
23 #include <jpeglib.h>
24 #include <setjmp.h>
25 }
26 
30 #include <ossim/base/ossimDpt.h>
31 #include <ossim/base/ossimDrect.h>
33 #include <ossim/base/ossimIpt.h>
34 #include <ossim/base/ossimIrect.h>
36 #include <ossim/base/ossimNotify.h>
38 #include <ossim/base/ossimTrace.h>
48 
49 //---
50 // Using windows .NET compiler there is a conflict in the libjpeg with INT32
51 // in the file jmorecfg.h. Defining XMD_H fixes this.
52 //---
53 
55 
56 static ossimTrace traceDebug("ossimJpegTileSource:debug");
57 
59 {
60 public:
62  :theCinfo(),
63  theJerr()
64  {
65 
66  }
67  virtual ~PrivateData()
68  {
69  clear();
70  }
71  void clear()
72  {
73  jpeg_destroy_decompress( &theCinfo );
74  }
75  struct jpeg_decompress_struct theCinfo;
76  struct jpeg_error_mgr theJerr;
77 };
78 
79 //*******************************************************************
80 // Public Constructor:
81 //*******************************************************************
83  :
85  theTile(0),
86  theCacheTile(0),
87  theLineBuffer(0),
88  theFilePtr(0),
89  theBufferRect(0, 0, 0, 0),
90  theImageRect(0, 0, 0, 0),
91  theNumberOfBands(0),
92  theCacheSize (0),
93  thePrivateData(0),
94  theCacheId(-1)
95 {
96 }
97 
98 //*******************************************************************
99 // Public Constructor:
100 //*******************************************************************
102  const char* prefix)
103  :
105  theTile(0),
106  theCacheTile(0),
107  theLineBuffer(0),
108  theFilePtr(0),
109  theBufferRect(0, 0, 0, 0),
110  theImageRect(0, 0, 0, 0),
111  theNumberOfBands(0),
112  theCacheSize (0),
113  thePrivateData(0),
114  theCacheId(-1)
115 {
116  if (loadState(kwl, prefix) == false)
117  {
119  }
120 }
121 
122 //*******************************************************************
123 // Public Constructor:
124 //*******************************************************************
126  :
128  theTile(0),
129  theCacheTile(0),
130  theLineBuffer(0),
131  theFilePtr(0),
132  theBufferRect(0, 0, 0, 0),
133  theImageRect(0, 0, 0, 0),
134  theNumberOfBands(0),
135  theCacheSize(0),
136  thePrivateData(0),
137  theCacheId(-1)
138 {
139  static const char MODULE[]
140  = "ossimJpegTileSource::ossimJpegTileSource";
141 
142  if (!open())
143  {
144 
147  << MODULE
148  << "\nCannot open: " << jpeg_file
149  << endl;
150  }
151 }
152 
153 //*******************************************************************
154 // Destructor:
155 //*******************************************************************
157 {
158  destroy();
159 }
160 
162 {
164 
165  theTile = 0;
166  theCacheTile = 0;
167 
168  if (theLineBuffer)
169  {
170  delete [] theLineBuffer;
171  theLineBuffer = 0;
172  }
173  if (theFilePtr)
174  {
175  fclose(theFilePtr);
176  theFilePtr = NULL;
177  }
178  if(thePrivateData)
179  {
180  delete thePrivateData;
181  thePrivateData = 0;
182  }
183 }
184 
186 {
187  if(theLineBuffer)
188  {
189  delete [] theLineBuffer;
190  theLineBuffer = 0;
191  }
192  // Make the cache tile the height of one tile by the image width.
195 
198 
201  theTile->initialize();
202 
203  ossimIrect cache_rect(theImageRect.ul().x,
204  theImageRect.ul().y,
205  theImageRect.ul().x + (theCacheSize.x-1),
206  theImageRect.ul().y + (theCacheSize.y-1));
207 
208  theCacheTile->setImageRectangle(cache_rect);
210 
212 
213  if (traceDebug())
214  {
216  << "ossimJpegTileSource::allocate DEBUG:"
217  << "\ncache tile size: " << theCacheSize
218  << "\nimage width: " << theImageRect.width()
219  << "\nimage height: " << theImageRect.height()
220  << "\nnumber of bands: " << theNumberOfBands
221  << endl;
222  }
223 }
224 
226  const ossimIrect& rect, ossim_uint32 resLevel)
227 {
228  if (theTile.valid())
229  {
230  // Image rectangle must be set prior to calling getTile.
231  theTile->setImageRectangle(rect);
232 
233  if ( getTile( theTile.get(), resLevel ) == false )
234  {
236  {
237  theTile->makeBlank();
238  }
239  }
240  }
241 
242  return theTile;
243 }
244 
246  ossim_uint32 resLevel)
247 {
248  bool status = false;
249 
250  //---
251  // Not open, this tile source bypassed, or invalid res level,
252  // return a blank tile.
253  //---
254  if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
255  result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
256  {
257  result->ref(); // Increment ref count.
258 
259  //---
260  // Check for overview tile. Some overviews can contain r0 so always
261  // call even if resLevel is 0. Method returns true on success, false
262  // on error.
263  //---
264  status = getOverviewTile(resLevel, result);
265 
266  if (!status) // Did not get an overview tile.
267  {
268  status = true;
269 
270  ossimIrect tile_rect = result->getImageRectangle();
271 
272  if (getImageRectangle(0).intersects(tile_rect))
273  {
274  // Make a clip rect.
275  ossimIrect clip_rect = tile_rect.clipToRect(getImageRectangle(0));
276 
277  fillTile(clip_rect, result);
278  }
279  else // No intersection...
280  {
281  result->makeBlank();
282  }
283  }
284 
285  result->unref(); // Decrement ref count.
286  }
287 
288  return status;
289 }
290 
292  ossimImageData* tile)
293 {
294  if (!theFilePtr) return;
295 
296  ossimIrect buffer_rect = clip_rect;
297  buffer_rect.stretchToTileBoundary(theCacheSize);
298  buffer_rect.set_ulx(0);
299  buffer_rect.set_lrx(getImageRectangle(0).lr().x);
300 
301  // Check for a partial tile.
302  if ( ! tile->getImageRectangle().completely_within(buffer_rect) )
303  {
304  tile->makeBlank();
305  }
306 
307  ossim_int32 number_of_cache_tiles = buffer_rect.height()/theCacheSize.y;
308 
309 #if 0
310  if (traceDebug())
311  {
313  << "tiles high: " << number_of_cache_tiles
314  << endl;
315  }
316 #endif
317 
318  ossimIpt origin = buffer_rect.ul();
319 
320  for (int tileIdx = 0; tileIdx < number_of_cache_tiles; ++tileIdx)
321  {
322  // See if it's in the cache already.
324  tempTile = ossimAppFixedTileCache::instance()->
325  getTile(theCacheId, origin);
326  if (tempTile.valid())
327  {
328  tile->loadTile(tempTile.get());
329  }
330  else
331  {
332  // Have to read from the jpeg file.
333  ossim_uint32 start_line = static_cast<ossim_uint32>(origin.y);
334  ossim_uint32 stop_line =
335  static_cast<ossim_uint32>( min(origin.y+theCacheSize.y-1,
336  getImageRectangle().lr().y) );
337  ossimIrect cache_rect(origin.x,
338  origin.y,
339  origin.x+theCacheSize.x-1,
340  origin.y+theCacheSize.y-1);
341 
342  theCacheTile->setImageRectangle(cache_rect);
343 
346  {
348  }
349 
350  if (start_line < thePrivateData->theCinfo.output_scanline)
351  {
352  // Must restart the compression process again.
353  restart();
354  }
355 
356  // Get pointers to the cache tile buffers.
357  JSAMPROW jbuf[1];
358  std::vector<ossim_uint8*> buf(theNumberOfBands);
359  ossim_uint32 band = 0;
360  for (band = 0; band < theNumberOfBands; ++band)
361  {
362  buf[band] = theCacheTile->getUcharBuf(band);
363  }
364 
365  const ossim_uint32 SAMPLES = getNumberOfSamples();
366  jbuf[0] = (JSAMPROW) theLineBuffer;
367 
368  // Gobble any not needed lines.
369  while (thePrivateData->theCinfo.output_scanline < start_line)
370  {
371  jpeg_read_scanlines(&thePrivateData->theCinfo, jbuf, 1);
372  }
373 
374  while (thePrivateData->theCinfo.output_scanline <= stop_line)
375  {
376  // Read a line from the jpeg file.
377  jpeg_read_scanlines(&thePrivateData->theCinfo, jbuf, 1);
378 
379  //---
380  // Copy the line which if band interleaved by pixel the the band
381  // separate buffers.
382  //---
383  ossim_uint32 index = 0;
384  for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)
385  {
386  for (band = 0; band < theNumberOfBands; ++band)
387  {
388  buf[band][sample] = theLineBuffer[index];
389  ++index;
390  }
391  }
392 
393  for (band = 0; band < theNumberOfBands; ++band)
394  {
395  buf[band] += SAMPLES;
396  }
397  }
399 
400  tile->loadTile(theCacheTile.get());
401 
402  // Add it to the cache for the next time.
404 
405  } // End of reading for jpeg file.
406 
407  origin.y += theCacheSize.y;
408 
409  } // for (int tile = 0; tile < number_of_cache_tiles; ++tile)
410 
411  tile->validate();
412 }
413 
414 //*******************************************************************
415 // Public Method:
416 //*******************************************************************
419 {
420  return ossimIrect(0,
421  0,
422  getNumberOfSamples(reduced_res_level) - 1,
423  getNumberOfLines(reduced_res_level) - 1);
424 }
425 
426 //*******************************************************************
427 // Public method:
428 //*******************************************************************
430  const char* prefix) const
431 {
432  return ossimImageHandler::saveState(kwl, prefix);
433 }
434 
435 //*******************************************************************
436 // Public method:
437 //*******************************************************************
439  const char* prefix)
440 {
441  if (ossimImageHandler::loadState(kwl, prefix))
442  {
443  return open();
444  }
445 
446  return false;
447 }
448 
450 {
451  destroy();
452 }
453 
454 //*******************************************************************
455 // Public method:
456 //*******************************************************************
458 {
459  theImageFile = jpeg_file;
460 
461  return open();
462 }
463 
464 //*******************************************************************
465 // Private method:I have problems
466 
467 //*******************************************************************
469 {
470  static const char MODULE[] = "ossimJpegTileSource::open";
471 
472  // Start with a clean slate.
473  destroy();
474  // Check for empty filename.
475  if (theImageFile.empty())
476  {
477  return false;
478  }
479 
480  // Open Jpeg file.
481  if((theFilePtr = fopen(theImageFile.c_str(), "rb")) == NULL)
482  {
484 
485  if (traceDebug())
486  {
488  << MODULE << "\nERROR:\n"
489  << "Could not open: " << theImageFile.c_str()
490  << endl;
491  }
492 
493  return false;
494  }
495 
496  //***
497  // Verify the file is a jpeg by checking the first two bytes.
498  //***
499  ossim_uint8 c[2];
500  fread(c, 2, 1, theFilePtr);
501  if( c[0] != 0xFF || c[1] != 0xD8 )
502  {
503  if (traceDebug())
504  {
506  << MODULE << " NOTICE:\n"
507  << "Not a jpeg file..." << endl;
508  }
509 
510  fclose(theFilePtr);
511  theFilePtr = NULL;
512  return false;
513  }
514 
515  thePrivateData = new PrivateData();
516  rewind(theFilePtr);
517 
518  //---
519  // Step 1: allocate and initialize JPEG decompression object
520  // We set up the normal JPEG error routines, then override error_exit.
521  //---
522  thePrivateData->theCinfo.err = jpeg_std_error(&thePrivateData->theJerr);
523 
524  // Initialize the JPEG decompression object.
525  jpeg_create_decompress(&thePrivateData->theCinfo);
526 
527  // Specify data source.
528  //jpeg_stdio_src(&thePrivateData->theCinfo, theFilePtr);
530 
531  // Read the file parameters with jpeg_read_header.
532  jpeg_read_header(&thePrivateData->theCinfo, TRUE);
533 
534  jpeg_start_decompress(&thePrivateData->theCinfo);
535 
536  theNumberOfBands = thePrivateData->theCinfo.output_components;
537 
539  0,
540  thePrivateData->theCinfo.output_width - 1,
541  thePrivateData->theCinfo.output_height - 1);
542 
543  theBufferRect.set_lrx(thePrivateData->theCinfo.output_width - 1);
544 
545  completeOpen();
546 
547  // Allocate memory...
548  allocate();
549 
550  return true;
551 }
552 
554 {
555  if(name == "file_type")
556  {
557  return new ossimStringProperty("file_type", "JPEG");
558  }
559  return ossimImageHandler::getProperty(name);
560 }
561 
562 void ossimJpegTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
563 {
565  propertyNames.push_back("file_type");
566 }
567 
568 //*******************************************************************
569 // Public method:
570 //*******************************************************************
572 {
573  return ( theTile.valid() ? theTile->getWidth() : 0 );
574 }
575 
576 //*******************************************************************
577 // Public method:
578 //*******************************************************************
580 {
581  return ( theTile.valid() ? theTile->getHeight() : 0 );
582 }
583 
584 //*******************************************************************
585 // Public method:
586 //*******************************************************************
588 {
589  static const char MODULE[] = "ossimJpegTileSource::isValidRLevel";
590 
591  if (reduced_res_level == 0)
592  {
593  return true;
594  }
595  else if (theOverview.valid())
596  {
597  return theOverview->isValidRLevel(reduced_res_level);
598  }
599  else
600  {
601  cerr << MODULE << " Invalid reduced_res_level: " << reduced_res_level
602  << "\nHighest available: " << (getNumberOfDecimationLevels() - 1)
603  << endl;
604  }
605  return false;
606 }
607 
608 //*******************************************************************
609 // Public method:
610 //*******************************************************************
612 {
613  if (reduced_res_level == 0)
614  {
615  return theImageRect.lr().y - theImageRect.ul().y + 1;
616  }
617  else if (theOverview.valid())
618  {
619  return theOverview->getNumberOfLines(reduced_res_level);
620  }
621 
622  return 0;
623 }
624 
625 //*******************************************************************
626 // Public method:
627 //*******************************************************************
629 {
630  if (reduced_res_level == 0)
631  {
632  return theImageRect.lr().x - theImageRect.ul().x + 1;;
633  }
634  else if (theOverview.valid())
635  {
636  return theOverview->getNumberOfSamples(reduced_res_level);
637  }
638 
639  return 0;
640 }
641 
643 {
644  return 0;
645 }
646 
648 {
649  return 0;
650 }
651 
653 {
654  return ossimString("jpg");
655 }
656 
658 {
659  return ossimString("jpg reader");
660 }
661 
663 {
664  return theNumberOfBands;
665 }
666 
668 {
669  return getNumberOfInputBands();
670 }
671 
673 {
674  return OSSIM_UCHAR;
675 }
676 
678 {
679  return (theFilePtr != NULL);
680 }
681 
683 {
684  jpeg_abort_decompress( &thePrivateData->theCinfo );
685  jpeg_destroy_decompress( &thePrivateData->theCinfo );
686 
687  // Put the theFilePtr back to the start...
688  rewind(theFilePtr);
689 
690  // Initialize the JPEG decompression object.
691  jpeg_create_decompress(&thePrivateData->theCinfo);
692 
693  // Specify data source.
695 
696  // Read the file parameters with jpeg_read_header.
697  jpeg_read_header(&thePrivateData->theCinfo, TRUE);
698 
699  jpeg_start_decompress(&thePrivateData->theCinfo);
700 }
701 
703 {
704  if ( !theGeometry )
705  {
706  // Check for external geom:
708 
709  if ( !theGeometry )
710  {
711  // Check the internal geometry first to avoid a factory call.
713 
714  // At this point it is assured theGeometry is set.
715 
716  //---
717  // WARNING:
718  // Must create/set theGeometry at this point or the next call to
719  // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
720  // as it does a recursive call back to ossimImageHandler::getImageGeometry().
721  //---
722 
723  // Check for set projection.
724  if ( !theGeometry->getProjection() )
725  {
726  // Try factories for projection.
728  }
729  }
730 
731  // Set image things the geometry object should know about.
733  }
734 
735  return theGeometry;
736 }
737 
739 {
741 
742  // See if we can pull a projection from the XMP APP1 XML block if present:
743  ossimXmpInfo info;
744  if ( info.open( getFilename() ) )
745  {
746  ossimDrect imageRect = getImageRectangle( 0 );
747  ossimRefPtr<ossimProjection> proj = info.getProjection( imageRect );
748  if ( proj.valid() )
749  {
750  geom->setProjection( proj.get() );
751  }
752  }
753 
754  return geom;
755 }
virtual void deleteCache(ossimAppFixedCacheId cacheId)
virtual ossim_uint32 getWidth() const
ossim_uint32 x
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
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.
ossim_uint32 y
bool valid() const
Definition: ossimRefPtr.h:75
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
Definition: ossimIrect.h:487
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
Definition: ossimIrect.h:274
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
Definition: ossimIrect.cpp:425
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)
Definition: ossimRtti.h:481
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
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
Definition: ossimIrect.h:276
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
Definition: ossimIrect.h:500
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
Definition: ossimIrect.cpp:501
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimScalarType
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)
Definition: ossimIrect.h:693
return status
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...
ossim_int32 y
Definition: ossimIpt.h:142
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
ossimRefPtr< ossimImageData > theCacheTile
virtual ossimString getShortName() const
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
bool empty() const
Definition: ossimString.h:411
void stretchToTileBoundary(const ossimIpt &tileWidthHeight)
Definition: ossimIrect.cpp:212
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.
ossim_int32 x
Definition: ossimIpt.h:141
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
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.
8 bit unsigned iteger
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
#define min(a, b)
Definition: auxiliary.h:75
int ossim_int32
void set_ulx(ossim_int32 x)
Definition: ossimIrect.h:657