corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /// <summary>**************************************************************************
2 ///
3 /// $Id: LookUpTable8.java,v 1.1 2002/07/25 14:56:48 grosbois Exp $
4 ///
5 /// Copyright Eastman Kodak Company, 343 State Street, Rochester, NY 14650
6 /// $Date $
7 /// ***************************************************************************
8 /// </summary>
9 using System;
10 using ICCCurveType = CSJ2K.Icc.Tags.ICCCurveType;
11 namespace CSJ2K.Icc.Lut
12 {
13  
14 /// <summary> Toplevel class for a byte [] lut.
15 ///
16 /// </summary>
17 /// <version> 1.0
18 /// </version>
19 /// <author> Bruce A. Kern
20 /// </author>
21 public abstract class LookUpTable8:LookUpTable
22 {
23  
24 /// <summary>Maximum output value of the LUT </summary>
25 //UPGRADE_NOTE: Final was removed from the declaration of 'dwMaxOutput '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
26 protected internal byte dwMaxOutput;
27 /// <summary>The lut values. </summary>
28 // Maximum output value of the LUT
29 //UPGRADE_NOTE: Final was removed from the declaration of 'lut '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
30 protected internal byte[] lut;
31  
32  
33 /// <summary> Create an abbreviated string representation of a 16 bit lut.</summary>
34 /// <returns> the lut as a String
35 /// </returns>
36 public override System.String ToString()
37 {
38 System.Text.StringBuilder rep = new System.Text.StringBuilder("[LookUpTable8 ");
39 //int row, col;
40 rep.Append("max= " + dwMaxOutput);
41 rep.Append(", nentries= " + dwMaxOutput);
42 return rep.Append("]").ToString();
43 }
44  
45  
46  
47 public virtual System.String toStringWholeLut()
48 {
49 System.Text.StringBuilder rep = new System.Text.StringBuilder("LookUpTable8" + eol);
50 rep.Append("maxOutput = " + dwMaxOutput + eol);
51 for (int i = 0; i < dwNumInput; ++i)
52 rep.Append("lut[" + i + "] = " + lut[i] + eol);
53 return rep.Append("]").ToString();
54 }
55  
56 protected internal LookUpTable8(int dwNumInput, byte dwMaxOutput):base(null, dwNumInput)
57 {
58 lut = new byte[dwNumInput];
59 this.dwMaxOutput = dwMaxOutput;
60 }
61  
62  
63 /// <summary> Create the string representation of a 16 bit lut.</summary>
64 /// <returns> the lut as a String
65 /// </returns>
66 protected internal LookUpTable8(ICCCurveType curve, int dwNumInput, byte dwMaxOutput):base(curve, dwNumInput)
67 {
68 this.dwMaxOutput = dwMaxOutput;
69 lut = new byte[dwNumInput];
70 }
71  
72 /// <summary> lut accessor</summary>
73 /// <param name="index">of the element
74 /// </param>
75 /// <returns> the lut [index]
76 /// </returns>
77 public byte elementAt(int index)
78 {
79 return lut[index];
80 }
81  
82 /* end class LookUpTable8 */
83 }
84 }