corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * CVS Identifier:
3 *
4 * $Id: ImgData.java,v 1.10 2001/09/14 09:17:46 grosbois Exp $
5 *
6 * Interface: ImgData
7 *
8 * Description: The interface for classes that provide image
9 * data.
10 *
11 *
12 *
13 * COPYRIGHT:
14 *
15 * This software module was originally developed by Raphaël Grosbois and
16 * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
17 * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
18 * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
19 * Centre France S.A) in the course of development of the JPEG2000
20 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
21 * software module is an implementation of a part of the JPEG 2000
22 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio
23 * Systems AB and Canon Research Centre France S.A (collectively JJ2000
24 * Partners) agree not to assert against ISO/IEC and users of the JPEG
25 * 2000 Standard (Users) any of their rights under the copyright, not
26 * including other intellectual property rights, for this software module
27 * with respect to the usage by ISO/IEC and Users of this software module
28 * or modifications thereof for use in hardware or software products
29 * claiming conformance to the JPEG 2000 Standard. Those intending to use
30 * this software module in hardware or software products are advised that
31 * their use may infringe existing patents. The original developers of
32 * this software module, JJ2000 Partners and ISO/IEC assume no liability
33 * for use of this software module or modifications thereof. No license
34 * or right to this software module is granted for non JPEG 2000 Standard
35 * conforming products. JJ2000 Partners have full right to use this
36 * software module for his/her own purpose, assign or donate this
37 * software module to any third party and to inhibit third parties from
38 * using this software module for non JPEG 2000 Standard conforming
39 * products. This copyright notice must be included in all copies or
40 * derivative works of this software module.
41 *
42 * Copyright (c) 1999/2000 JJ2000 Partners.
43 * */
44 using System;
45 namespace CSJ2K.j2k.image
46 {
47  
48 /// <summary> This interface defines methods to access image attributes (width, height,
49 /// number of components, etc.). The image can be tiled or not (i.e. if the
50 /// image is not tiled then there is only 1 tile). It should be implemented by
51 /// all classes that provide image data, such as image file readers, color
52 /// transforms, wavelet transforms, etc. This interface, however, does not
53 /// define methods to transfer image data (i.e. pixel data), that is defined by
54 /// other interfaces, such as 'BlkImgDataSrc'.
55 ///
56 /// </summary>
57 /// <seealso cref="BlkImgDataSrc">
58 ///
59 /// </seealso>
60 public interface ImgData
61 {
62 /// <summary> Returns the overall width of the current tile in pixels. This is the
63 /// tile's width without accounting for any component subsampling. This is
64 /// also referred as the reference grid width in the current tile.
65 ///
66 /// </summary>
67 /// <returns> The total current tile's width in pixels.
68 ///
69 /// </returns>
70 int TileWidth
71 {
72 get;
73  
74 }
75 /// <summary> Returns the overall height of the current tile in pixels. This is the
76 /// tile's height without accounting for any component subsampling. This is
77 /// also referred as the reference grid height in the current tile.
78 ///
79 /// </summary>
80 /// <returns> The total current tile's height in pixels.
81 ///
82 /// </returns>
83 int TileHeight
84 {
85 get;
86  
87 }
88 /// <summary>Returns the nominal tiles width </summary>
89 int NomTileWidth
90 {
91 get;
92  
93 }
94 /// <summary>Returns the nominal tiles height </summary>
95 int NomTileHeight
96 {
97 get;
98  
99 }
100 /// <summary> Returns the overall width of the image in pixels. This is the image's
101 /// width without accounting for any component subsampling or tiling.
102 ///
103 /// </summary>
104 /// <returns> The total image's width in pixels.
105 ///
106 /// </returns>
107 int ImgWidth
108 {
109 get;
110  
111 }
112 /// <summary> Returns the overall height of the image in pixels. This is the image's
113 /// height without accounting for any component subsampling or tiling.
114 ///
115 /// </summary>
116 /// <returns> The total image's height in pixels.
117 ///
118 /// </returns>
119 int ImgHeight
120 {
121 get;
122  
123 }
124 /// <summary> Returns the number of components in the image.
125 ///
126 /// </summary>
127 /// <returns> The number of components in the image.
128 ///
129 /// </returns>
130 int NumComps
131 {
132 get;
133  
134 }
135 /// <summary> Returns the index of the current tile, relative to a standard scan-line
136 /// order.
137 ///
138 /// </summary>
139 /// <returns> The current tile's index (starts at 0).
140 ///
141 /// </returns>
142 int TileIdx
143 {
144 get;
145  
146 }
147 /// <summary>Returns the horizontal tile partition offset in the reference grid </summary>
148 int TilePartULX
149 {
150 get;
151  
152 }
153 /// <summary>Returns the vertical tile partition offset in the reference grid </summary>
154 int TilePartULY
155 {
156 get;
157  
158 }
159 /// <summary> Returns the horizontal coordinate of the image origin, the top-left
160 /// corner, in the canvas system, on the reference grid.
161 ///
162 /// </summary>
163 /// <returns> The horizontal coordinate of the image origin in the canvas
164 /// system, on the reference grid.
165 ///
166 /// </returns>
167 int ImgULX
168 {
169 get;
170  
171 }
172 /// <summary> Returns the vertical coordinate of the image origin, the top-left
173 /// corner, in the canvas system, on the reference grid.
174 ///
175 /// </summary>
176 /// <returns> The vertical coordinate of the image origin in the canvas
177 /// system, on the reference grid.
178 ///
179 /// </returns>
180 int ImgULY
181 {
182 get;
183  
184 }
185  
186 /// <summary> Returns the component subsampling factor in the horizontal direction,
187 /// for the specified component. This is, approximately, the ratio of
188 /// dimensions between the reference grid and the component itself, see the
189 /// 'ImgData' interface desription for details.
190 ///
191 /// </summary>
192 /// <param name="c">The index of the component (between 0 and N-1)
193 ///
194 /// </param>
195 /// <returns> The horizontal subsampling factor of component 'c'
196 ///
197 /// </returns>
198 /// <seealso cref="ImgData">
199 ///
200 /// </seealso>
201 int getCompSubsX(int c);
202  
203 /// <summary> Returns the component subsampling factor in the vertical direction, for
204 /// the specified component. This is, approximately, the ratio of
205 /// dimensions between the reference grid and the component itself, see the
206 /// 'ImgData' interface desription for details.
207 ///
208 /// </summary>
209 /// <param name="c">The index of the component (between 0 and N-1)
210 ///
211 /// </param>
212 /// <returns> The vertical subsampling factor of component 'c'
213 ///
214 /// </returns>
215 /// <seealso cref="ImgData">
216 ///
217 /// </seealso>
218 int getCompSubsY(int c);
219  
220 /// <summary> Returns the width in pixels of the specified tile-component
221 ///
222 /// </summary>
223 /// <param name="t">Tile index
224 ///
225 /// </param>
226 /// <param name="c">The index of the component, from 0 to N-1.
227 ///
228 /// </param>
229 /// <returns> The width in pixels of component <tt>c</tt> in tile<tt>t</tt>.
230 ///
231 /// </returns>
232 int getTileCompWidth(int t, int c);
233  
234 /// <summary> Returns the height in pixels of the specified tile-component.
235 ///
236 /// </summary>
237 /// <param name="t">The tile index.
238 ///
239 /// </param>
240 /// <param name="c">The index of the component, from 0 to N-1.
241 ///
242 /// </param>
243 /// <returns> The height in pixels of component <tt>c</tt> in tile
244 /// <tt>t</tt>.
245 ///
246 /// </returns>
247 int getTileCompHeight(int t, int c);
248  
249 /// <summary> Returns the width in pixels of the specified component in the overall
250 /// image.
251 ///
252 /// </summary>
253 /// <param name="c">The index of the component, from 0 to N-1.
254 ///
255 /// </param>
256 /// <returns> The width in pixels of component <tt>c</tt> in the overall
257 /// image.
258 ///
259 /// </returns>
260 int getCompImgWidth(int c);
261  
262 /// <summary> Returns the height in pixels of the specified component in the overall
263 /// image.
264 ///
265 /// </summary>
266 /// <param name="c">The index of the component, from 0 to N-1.
267 ///
268 /// </param>
269 /// <returns> The height in pixels of component <tt>n</tt> in the overall
270 /// image.
271 ///
272 /// </returns>
273 int getCompImgHeight(int c);
274  
275 /// <summary> Returns the number of bits, referred to as the "range bits",
276 /// corresponding to the nominal range of the image data in the specified
277 /// component. If this number is <i>n</b> then for unsigned data the
278 /// nominal range is between 0 and 2^b-1, and for signed data it is between
279 /// -2^(b-1) and 2^(b-1)-1. In the case of transformed data which is not in
280 /// the image domain (e.g., wavelet coefficients), this method returns the
281 /// "range bits" of the image data that generated the coefficients.
282 ///
283 /// </summary>
284 /// <param name="c">The index of the component.
285 ///
286 /// </param>
287 /// <returns> The number of bits corresponding to the nominal range of the
288 /// image data (in the image domain).
289 ///
290 /// </returns>
291 int getNomRangeBits(int c);
292  
293 /// <summary> Changes the current tile, given the new indices. An
294 /// IllegalArgumentException is thrown if the coordinates do not correspond
295 /// to a valid tile.
296 ///
297 /// </summary>
298 /// <param name="x">The horizontal index of the tile.
299 ///
300 /// </param>
301 /// <param name="y">The vertical index of the new tile.
302 ///
303 /// </param>
304 void setTile(int x, int y);
305  
306 /// <summary> Advances to the next tile, in standard scan-line order (by rows then
307 /// columns). An NoNextElementException is thrown if the current tile is
308 /// the last one (i.e. there is no next tile).
309 ///
310 /// </summary>
311 void nextTile();
312  
313 /// <summary> Returns the indixes of the current tile. These are the horizontal and
314 /// vertical indexes of the current tile.
315 ///
316 /// </summary>
317 /// <param name="co">If not null this object is used to return the information. If
318 /// null a new one is created and returned.
319 ///
320 /// </param>
321 /// <returns> The current tile's indices (vertical and horizontal indexes).
322 ///
323 /// </returns>
324 Coord getTile(Coord co);
325  
326 /// <summary> Returns the horizontal coordinate of the upper-left corner of the
327 /// specified component in the current tile.
328 ///
329 /// </summary>
330 /// <param name="c">The index of the component.
331 ///
332 /// </param>
333 int getCompULX(int c);
334  
335 /// <summary> Returns the vertical coordinate of the upper-left corner of the
336 /// specified component in the current tile.
337 ///
338 /// </summary>
339 /// <param name="c">The index of the component.
340 ///
341 /// </param>
342 int getCompULY(int c);
343  
344 /// <summary> Returns the number of tiles in the horizontal and vertical directions.
345 ///
346 /// </summary>
347 /// <param name="co">If not null this object is used to return the information. If
348 /// null a new one is created and returned.
349 ///
350 /// </param>
351 /// <returns> The number of tiles in the horizontal (Coord.x) and vertical
352 /// (Coord.y) directions.
353 ///
354 /// </returns>
355 Coord getNumTiles(Coord co);
356  
357 /// <summary> Returns the total number of tiles in the image.
358 ///
359 /// </summary>
360 /// <returns> The total number of tiles in the image.
361 ///
362 /// </returns>
363 int getNumTiles();
364 }
365 }