OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimInfo.h
Go to the documentation of this file.
1 //---
2 // File: ossimInfo.h
3 //
4 // License: MIT
5 //
6 // Author: David Burken
7 //
8 // Description: ossimInfo class declaration
9 //
10 // See class doxygen descriptions below for more.
11 //
12 //---
13 // $Id$
14 
15 #ifndef ossimInfo_HEADER
16 #define ossimInfo_HEADER 1
17 
21 #include <ossim/base/ossimRefPtr.h>
23 #include <ossim/util/ossimTool.h>
24 #include <ostream>
25 
26 class ossimGpt;
27 
37 {
38 public:
40  static const char* DESCRIPTION;
41 
43  ossimInfo();
44 
46  virtual ~ossimInfo();
47 
52  virtual void setUsage(ossimArgumentParser& ap);
53 
64  virtual bool initialize(ossimArgumentParser& ap);
65 
74  virtual bool execute();
75 
76  virtual ossimString getClassName() const { return "ossimInfo"; }
77 
85  ossim_uint32 executeImageOptions(const ossimFilename& file);
86 
103  void getImageInfo( const ossimFilename& file,
104  bool dumpFlag,
105  bool dnoFlag,
106  bool imageGeomFlag,
107  bool imageInfoFlag,
108  bool metaDataFlag,
109  bool paletteFlag,
110  ossimKeywordlist& kwl ) const;
111 
125  bool getImageInfo( const ossimFilename& file,
126  ossim_uint32 entry,
127  ossimKeywordlist& kwl ) const;
128 
134  void openImage(const ossimFilename& file);
135 
141  void openImageFromState(const ossimFilename& file);
142 
144  void closeImage();
145 
150  ossimRefPtr<ossimImageHandler> getImageHandler();
151 
153  void prettyPrint(const ossimFilename& file) const;
154 
162  void dumpImage(const ossimFilename& file,
163  bool dnoFlag,
164  ossimKeywordlist& kwl) const;
165 
171  void printFactories(bool keywordListFlag) const;
172 
179  void getImageMetadata(ossimKeywordlist& kwl) const;
180 
187  void getImagePalette(ossimKeywordlist& kwl);
188 
197  void getImageInfo(ossimKeywordlist& kwl, bool dnoFlag);
198 
213  bool getImageInfo(ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag);
214 
223  void getImageGeometryInfo(ossimKeywordlist& kwl, bool dnoFlag);
224 
239  bool getImageGeometryInfo( ossim_uint32 entry,
240  ossimKeywordlist& kwl,
241  bool dnoFlag );
242 
247  void getCenterImage(ossimKeywordlist& kwl);
248 
253  void getImageBounds(ossimKeywordlist& kwl);
254 
259  void getCenterGround(ossimKeywordlist& kwl);
260 
269  void getImg2grd(ossimKeywordlist& kwl);
270 
279  void getGrd2img(ossimKeywordlist& kwl);
280 
288  void getUpIsUpAngle(ossimKeywordlist& kwl);
289 
302  void getUpIsUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl);
303 
311  void getImageToGround(ossimKeywordlist& kwl);
312 
323  void getImageToGround(ossim_uint32 entry, ossimKeywordlist& kwl);
324 
332  void getNorthUpAngle(ossimKeywordlist& kwl);
333 
346  void getNorthUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl);
347 
355  void getImageRect(ossimKeywordlist& kwl);
356 
367  void getImageRect(ossim_uint32 entry, ossimKeywordlist& kwl);
368 
372  bool isImageEntryOverview() const;
373 
375  void printConfiguration() const;
376 
382  std::ostream& printConfiguration(std::ostream& out) const;
383 
385  void printDatums() const;
386 
388  std::ostream& printDatums(std::ostream& out) const;
389 
391  void printFonts() const;
392 
394  std::ostream& printFonts(std::ostream& out) const;
395 
397  void deg2rad(const ossim_float64& degrees) const;
398 
404  std::ostream& deg2rad(const ossim_float64& degrees, std::ostream& out) const;
405 
411  std::ostream& ecef2llh(const ossimEcefPoint& ecefPoint, std::ostream& out) const;
412 
414  void rad2deg(const ossim_float64& radians) const;
415 
421  std::ostream& rad2deg(const ossim_float64& radians, std::ostream& out) const;
422 
424  void ft2mtrs(const ossim_float64& feet, bool us_survey) const;
425 
431  std::ostream& ft2mtrs(const ossim_float64& feet, bool us_survey, std::ostream& out) const;
432 
434  void mtrs2ft(const ossim_float64& meters, bool us_survey) const;
435 
441  std::ostream& mtrs2ft(const ossim_float64& meters, bool us_survey, std::ostream& out) const;
442 
447  void mtrsPerDeg(const ossim_float64& latitude) const;
448 
455  std::ostream& mtrsPerDeg(const ossim_float64& latitude, std::ostream& out) const;
456 
462  void outputHeight(const ossimGpt& gpt) const;
463 
470  std::ostream& outputHeight(const ossimGpt& gpt, std::ostream& out) const;
471 
473  void printExtensions() const;
474 
480  std::ostream& printExtensions(std::ostream& out) const;
481 
483  void printPlugins() const;
484 
490  std::ostream& printPlugins(std::ostream& out) const;
491 
497  void testPlugin(const ossimFilename& plugin) const;
498 
506  std::ostream& testPlugin(const ossimFilename& plugin, std::ostream& out) const;
507 
509  void printOverviewTypes() const;
510 
512  std::ostream& printOverviewTypes(std::ostream& out) const;
513 
515  void printProjections() const;
516 
518  std::ostream& printProjections(std::ostream& out) const;
519 
521  void printReaderProps() const;
522 
524  std::ostream& printReaderProps(std::ostream& out) const;
525 
527  void printResamplerFilters() const;
528 
530  std::ostream& printResamplerFilters(std::ostream& out) const;
531 
533  void printWriters() const;
534 
536  std::ostream& printWriters(std::ostream& out) const;
537 
539  void printWriterProps() const;
540 
542  std::ostream& printWriterProps(std::ostream& out) const;
543 
545  void printZoomLevelGsds() const;
546 
548  std::ostream& printZoomLevelGsds(std::ostream& out) const;
549 
555  void getRadiometry(ossimScalarType scalar, std::string& s) const;
556 
561  void getBuildDate(std::string& s) const;
562 
567  void getRevisionNumber(std::string& s) const;
568 
573  void getVersion(std::string& s) const;
574 
575 private:
576 
582  void getImageMetadata( const ossimImageHandler* ih,
583  ossimKeywordlist& kwl ) const;
584 
590  void getImagePalette( ossimImageHandler* ih,
591  ossimKeywordlist& kwl ) const;
592 
599  void getImageInfo( ossimImageHandler* ih,
600  ossimKeywordlist& kwl,
601  bool dnoFlag ) const;
602 
612  bool getImageInfo( ossimImageHandler* ih,
613  ossim_uint32 entry,
614  ossimKeywordlist& kwl,
615  bool dnoFlag ) const;
616 
623  void getImageGeometryInfo( ossimImageHandler* ih,
624  ossimKeywordlist& kwl,
625  bool dnoFlag ) const;
626 
636  bool getImageGeometryInfo( ossimImageHandler* ih,
637  ossim_uint32 entry,
638  ossimKeywordlist& kwl,
639  bool dnoFlag ) const;
640 
641  void getCenterImage( ossimImageHandler* ih,
642  ossimKeywordlist& kwl ) const;
643  void getCenterImage( ossimImageHandler* ih,
644  ossim_uint32 entry,
645  ossimKeywordlist& kwl ) const;
646 
647  void getImageBounds( ossimImageHandler* ih,
648  ossimKeywordlist& kwl ) const;
649  void getImageBounds( ossimImageHandler* ih,
650  ossim_uint32 entry,
651  ossimKeywordlist& kwl ) const;
652 
653  void getCenterGround( ossimImageHandler* ih,
654  ossimKeywordlist& kwl ) const;
655  void getCenterGround( ossimImageHandler* ih,
656  ossim_uint32 entry,
657  ossimKeywordlist& kwl ) const;
658 
667  void getImg2grd( ossimImageHandler* ih,
668  ossimKeywordlist& kwl ) const;
679  void getImg2grd( ossimImageHandler* ih,
680  ossim_uint32 entry,
681  ossimKeywordlist& kwl ) const;
682 
691  void getGrd2img( ossimImageHandler* ih,
692  ossimKeywordlist& kwl ) const;
703  void getGrd2img( ossimImageHandler* ih,
704  ossim_uint32 entry,
705  ossimKeywordlist& kwl ) const;
706 
711  void getUpIsUpAngle( ossimImageHandler* ih,
712  ossimKeywordlist& kwl ) const;
713 
720  void getUpIsUpAngle( ossimImageHandler* ih,
721  ossim_uint32 entry,
722  ossimKeywordlist& kwl ) const;
723 
728  void getNorthUpAngle( ossimImageHandler* ih,
729  ossimKeywordlist& kwl ) const;
730 
737  void getNorthUpAngle( ossimImageHandler* ih,
738  ossim_uint32 entry,
739  ossimKeywordlist& kwl ) const;
740 
746  void getImageRect( ossimImageHandler* ih,
747  ossimKeywordlist& kwl ) const;
748 
755  void getImageRect( ossimImageHandler* ih,
756  ossim_uint32 entry,
757  ossimKeywordlist& kwl ) const;
758 
773  bool getRgbBands( ossimImageHandler* ih,
774  ossim_uint32 entry,
775  ossimKeywordlist& kwl ) const;
776 
778  bool isImageEntryOverview( const ossimImageHandler* ih ) const;
779 
784  void outputXml( const ossimKeywordlist& kwl ) const;
785 
791  void outputXml( const ossimKeywordlist& kwl, const ossimFilename& file ) const;
792 
799  ossimRefPtr<ossimImageHandler> openImageHandler(const ossimFilename& file) const;
800 
802  bool keyIsTrue( const std::string& key ) const;
803 
806 };
807 
808 #endif /* #ifndef ossimInfo_HEADER */
static const char * DESCRIPTION
Used by ossimUtilityFactory.
Definition: ossimInfo.h:40
Represents serializable keyword/value map.
#define rad2deg(d)
void getBuildDate(std::string &s) const
Gets build date.
Definition: ossimTool.cpp:161
ossimRefPtr< ossimImageHandler > m_img
Holds the open image.
Definition: ossimInfo.h:805
double ossim_float64
void getVersion(std::string &s) const
Gets version.
Definition: ossimTool.cpp:179
virtual void setUsage(ossimArgumentParser &ap)
Initializes the aurgument parser with expected parameters and options.
Definition: ossimTool.cpp:41
unsigned int ossim_uint32
virtual ossimString getClassName() const
Definition: ossimInfo.h:76
virtual bool initialize(ossimArgumentParser &ap)
Initializes from command line arguments.
Definition: ossimTool.cpp:58
virtual bool execute()=0
Writes product to output file if applicable.
#define deg2rad(d)
double ft2mtrs(double feet)
Definition: ossimCommon.h:372
ossimScalarType
This class defines an abstract Handler which all image handlers(loaders) should derive from...
#define OSSIM_DLL
ossimInfo class.
Definition: ossimInfo.h:36
double mtrs2ft(double meters)
Definition: ossimCommon.h:374
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23