root / branches / v05 / libraries / libjni-ecw / include / NCSJPCSIZMarker.h @ 38532
History | View | Annotate | Download (5.51 KB)
1 |
/********************************************************
|
---|---|
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/NCSJPCSIZMarker.h $
|
15 |
** CREATED: 05/12/2002 3:27:34 PM
|
16 |
** AUTHOR: Simon Cope
|
17 |
** PURPOSE: CNCSJPCSIZMarker class header
|
18 |
** EDITS: [xx] ddMmmyy NAME COMMENTS
|
19 |
*******************************************************/
|
20 |
|
21 |
#ifndef NCSJPCSIZMARKER_H
|
22 |
#define NCSJPCSIZMARKER_H
|
23 |
|
24 |
#include "NCSJPCMarker.h" |
25 |
#include "NCSJPCComponentDepthType.h" |
26 |
|
27 |
/**
|
28 |
* CNCSJPCSIZMarker class - the JPC SIZ marker.
|
29 |
*
|
30 |
* @author Simon Cope
|
31 |
* @version $Revision: 3538 $ $Author: nacho $ $Date: 2006-01-09 12:56:54 +0100 (Mon, 09 Jan 2006) $
|
32 |
*/
|
33 |
class NCSJPC_EXPORT_ALL CNCSJPCSIZMarker: public CNCSJPCMarker { |
34 |
public:
|
35 |
/** Information for each component in the image */
|
36 |
class NCSJPC_EXPORT_ALL ComponentInfo: public CNCSJPCComponentDepthType { |
37 |
public:
|
38 |
/** Horizontal separation of a sample of component WRT reference grid */
|
39 |
UINT8 m_nXRsiz; |
40 |
/** Vertical separation of a sample of component WRT reference grid */
|
41 |
UINT8 m_nYRsiz; |
42 |
|
43 |
/** Default constructor */
|
44 |
ComponentInfo(); |
45 |
/** virtual destructor */
|
46 |
virtual ~ComponentInfo(); |
47 |
/**
|
48 |
* Parse from the JPC codestream.
|
49 |
* @param JPC CNCSJPC to use to parse file.
|
50 |
* @param Stream IOStream to use to parse file.
|
51 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
52 |
*/
|
53 |
virtual CNCSError Parse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
54 |
/**
|
55 |
* UnParse to the JPC codestream.
|
56 |
* @param Stream IOStream to use to parse file.
|
57 |
* @param JPC CNCSJPC to use to parse file.
|
58 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
59 |
*/
|
60 |
virtual CNCSError UnParse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
61 |
}; |
62 |
|
63 |
/** Capabilities required to read this codestream */
|
64 |
UINT16 m_nRsiz; |
65 |
/** Width of the reference grid */
|
66 |
UINT32 m_nXsiz; |
67 |
/** Height of the reference grid */
|
68 |
UINT32 m_nYsiz; |
69 |
/** Horizontal offset to left of image within the grid */
|
70 |
UINT32 m_nXOsiz; |
71 |
/** Vertical offset to top of image within the grid */
|
72 |
UINT32 m_nYOsiz; |
73 |
/** Width of one reference tile wrt the reference grid */
|
74 |
UINT32 m_nXTsiz; |
75 |
/** Height of one reference tile wrt the reference grid */
|
76 |
UINT32 m_nYTsiz; |
77 |
/** Horizontal offset to the left of first tile within the grid */
|
78 |
UINT32 m_nXTOsiz; |
79 |
/** Vertical offset to the top of first tile within the grid */
|
80 |
UINT32 m_nYTOsiz; |
81 |
/** Number of components in the image */
|
82 |
UINT16 m_nCsiz; |
83 |
/** Component info */
|
84 |
std::vector<ComponentInfo> m_Components; |
85 |
|
86 |
/** Default constructor, initialises members */
|
87 |
CNCSJPCSIZMarker(); |
88 |
/** Virtual destructor */
|
89 |
virtual ~CNCSJPCSIZMarker(); |
90 |
|
91 |
/**
|
92 |
* Parse the marker from the JPC codestream.
|
93 |
* @param JPC CNCSJPC to use to parse file.
|
94 |
* @param Stream IOStream to use to parse file.
|
95 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
96 |
*/
|
97 |
virtual CNCSError Parse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
98 |
/**
|
99 |
* UnParse the marker to the JPC codestream.
|
100 |
* @param Stream IOStream to use to parse file.
|
101 |
* @param JPC CNCSJPC to use to parse file.
|
102 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
103 |
*/
|
104 |
virtual CNCSError UnParse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
105 |
|
106 |
/**
|
107 |
* Get X0, the component top left in reference grid
|
108 |
* @param INT32 Component Index
|
109 |
* @return INT32 Component coordinate
|
110 |
*/
|
111 |
INT32 GetComponentX0(INT32 iComponent); |
112 |
/**
|
113 |
* Get X1, the component bottom right in reference grid
|
114 |
* @param INT32 Component Index
|
115 |
* @return INT32 Component coordinate
|
116 |
*/
|
117 |
INT32 GetComponentX1(INT32 iComponent); |
118 |
/**
|
119 |
* Get Y0, the component top left in reference grid
|
120 |
* @param INT32 Component Index
|
121 |
* @return INT32 Component coordinate
|
122 |
*/
|
123 |
INT32 GetComponentY0(INT32 iComponent); |
124 |
/**
|
125 |
* Get Y1, the component bottom right in reference grid
|
126 |
* @param INT32 Component Index
|
127 |
* @return INT32 Component coordinate
|
128 |
*/
|
129 |
INT32 GetComponentY1(INT32 iComponent); |
130 |
/**
|
131 |
* Get the component width in reference grid
|
132 |
* @param INT32 Component Index
|
133 |
* @return INT32 Component width
|
134 |
*/
|
135 |
INT32 GetComponentWidth(INT32 iComponent); |
136 |
/**
|
137 |
* Get the component height in reference grid
|
138 |
* @param INT32 Component Index
|
139 |
* @return INT32 Component height
|
140 |
*/
|
141 |
INT32 GetComponentHeight(INT32 iComponent); |
142 |
|
143 |
/**
|
144 |
* Get the number of tile across the image
|
145 |
* @return INT32 Number of tiles across image
|
146 |
*/
|
147 |
INT32 GetNumXTiles(); |
148 |
/**
|
149 |
* Get the number of tile down the image
|
150 |
* @return INT32 Number of tiles down image
|
151 |
*/
|
152 |
INT32 GetNumYTiles(); |
153 |
|
154 |
/**
|
155 |
* Get the Tile P index from the tile index
|
156 |
* @param INT32 Tile Index
|
157 |
* @return INT32 Tile P Index
|
158 |
*/
|
159 |
INT32 GetTilePFromIndex(INT32 iIndex); |
160 |
/**
|
161 |
* Get the Tile Q index from the tile index
|
162 |
* @param INT32 Tile Index
|
163 |
* @return INT32 Tile Q Index
|
164 |
*/
|
165 |
INT32 GetTileQFromIndex(INT32 iIndex); |
166 |
/**
|
167 |
* Get the Tile Index from the tile PQ index
|
168 |
* @param INT32 Tile P Index
|
169 |
* @param INT32 Tile Q Index
|
170 |
* @return INT32 Tile Index
|
171 |
*/
|
172 |
INT32 GetTileIndexFromPQ(INT32 iPIndex, INT32 iQIndex); |
173 |
}; |
174 |
|
175 |
|
176 |
#endif // !NCSJPCSIZMARKER_H |