Statistics
| Revision:

svn-gvsig-desktop / tags / v1_1_2_Build_1043 / libraries / libjni-ecw / include / NCSJPCQuantizationParameter.h @ 33914

History | View | Annotate | Download (2.38 KB)

1 3538 nacho
/********************************************************
2
** Copyright 2002 Earth Resource Mapping Ltd.
3
** This document contains proprietary source code of
4
** Earth Resource Mapping Ltd, and can only be used under
5
** one of the three licenses as described in the
6
** license.txt file supplied with this distribution.
7
** See separate license.txt file for license details
8
** and conditions.
9
**
10
** This software is covered by US patent #6,442,298,
11
** #6,102,897 and #6,633,688.  Rights to use these patents
12
** is included in the license agreements.
13
**
14
** FILE:     $Archive: /NCS/Source/include/NCSJPCQuantizationParameter.h $
15
** CREATED:  13/12/2002 3:27:34 PM
16
** AUTHOR:   Simon Cope
17
** PURPOSE:  CNCSJPCQuantizationParameter class header
18
** EDITS:    [xx] ddMmmyy NAME COMMENTS
19
 *******************************************************/
20
21
#ifndef NCSJPCQUANTIZATIONPARAMETER_H
22
#define NCSJPCQUANTIZATIONPARAMETER_H
23
24
#include "NCSJPCMarker.h"
25
26
        /**
27
         * CNCSJPCQuantizationParameter class - the JPC Quantization Parameters.
28
         *
29
         * @author       Simon Cope
30
         * @version      $Revision$ $Author$ $Date$
31
         */
32
class NCSJPC_EXPORT_ALL CNCSJPCQuantizationParameter {
33
public:
34
        typedef enum {
35
                NONE                                = 0x0,
36
                SCALAR_DERIVED                = 0x1,
37
                SCALAR_EXPOUNDED        = 0x2
38
        } Style;
39
40
        typedef struct {
41
                Style        m_eStyle;
42
                UINT8                                m_nGuardBits;
43
        } Values;
44
45
        typedef struct {
46
                UINT16                m_nMantissa;
47
                UINT8                m_nExponent;
48
        } Irreversible;
49
50
        typedef union {
51
                UINT8                        m_nReversible;
52
                Irreversible        m_Irreversible;
53
        } Parameters;
54
55
        Values                m_Sqc;
56
        std::vector<Parameters>        m_SPqc;
57
58
                /** Default constructor, initialises members */
59
        CNCSJPCQuantizationParameter();
60
                /** Virtual destructor */
61
        virtual ~CNCSJPCQuantizationParameter();
62
63
                /**
64
                 * Parse the fields from the JPC codestream.
65
                 * @param                JPC                        CNCSJPC to use to parse file.
66
                 * @param                Stream                IOStream to use to parse file.
67
                 * @param                nLength                # of bytes of the marker to parse
68
                 * @return      CNCSError        NCS_SUCCESS, or Error code on failure.
69
                 */
70
        virtual CNCSError Parse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream, INT32 nLength);
71
                /**
72
                 * UnParse the fields to the JPC codestream.
73
                 * @param                Stream                IOStream to use to parse file.
74
                 * @param                JPC                        CNCSJPC to use to parse file.
75
                 * @return      CNCSError        NCS_SUCCESS, or Error code on failure.
76
                 */
77
        virtual CNCSError UnParse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream);
78
};
79
80
81
#endif // !NCSJPCQUANTIZATIONPARAMETER_H