corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | /// <summary>************************************************************************** |
2 | /// |
||
3 | /// $Id: LookUpTableFP.java,v 1.1 2002/07/25 14:56:49 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 float [] lut. |
||
15 | /// |
||
16 | /// </summary> |
||
17 | /// <version> 1.0 |
||
18 | /// </version> |
||
19 | /// <author> Bruce A. Kern |
||
20 | /// </author> |
||
21 | public abstract class LookUpTableFP:LookUpTable |
||
22 | { |
||
23 | |||
24 | /// <summary>The lut values. </summary> |
||
25 | //UPGRADE_NOTE: Final was removed from the declaration of 'lut '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" |
||
26 | public float[] lut; |
||
27 | |||
28 | /// <summary> Factory method for getting a lut from a given curve.</summary> |
||
29 | /// <param name="curve"> the data |
||
30 | /// </param> |
||
31 | /// <param name="dwNumInput">the size of the lut |
||
32 | /// </param> |
||
33 | /// <returns> the lookup table |
||
34 | /// </returns> |
||
35 | |||
36 | public static LookUpTableFP createInstance(ICCCurveType curve, int dwNumInput) |
||
37 | { |
||
38 | |||
39 | if (curve.nEntries == 1) |
||
40 | return new LookUpTableFPGamma(curve, dwNumInput); |
||
41 | else |
||
42 | return new LookUpTableFPInterp(curve, dwNumInput); |
||
43 | } |
||
44 | |||
45 | /// <summary> Construct an empty lut</summary> |
||
46 | /// <param name="dwNumInput">the size of the lut t lut. |
||
47 | /// </param> |
||
48 | /// <param name="dwMaxOutput">max output value of the lut |
||
49 | /// </param> |
||
50 | protected internal LookUpTableFP(ICCCurveType curve, int dwNumInput):base(curve, dwNumInput) |
||
51 | { |
||
52 | lut = new float[dwNumInput]; |
||
53 | } |
||
54 | |||
55 | /// <summary> lut accessor</summary> |
||
56 | /// <param name="index">of the element |
||
57 | /// </param> |
||
58 | /// <returns> the lut [index] |
||
59 | /// </returns> |
||
60 | public float elementAt(int index) |
||
61 | { |
||
62 | return lut[index]; |
||
63 | } |
||
64 | |||
65 | /* end class LookUpTableFP */ |
||
66 | } |
||
67 | } |