svn-gvsig-desktop / tags / extI18n-0.1.0-1045_8 / libraries / libjni-ecw / include / NCSJPCComponent.h @ 40799
History | View | Annotate | Download (4.18 KB)
1 | 3538 | nacho | /********************************************************
|
---|---|---|---|
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/NCSJPCComponent.h $
|
||
15 | ** CREATED: 12/02/2003 3:27:34 PM
|
||
16 | ** AUTHOR: Simon Cope
|
||
17 | ** PURPOSE: CNCSJPCComponent class header
|
||
18 | ** EDITS: [xx] ddMmmyy NAME COMMENTS
|
||
19 | *******************************************************/
|
||
20 | |||
21 | #ifndef NCSJPCCOMPONENT_H
|
||
22 | #define NCSJPCCOMPONENT_H
|
||
23 | |||
24 | #ifndef NCSJPCCODMARKER_H
|
||
25 | #include "NCSJPCCODMarker.h" |
||
26 | #endif // NCSJPCCODMARKER_H |
||
27 | #ifndef NCSJPCQCDMARKER_H
|
||
28 | #include "NCSJPCQCDMarker.h" |
||
29 | #endif // NCSJPCQCDMARKER_H |
||
30 | #ifndef NCSJPCRESOLUTION_H
|
||
31 | #include "NCSJPCResolution.h" |
||
32 | #endif // NCSJPCRESOLUTION_H |
||
33 | #ifndef NCSJPCNODE_H
|
||
34 | #include "NCSJPCNode.h" |
||
35 | #endif // NCSJPCNODE_H |
||
36 | |||
37 | /**
|
||
38 | * CNCSJPCComponent class - the JPC Tile Component.
|
||
39 | *
|
||
40 | * @author Simon Cope
|
||
41 | * @version $Revision$ $Author$ $Date$
|
||
42 | */
|
||
43 | class NCSJPC_EXPORT_ALL CNCSJPCComponent: public CNCSJPCNode { |
||
44 | public:
|
||
45 | |||
46 | const static UINT32 CREATE; |
||
47 | const static UINT32 ADDREF; |
||
48 | const static UINT32 UNREF; |
||
49 | const static UINT32 STATS; |
||
50 | const static UINT32 REQUEST; |
||
51 | const static UINT32 CANCEL; |
||
52 | |||
53 | /** Tile-Part for this component */
|
||
54 | class CNCSJPCTilePartHeader *m_pTilePart; |
||
55 | |||
56 | /** Component index */
|
||
57 | UINT16 m_iComponent; |
||
58 | /** Component is paletted */
|
||
59 | bool m_bPaletted;
|
||
60 | |||
61 | /** CodingStyle */
|
||
62 | CNCSJPCCODMarker m_CodingStyle; |
||
63 | /** QuantizationStyle */
|
||
64 | CNCSJPCQCDMarker m_QuantizationStyle; |
||
65 | /** Decomposition Resolution levels */
|
||
66 | std::vector<CNCSJPCResolution*> m_Resolutions; |
||
67 | |||
68 | /**
|
||
69 | * Constructor
|
||
70 | * @param pTilePart Parent tile part
|
||
71 | * @param iComponent Component index
|
||
72 | */
|
||
73 | CNCSJPCComponent(CNCSJPCTilePartHeader *pTilePart, UINT16 iComponent); |
||
74 | /** Virtual destructor */
|
||
75 | virtual ~CNCSJPCComponent(); |
||
76 | |||
77 | /**
|
||
78 | * Get X0 of this node.
|
||
79 | * @return INT32 Coordinate value.
|
||
80 | */
|
||
81 | virtual INT32 GetX0(); |
||
82 | /**
|
||
83 | * Get Y0 of this node.
|
||
84 | * @return INT32 Coordinate value.
|
||
85 | */
|
||
86 | virtual INT32 GetY0(); |
||
87 | /**
|
||
88 | * Get X1 of this node.
|
||
89 | * @return INT32 Coordinate value.
|
||
90 | */
|
||
91 | virtual INT32 GetX1(); |
||
92 | /**
|
||
93 | * Get Y1 of this node.
|
||
94 | * @return INT32 Coordinate value.
|
||
95 | */
|
||
96 | virtual INT32 GetY1(); |
||
97 | /**
|
||
98 | * Get the context for the given ContextID
|
||
99 | * @param nCtx ContextID to retrive context
|
||
100 | * @param bAutoConstruct Autoconstruct a new context for this ContextID if one doesn't exist
|
||
101 | * @return Context* Context for given ID.
|
||
102 | */
|
||
103 | virtual CNCSJPCNode::Context *GetContext(ContextID nCtx, bool bAutoConstruct = true); |
||
104 | /**
|
||
105 | * Link this node to the view.
|
||
106 | * @param nCtx Read context
|
||
107 | * @param nResolution Input resolution level.
|
||
108 | * @return bool true on success, else false on error.
|
||
109 | */
|
||
110 | virtual bool Link(CNCSJPCNode::ContextID nCtx, UINT32 nResolution, INT32 nXCMul, INT32 nYCMul);
|
||
111 | /**
|
||
112 | * Read a BufferType line from the input.
|
||
113 | * @param nCtx Read context
|
||
114 | * @param pDst Destination buffer.
|
||
115 | * @param iComponent Output Component
|
||
116 | * @return bool true on succes, else false.
|
||
117 | */
|
||
118 | virtual bool ReadLine(ContextID nCtx, CNCSJPCBuffer *pDst, UINT16 iComponent);
|
||
119 | /**
|
||
120 | * Write a BufferType line to the output.
|
||
121 | * @param nCtx Context
|
||
122 | * @param pSrc Source buffer.
|
||
123 | * @param iComponent Output Component
|
||
124 | * @return bool true on succes, else false.
|
||
125 | */
|
||
126 | virtual bool WriteLine(ContextID nCtx, CNCSJPCBuffer *pSrc, UINT16 iComponent);
|
||
127 | void TraversePyramid(UINT32 nResolution, UINT32 Flags, INT32 nTopX, INT32 nLeftY, INT32 nBottomX, INT32 nRightY, UINT32 nViewSizeX, UINT32 nViewSizeY, UINT32 &nBlocksTotal, UINT32 &nBlocksAvailable);
|
||
128 | protected:
|
||
129 | static CNCSJPCNodeTracker sm_Tracker;
|
||
130 | |||
131 | class NCSJPC_EXPORT_ALL Context: public CNCSJPCNode::Context { |
||
132 | public:
|
||
133 | INT32 m_nXCMul; |
||
134 | INT32 m_nYCMul; |
||
135 | Context(); |
||
136 | virtual ~Context(); |
||
137 | }; |
||
138 | |||
139 | }; |
||
140 | |||
141 | #endif // !NCSJPCCOMPONENT_H |