corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * CVS identifier:
3 *
4 * $Id: CompTransfSpec.java,v 1.18 2001/04/10 14:23:26 grosbois Exp $
5 *
6 * Class: CompTransfSpec
7 *
8 * Description: Component Transformation specification
9 *
10 *
11 *
12 * COPYRIGHT:
13 *
14 * This software module was originally developed by Raphaël Grosbois and
15 * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
16 * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
17 * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
18 * Centre France S.A) in the course of development of the JPEG2000
19 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
20 * software module is an implementation of a part of the JPEG 2000
21 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio
22 * Systems AB and Canon Research Centre France S.A (collectively JJ2000
23 * Partners) agree not to assert against ISO/IEC and users of the JPEG
24 * 2000 Standard (Users) any of their rights under the copyright, not
25 * including other intellectual property rights, for this software module
26 * with respect to the usage by ISO/IEC and Users of this software module
27 * or modifications thereof for use in hardware or software products
28 * claiming conformance to the JPEG 2000 Standard. Those intending to use
29 * this software module in hardware or software products are advised that
30 * their use may infringe existing patents. The original developers of
31 * this software module, JJ2000 Partners and ISO/IEC assume no liability
32 * for use of this software module or modifications thereof. No license
33 * or right to this software module is granted for non JPEG 2000 Standard
34 * conforming products. JJ2000 Partners have full right to use this
35 * software module for his/her own purpose, assign or donate this
36 * software module to any third party and to inhibit third parties from
37 * using this software module for non JPEG 2000 Standard conforming
38 * products. This copyright notice must be included in all copies or
39 * derivative works of this software module.
40 *
41 * Copyright (c) 1999/2000 JJ2000 Partners.
42 * */
43 using System;
44 using CSJ2K.j2k.image.invcomptransf;
45 using CSJ2K.j2k.wavelet;
46 using CSJ2K.j2k.util;
47 using CSJ2K.j2k;
48 namespace CSJ2K.j2k.image
49 {
50  
51 /// <summary> This class extends the ModuleSpec class in order to hold tile
52 /// specifications for multiple component transformation
53 ///
54 /// </summary>
55 /// <seealso cref="ModuleSpec">
56 ///
57 /// </seealso>
58 public class CompTransfSpec:ModuleSpec
59 {
60 /// <summary> Check if component transformation is used in any of the tiles. This
61 /// method must not be used by the encoder.
62 ///
63 /// </summary>
64 /// <returns> True if a component transformation is used in at least on
65 /// tile.
66 ///
67 /// </returns>
68 virtual public bool CompTransfUsed
69 {
70 get
71 {
72 if (((System.Int32) def) != InvCompTransf.NONE)
73 {
74 return true;
75 }
76  
77 if (tileDef != null)
78 {
79 for (int t = nTiles - 1; t >= 0; t--)
80 {
81 if (tileDef[t] != null && (((System.Int32) tileDef[t]) != InvCompTransf.NONE))
82 {
83 return true;
84 }
85 }
86 }
87 return false;
88 }
89  
90 }
91  
92 /// <summary> Constructs an empty 'CompTransfSpec' with the specified number of tiles
93 /// and components. This constructor is called by the decoder. Note: The
94 /// number of component is here for symmetry purpose. It is useless since
95 /// only tile specifications are meaningful.
96 ///
97 /// </summary>
98 /// <param name="nt">Number of tiles
99 ///
100 /// </param>
101 /// <param name="nc">Number of components
102 ///
103 /// </param>
104 /// <param name="type">the type of the specification module i.e. tile specific,
105 /// component specific or both.
106 ///
107 /// </param>
108 public CompTransfSpec(int nt, int nc, byte type):base(nt, nc, type)
109 {
110 }
111 }
112 }