corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | /// <summary>************************************************************************** |
2 | /// |
||
3 | /// $Id: LookUpTable16Gamma.java,v 1.1 2002/07/25 14:56:46 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> A Gamma based 16 bit lut. |
||
15 | /// |
||
16 | /// </summary> |
||
17 | /// <seealso cref="jj2000.j2k.icc.tags.ICCCurveType"> |
||
18 | /// </seealso> |
||
19 | /// <version> 1.0 |
||
20 | /// </version> |
||
21 | /// <author> Bruce A. Kern |
||
22 | /// </author> |
||
23 | public class LookUpTable16Gamma:LookUpTable16 |
||
24 | { |
||
25 | |||
26 | /* Construct the lut |
||
27 | * @param curve data |
||
28 | * @param dwNumInput size of lut |
||
29 | * @param dwMaxOutput max value of lut |
||
30 | */ |
||
31 | public LookUpTable16Gamma(ICCCurveType curve, int dwNumInput, int dwMaxOutput):base(curve, dwNumInput, dwMaxOutput) |
||
32 | { |
||
33 | double dfE = ICCCurveType.CurveGammaToDouble(curve.entry(0)); // Gamma exponent for inverse transformation |
||
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] = (short) System.Math.Floor(System.Math.Pow((double) i / (dwNumInput - 1), dfE) * dwMaxOutput + 0.5); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | /* end class LookUpTable16Gamma */ |
||
42 | } |
||
43 | } |