corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | /// <summary>************************************************************************** |
2 | /// |
||
3 | /// $Id: LookUpTableFPGamma.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> Class Description |
||
15 | /// |
||
16 | /// </summary> |
||
17 | /// <version> 1.0 |
||
18 | /// </version> |
||
19 | /// <author> Bruce A. Kern |
||
20 | /// </author> |
||
21 | |||
22 | public class LookUpTableFPGamma:LookUpTableFP |
||
23 | { |
||
24 | |||
25 | internal double dfE = - 1; |
||
26 | //UPGRADE_NOTE: Final was removed from the declaration of 'eol '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" |
||
27 | new private static readonly System.String eol = System.Environment.NewLine; |
||
28 | |||
29 | public LookUpTableFPGamma(ICCCurveType curve, int dwNumInput):base(curve, dwNumInput) |
||
30 | { |
||
31 | |||
32 | // Gamma exponent for inverse transformation |
||
33 | dfE = ICCCurveType.CurveGammaToDouble(curve.entry(0)); |
||
34 | for (int i = 0; i < dwNumInput; i++) |
||
35 | { |
||
36 | //UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'" |
||
37 | lut[i] = (float) System.Math.Pow((double) i / (dwNumInput - 1), dfE); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | /// <summary> Create an abbreviated string representation of a 16 bit lut.</summary> |
||
42 | /// <returns> the lut as a String |
||
43 | /// </returns> |
||
44 | public override System.String ToString() |
||
45 | { |
||
46 | System.Text.StringBuilder rep = new System.Text.StringBuilder("[LookUpTableGamma "); |
||
47 | //int row, col; |
||
48 | rep.Append("dfe= " + dfE); |
||
49 | rep.Append(", nentries= " + lut.Length); |
||
50 | return rep.Append("]").ToString(); |
||
51 | } |
||
52 | |||
53 | |||
54 | /* end class LookUpTableFPGamma */ |
||
55 | } |
||
56 | } |