svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / writers / TIFFImageWriter.h @ 3539
History | View | Annotate | Download (2.74 KB)
1 |
/* $Id: TIFFImageWriter.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
2 |
/* //////////////////////////////////////////////////////////////////////////
|
3 |
// //
|
4 |
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
|
5 |
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
|
6 |
// prohibited. Access to and use of this code is permitted only under //
|
7 |
// license from LizardTech, Inc. Portions of the code are protected by //
|
8 |
// US and foreign patents and other filings. All Rights Reserved. //
|
9 |
// //
|
10 |
////////////////////////////////////////////////////////////////////////// */
|
11 |
/* PUBLIC */
|
12 |
|
13 |
#ifndef TIFFIMAGEWRITER_H
|
14 |
#define TIFFIMAGEWRITER_H
|
15 |
|
16 |
// lt_lib_mrsid_core
|
17 |
#include "lti_geoFileImageWriter.h" |
18 |
|
19 |
struct tiff;
|
20 |
|
21 |
|
22 |
LT_BEGIN_NAMESPACE(LizardTech) |
23 |
|
24 |
#if defined(LT_COMPILER_MS)
|
25 |
#pragma warning(push,4) |
26 |
#endif
|
27 |
|
28 |
class LTIPixelLookupTable; |
29 |
class LTReusableBuffer; |
30 |
|
31 |
|
32 |
/**
|
33 |
* writes an image stage to a TIFF file
|
34 |
*
|
35 |
* This class writes an image stage to a TIFF file.
|
36 |
*/
|
37 |
class TIFFImageWriter : public LTIGeoFileImageWriter |
38 |
{ |
39 |
public:
|
40 |
/**
|
41 |
* constructor
|
42 |
*
|
43 |
* Creates a writer for TIFF images.
|
44 |
*
|
45 |
* @param image the image to write from
|
46 |
*/
|
47 |
TIFFImageWriter(LTIImageStage *image); |
48 |
|
49 |
virtual ~TIFFImageWriter(); |
50 |
virtual LT_STATUS initialize(); |
51 |
|
52 |
/**
|
53 |
* Output resolution information. Set this to false to prevent writing
|
54 |
* normal TIFF resolution information.
|
55 |
*
|
56 |
* The default is to write this information.
|
57 |
*
|
58 |
* @param enable set to true to write resolution information
|
59 |
*/
|
60 |
void setWriteResolution(bool enable); |
61 |
|
62 |
LT_STATUS writeBegin(const LTIScene& scene);
|
63 |
LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
|
64 |
LT_STATUS writeEnd(); |
65 |
|
66 |
protected:
|
67 |
virtual LT_STATUS writeHeaders(lt_uint32 width, lt_uint32 height); |
68 |
static LT_STATUS getLibtiffError(void); |
69 |
|
70 |
// GeoTIFFImageWriter sets this prior to calling Super::initialize()
|
71 |
struct tiff *m_tiff;
|
72 |
double m_x_resolution;
|
73 |
double m_y_resolution;
|
74 |
|
75 |
private:
|
76 |
LT_STATUS checkImpedance() const;
|
77 |
|
78 |
typedef LTIGeoFileImageWriter Super;
|
79 |
|
80 |
LT_STATUS initMetadata(); |
81 |
LT_STATUS setColorMap(const LTIPixelLookupTable&);
|
82 |
LT_STATUS writeFieldInformation(lt_uint32 width, lt_uint32 height); |
83 |
|
84 |
bool m_writeResolution;
|
85 |
|
86 |
void init( const LTFileSpec& file ); |
87 |
char* m_tiff_file_name;
|
88 |
long m_currentRow;
|
89 |
int m_compression;
|
90 |
LTReusableBuffer* m_stripBuffer; |
91 |
|
92 |
// nope
|
93 |
TIFFImageWriter(); |
94 |
TIFFImageWriter(TIFFImageWriter&); |
95 |
TIFFImageWriter& operator=(const TIFFImageWriter&);
|
96 |
}; |
97 |
|
98 |
|
99 |
LT_END_NAMESPACE(LizardTech) |
100 |
|
101 |
#if defined(LT_COMPILER_MS)
|
102 |
#pragma warning(pop)
|
103 |
#endif
|
104 |
|
105 |
#endif // TIFFIMAGEWRITER_H |