OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTiffOverviewBuilder.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: David Burken
8 //
9 // Description:
10 //
11 // Contains class declaration for TiffOverviewBuilder.
12 //
13 //*******************************************************************
14 // $Id: ossimTiffOverviewBuilder.h 22232 2013-04-13 20:06:19Z dburken $
15 
16 #ifndef ossimTiffOverviewBuilder_HEADER
17 #define ossimTiffOverviewBuilder_HEADER
18 
19 #include <vector>
20 
23 
26 
27 #include <tiffio.h>
28 
30 class ossimFilename;
31 class ossimImageGeometry;
32 
34  :
36 {
37 public:
38 
39  enum
40  {
41  DEFAULT_COMPRESS_QUALITY=75
42  };
43 
46 
48  virtual ~ossimTiffOverviewBuilder();
49 
53  void setResampleType(ossimFilterResampler::ossimFilterResamplerType resampleType);
54 
66  bool buildOverview(const ossimFilename& overview_file,
67  bool copy_all=false);
68 
82  virtual bool execute();
83 
94  void setCompressionType(ossim_uint16 compression_type);
95 
102  void setJpegCompressionQuality(ossim_int32 quality);
103 
109  bool getCopyAllFlag() const;
110 
116  void setInternalOverviewsFlag(bool flag);
117 
119  bool getInternalOverviewsFlag() const;
120 
126  void setCopyAllFlag(bool flag);
127 
129  virtual ossimObject* getObject();
130 
134  virtual const ossimObject* getObject() const;
135 
139  virtual bool canConnectMyInputTo(ossim_int32 index,
140  const ossimConnectableObject* obj) const;
141 
150  virtual bool setInputSource(ossimImageHandler* imageSource);
151 
157  virtual void setOutputFile(const ossimFilename& file);
158 
171  virtual ossimFilename getOutputFile() const;
172 
173  void setOutputTileSize(const ossimIpt& tileSize);
174 
188  virtual bool setOverviewType(const ossimString& type);
189 
195  virtual ossimString getOverviewType() const;
196 
202  virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
203 
212  virtual void setProperty(ossimRefPtr<ossimProperty> property);
213 
219  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
220 
221 private:
222 
226  bool writeR0(TIFF* tif);
227 
234  bool writeRn(ossimImageHandler* imageHandler,
235  TIFF* tif,
236  ossim_uint32 resLevel,
237  bool firstResLevel);
238 
247  bool setTags(TIFF* tif,
248  const ossimIrect& outputRect,
249  ossim_int32 resLevel) const;
250 
259  bool setGeotiffTags(const ossimImageGeometry* geom,
260  const ossimDrect& boundingRect,
261  ossim_uint32 resLevel,
262  TIFF* tif);
263 
264  TIFF* openTiff( const ossimString& filename ) const;
265 
266  void closeTiff(TIFF* tif);
267 
272  bool buildInternalOverviews() const;
273 
278  bool copyR0() const;
279 
280  // Disallow these...
283 
284  std::vector<ossim_uint8> m_nullDataBuffer;
295  std::vector<double> m_nullPixelValues;
300 
301 TYPE_DATA
302 };
303 
304 #endif
virtual ossimString getOverviewType() const =0
Gets the overview type.
std::vector< double > m_nullPixelValues
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual bool setInputSource(ossimImageHandler *imageSource)
Sets the input to the builder.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
unsigned short ossim_uint16
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual bool execute()=0
Builds the overviews.
unsigned int ossim_uint32
ossimFilterResampler::ossimFilterResamplerType m_resampleType
struct tiff TIFF
virtual void getTypeNameList(std::vector< ossimString > &typeList) const =0
Method to populate class supported types.
virtual void setOutputFile(const ossimFilename &file)=0
Sets the output file name.
virtual bool setOverviewType(const ossimString &type)=0
Sets the overview output type.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
virtual ossimObject * getObject()=0
const ossimSource & operator=(const ossimSource &rhs)
This class defines an abstract Handler which all image handlers(loaders) should derive from...
std::vector< ossim_uint8 > m_nullDataBuffer
#define OSSIM_DLL
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
required to be overriden by derived classes
virtual ossimFilename getOutputFile() const =0
Gets the output file name.
int ossim_int32