svn-gvsig-desktop / tags / v2_0_Build_1213 / libraries / libjni-ecwcompress / include / include-sdk / NCSJPCSubBand.h @ 43637
History | View | Annotate | Download (5.95 KB)
1 |
/********************************************************
|
---|---|
2 |
** Copyright 2003 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/NCSJPCSubBand.h $
|
15 |
** CREATED: 13/02/2003 3:27:34 PM
|
16 |
** AUTHOR: Simon Cope
|
17 |
** PURPOSE: CNCSJPCSubBand class header
|
18 |
** EDITS: [xx] ddMmmyy NAME COMMENTS
|
19 |
*******************************************************/
|
20 |
|
21 |
#ifndef NCSJPCSUBBAND_H
|
22 |
#define NCSJPCSUBBAND_H
|
23 |
|
24 |
#include "NCSJPCTagTree.h" |
25 |
#include "NCSJPCTypes.h" |
26 |
#include "NCSJPCNodeTiler.h" |
27 |
//#include "NCSJPCCodeBlock.h"
|
28 |
|
29 |
/**
|
30 |
* CNCSJPCSubBand class - the JPC codestream SubBand.
|
31 |
*
|
32 |
* @author Simon Cope
|
33 |
* @version $Revision: 3538 $ $Author: nacho $ $Date: 2006-01-09 12:56:54 +0100 (Mon, 09 Jan 2006) $
|
34 |
*/
|
35 |
class NCSJPC_EXPORT_ALL CNCSJPCSubBand: public CNCSJPCNodeTiler { |
36 |
public:
|
37 |
/** Precincts for this SubBand */
|
38 |
class CNCSJPCPrecinct *m_pPrecinct; |
39 |
|
40 |
/** Type of subband */
|
41 |
NCSJPCSubBandType m_eType; |
42 |
|
43 |
/** Layer # each codeblock is first included in */
|
44 |
CNCSJPCTagTree m_LayerInclusion; |
45 |
/** # of zero bit planes for each codeblock */
|
46 |
CNCSJPCTagTree m_ZeroPlanes; |
47 |
|
48 |
/** CodeBlock data */
|
49 |
std::vector<class CNCSJPCCodeBlock> *m_pCodeBlocks; |
50 |
|
51 |
/**
|
52 |
* Constructor
|
53 |
* @param pPrecinct Parent precinct
|
54 |
* @param eType SubBand type LL,LH,HL,HH
|
55 |
*/
|
56 |
CNCSJPCSubBand(class CNCSJPCPrecinct *pPrecinct, NCSJPCSubBandType eType); |
57 |
/** Virtual destructor */
|
58 |
virtual ~CNCSJPCSubBand(); |
59 |
|
60 |
/**
|
61 |
* Get X0 of this node.
|
62 |
* @return INT32 Coordinate value.
|
63 |
*/
|
64 |
static INT32 GetX0(class CNCSJPCResolution *pResolution, INT32 nPrecinct, NCSJPCSubBandType eType);
|
65 |
/**
|
66 |
* Get X0 of this node.
|
67 |
* @return INT32 Coordinate value.
|
68 |
*/
|
69 |
static INT32 GetX0(class CNCSJPCResolution *pResolution, INT32 nPrecinctX, INT32 nPrecinctY, NCSJPCSubBandType eType);
|
70 |
/**
|
71 |
* Get X0 of this node.
|
72 |
* @return INT32 Coordinate value.
|
73 |
*/
|
74 |
virtual INT32 GetX0(); |
75 |
/**
|
76 |
* Get Y0 of this node.
|
77 |
* @return INT32 Coordinate value.
|
78 |
*/
|
79 |
static INT32 GetY0(class CNCSJPCResolution *pResolution, INT32 nPrecinct, NCSJPCSubBandType eType);
|
80 |
/**
|
81 |
* Get Y0 of this node.
|
82 |
* @return INT32 Coordinate value.
|
83 |
*/
|
84 |
static INT32 GetY0(class CNCSJPCResolution *pResolution, INT32 nPrecinctX, INT32 nPrecinctY, NCSJPCSubBandType eType);
|
85 |
/**
|
86 |
* Get Y0 of this node.
|
87 |
* @return INT32 Coordinate value.
|
88 |
*/
|
89 |
virtual INT32 GetY0(); |
90 |
/**
|
91 |
* Get X1 of this node.
|
92 |
* @return INT32 Coordinate value.
|
93 |
*/
|
94 |
static INT32 GetX1(class CNCSJPCResolution *pResolution, INT32 nPrecinct, NCSJPCSubBandType eType);
|
95 |
/**
|
96 |
* Get X1 of this node.
|
97 |
* @return INT32 Coordinate value.
|
98 |
*/
|
99 |
static INT32 GetX1(class CNCSJPCResolution *pResolution, INT32 nPrecinctX, INT32 nPrecinctY, NCSJPCSubBandType eType);
|
100 |
/**
|
101 |
* Get X1 of this node.
|
102 |
* @return INT32 Coordinate value.
|
103 |
*/
|
104 |
virtual INT32 GetX1(); |
105 |
/**
|
106 |
* Get Y1 of this node.
|
107 |
* @return INT32 Coordinate value.
|
108 |
*/
|
109 |
static INT32 GetY1(class CNCSJPCResolution *pResolution, INT32 nPrecinct, NCSJPCSubBandType eType);
|
110 |
/**
|
111 |
* Get Y1 of this node.
|
112 |
* @return INT32 Coordinate value.
|
113 |
*/
|
114 |
static INT32 GetY1(class CNCSJPCResolution *pResolution, INT32 nPrecinctX, INT32 nPrecinctY, NCSJPCSubBandType eType);
|
115 |
/**
|
116 |
* Get Y1 of this node.
|
117 |
* @return INT32 Coordinate value.
|
118 |
*/
|
119 |
virtual INT32 GetY1(); |
120 |
/**
|
121 |
* Get Width of this node.
|
122 |
* @return INT32 Width.
|
123 |
*/
|
124 |
// static INT32 GetWidth(class CNCSJPCResolution *pResolution, INT32 nPrecinct, Type eType);
|
125 |
/**
|
126 |
* Get Height of this node.
|
127 |
* @return INT32 Width.
|
128 |
*/
|
129 |
// static INT32 GetHeight(class CNCSJPCResolution *pResolution, INT32 nPrecinct, Type eType);
|
130 |
|
131 |
/**
|
132 |
* Get codeblock Width.
|
133 |
* @return INT32 Un-clipped Width of codeblocks.
|
134 |
*/
|
135 |
virtual UINT32 GetCBWidth(); |
136 |
/**
|
137 |
* Get codeblock Height.
|
138 |
* @return INT32 Un-clipped height of codeblocks.
|
139 |
*/
|
140 |
virtual UINT32 GetCBHeight(); |
141 |
/**
|
142 |
* Get number of codeblocks wide.
|
143 |
* @return INT32 Nr of codeblocks across.
|
144 |
*/
|
145 |
virtual UINT32 GetNumCBWide(); |
146 |
/**
|
147 |
* Get number of codeblocks high.
|
148 |
* @return INT32 Nr of codeblocks high.
|
149 |
*/
|
150 |
virtual UINT32 GetNumCBHigh(); |
151 |
|
152 |
/**
|
153 |
* Get the orientation value from the given subband type
|
154 |
* @param etype NCS SubBand type.
|
155 |
* @return UINT8 SubBand orientation value.
|
156 |
*/
|
157 |
static NCS_INLINE UINT8 GetOrient(NCSJPCSubBandType eType) {
|
158 |
switch(eType) {
|
159 |
default:
|
160 |
case NCSJPC_LL: return(0); |
161 |
case NCSJPC_LH: return(1); |
162 |
case NCSJPC_HL: return(2); |
163 |
case NCSJPC_HH: return(3); |
164 |
} |
165 |
}; |
166 |
|
167 |
protected:
|
168 |
static CNCSJPCNodeTracker sm_Tracker;
|
169 |
|
170 |
/**
|
171 |
* Get normal Node Width.
|
172 |
* @return INT32 Un-clipped Width of codeblocks.
|
173 |
*/
|
174 |
virtual UINT32 GetNodeWidth(UINT16 iComponent = 0) { return(GetCBWidth()); }; |
175 |
/**
|
176 |
* Get normal Node Height.
|
177 |
* @return INT32 Un-clipped height of codeblocks.
|
178 |
*/
|
179 |
virtual UINT32 GetNodeHeight(UINT16 iComponent = 0) { return(GetCBHeight()); }; |
180 |
/**
|
181 |
* Get number of nodes wide.
|
182 |
* @return INT32 Nr of codeblocks across.
|
183 |
*/
|
184 |
virtual UINT32 GetNumNodesWide(UINT16 iComponent = 0) { return(GetNumCBWide()); }; |
185 |
/**
|
186 |
* Get number of nodes high.
|
187 |
* @return INT32 Nr of codeblocks high.
|
188 |
*/
|
189 |
virtual UINT32 GetNumNodesHigh(UINT16 iComponent = 0) { return(GetNumCBHigh()); }; |
190 |
/**
|
191 |
* Get pointer to specific node.
|
192 |
* @param UINT32 Node nr
|
193 |
* @return CNCSJPCNode * Ptr to node.
|
194 |
*/
|
195 |
virtual CNCSJPCNode *GetNodePtr(UINT32 nNode, UINT16 iComponent = 0);
|
196 |
|
197 |
private:
|
198 |
TNCSCachedValue<UINT32> m_NumCBWide; |
199 |
TNCSCachedValue<UINT32> m_NumCBHigh; |
200 |
}; |
201 |
|
202 |
#endif // !NCSJPCSUBBAND_H |