Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-mrsid / sdk / include / base / lti_rawImageWriter.h @ 20023

History | View | Annotate | Download (2.64 KB)

1
/* $Id: lti_rawImageWriter.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 LTIRAWIMAGEWRITER_H
14
#define LTIRAWIMAGEWRITER_H
15

    
16
// lt_lib_mrsid_core
17
#include "lti_geoFileImageWriter.h"
18

    
19

    
20
LT_BEGIN_NAMESPACE(LizardTech)
21

    
22
#if defined(LT_COMPILER_MS)
23
   #pragma warning(push,4)
24
#endif
25

    
26
class LTIReusableBSQBuffer;
27

    
28
/**
29
 * class for writing RAW files
30
 *
31
 * This class writes an image to a stream in RAW format.
32
 *
33
 * The RAW format used is simple packed BIP form.
34
 */
35
class LTIRawImageWriter : public LTIGeoFileImageWriter
36
{
37
public:
38
   /**
39
    * default constructor
40
    *
41
    * This constructor creates an LTIRawImageWriter which will write the
42
    * pixels of the given image to the given stream.
43
    *
44
    * @param  image   the image to be read from  
45
    */
46
   LTIRawImageWriter(LTIImageStage* image);
47

    
48
   /**
49
    * destructor
50
    */
51
   virtual ~LTIRawImageWriter();
52

    
53
   /**
54
    * initializer
55
    */
56
   virtual LT_STATUS initialize();
57

    
58
   LTILayout getLayout() const { return m_layout; };
59

    
60
   virtual LT_STATUS writeBegin(const LTIScene& scene);
61
   virtual LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
62

    
63
   /**
64
    * set layout
65
    *
66
    * This function is used to determine the layout of the output
67
    * image, i.e. BIP or BIL or BSQ.
68
    *
69
    * @param layout the layout to use
70
    */
71
   void setLayout(LTILayout layout);
72

    
73
   /**
74
    * set byte order
75
    *
76
    * This function is used to determine byte ordering of the output file.
77
    *
78
    * @param byteOrder the byte ordering to use
79
    */
80
   void setByteOrder(LTIEndian byteOrder);
81

    
82
protected:
83
   LTILayout m_layout;
84
   LTIEndian m_byteOrder;
85

    
86
private:
87
   lt_uint32 m_fullWidth;
88
   lt_uint32 m_fullHeight;
89
   lt_uint32 m_curRow;
90
   LTIReusableBSQBuffer* m_stripBuffer;
91

    
92
   // nope
93
   LTIRawImageWriter(LTIRawImageWriter&);
94
   LTIRawImageWriter& operator=(const LTIRawImageWriter&);
95
};
96

    
97

    
98
LT_END_NAMESPACE(LizardTech)
99

    
100
#if defined(LT_COMPILER_MS)
101
        #pragma warning(pop)
102
#endif
103

    
104
#endif // LTIRAWIMAGEWRITER_H