icc.lut
Class MatrixBasedTransformTosRGB

java.lang.Object
  |
  +--icc.lut.MatrixBasedTransformTosRGB

public class MatrixBasedTransformTosRGB
extends java.lang.Object

Transform for applying ICCProfiling to an input DataBlk

See Also:
DataBlkInt, DataBlkFloat

Field Summary
private static int BLUE
           
private  int dwMaxCols
           
private  int dwMaxRows
           
private  int[] dwMaxValue
           
private  int[] dwShiftValue
           
private static java.lang.String eol
           
private  float[][] fBuf
           
private  LookUpTableFP[] fLut
           
private static int GREEN
           
private static double ksRGBExponent
           
private static double ksRGBReduceAfterExp
           
private static double ksRGBScaleAfterExp
           
private static double ksRGBShadowCutoff
           
private static double ksRGBShadowSlope
           
private  LookUpTable32LinearSRGBtoSRGB lut
           
private static int M00
           
private static int M01
           
private static int M02
           
private static int M10
           
private static int M11
           
private static int M12
           
private static int M20
           
private static int M21
           
private static int M22
           
private  double[] matrix
           
private static int RED
           
private static double SRGB00
           
private static double SRGB01
           
private static double SRGB02
           
private static double SRGB10
           
private static double SRGB11
           
private static double SRGB12
           
private static double SRGB20
           
private static double SRGB21
           
private static double SRGB22
           
 
Constructor Summary
MatrixBasedTransformTosRGB(RestrictedICCProfile ricc, int[] dwMaxValue, int[] dwShiftValue)
          Construct a 3 component transform based on an input RestricedICCProfile This transform will pass the input throught a floating point lut (LookUpTableFP), apply a matrix to the output and finally pass the intermediate buffer through a 8-bit lut (LookUpTable8).
 
Method Summary
 void apply(DataBlkFloat[] inb, DataBlkFloat[] outb)
          Performs the transform.
 void apply(DataBlkInt[] inb, DataBlkInt[] outb)
          Performs the transform.
private  double[] createMatrix(RestrictedICCProfile ricc, int[] maxValues)
           
private static void standardizeMatrixLineThroughLut(DataBlkFloat inb, float[] out, float dwInputMaxValue, LookUpTableFP lut)
           
private static void standardizeMatrixLineThroughLut(DataBlkInt inb, float[] out, int dwInputMaxValue, LookUpTableFP lut)
           
 java.lang.String toString()
          String representation of class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eol

private static final java.lang.String eol

RED

private static final int RED
See Also:
Constant Field Values

GREEN

private static final int GREEN
See Also:
Constant Field Values

BLUE

private static final int BLUE
See Also:
Constant Field Values

SRGB00

private static final double SRGB00
See Also:
Constant Field Values

SRGB01

private static final double SRGB01
See Also:
Constant Field Values

SRGB02

private static final double SRGB02
See Also:
Constant Field Values

SRGB10

private static final double SRGB10
See Also:
Constant Field Values

SRGB11

private static final double SRGB11
See Also:
Constant Field Values

SRGB12

private static final double SRGB12
See Also:
Constant Field Values

SRGB20

private static final double SRGB20
See Also:
Constant Field Values

SRGB21

private static final double SRGB21
See Also:
Constant Field Values

SRGB22

private static final double SRGB22
See Also:
Constant Field Values

M00

private static final int M00
See Also:
Constant Field Values

M01

private static final int M01
See Also:
Constant Field Values

M02

private static final int M02
See Also:
Constant Field Values

M10

private static final int M10
See Also:
Constant Field Values

M11

private static final int M11
See Also:
Constant Field Values

M12

private static final int M12
See Also:
Constant Field Values

M20

private static final int M20
See Also:
Constant Field Values

M21

private static final int M21
See Also:
Constant Field Values

M22

private static final int M22
See Also:
Constant Field Values

ksRGBExponent

private static final double ksRGBExponent
See Also:
Constant Field Values

ksRGBScaleAfterExp

private static final double ksRGBScaleAfterExp
See Also:
Constant Field Values

ksRGBReduceAfterExp

private static final double ksRGBReduceAfterExp
See Also:
Constant Field Values

ksRGBShadowCutoff

private static final double ksRGBShadowCutoff
See Also:
Constant Field Values

ksRGBShadowSlope

private static final double ksRGBShadowSlope
See Also:
Constant Field Values

matrix

private final double[] matrix

fLut

private LookUpTableFP[] fLut

lut

private LookUpTable32LinearSRGBtoSRGB lut

dwMaxValue

private final int[] dwMaxValue

dwShiftValue

private final int[] dwShiftValue

dwMaxCols

private int dwMaxCols

dwMaxRows

private int dwMaxRows

fBuf

private float[][] fBuf
Constructor Detail

MatrixBasedTransformTosRGB

public MatrixBasedTransformTosRGB(RestrictedICCProfile ricc,
                                  int[] dwMaxValue,
                                  int[] dwShiftValue)
Construct a 3 component transform based on an input RestricedICCProfile This transform will pass the input throught a floating point lut (LookUpTableFP), apply a matrix to the output and finally pass the intermediate buffer through a 8-bit lut (LookUpTable8). This operation will be designated (LFP*M*L8) * Data The operators (LFP*M*L8) are constructed here. Although the data for only one component is returned, the transformation must be done for all components, because the matrix application involves a linear combination of component input to produce the output.

Parameters:
ricc - input profile
dwMaxValue - clipping value for output.
Method Detail

toString

public java.lang.String toString()
String representation of class

Overrides:
toString in class java.lang.Object
Returns:
suitable representation for class

createMatrix

private double[] createMatrix(RestrictedICCProfile ricc,
                              int[] maxValues)

apply

public void apply(DataBlkInt[] inb,
                  DataBlkInt[] outb)
           throws MatrixBasedTransformException
Performs the transform. Pass the input throught the LookUpTableFP, apply the matrix to the output and finally pass the intermediate buffer through the LookUpTable8. This operation is designated (LFP*M*L8) * Data are already constructed. Although the data for only one component is returned, the transformation must be done for all components, because the matrix application involves a linear combination of component input to produce the output.

Parameters:
inb - input data block
outb - output data block
Throws:
MatrixBasedTransformException

apply

public void apply(DataBlkFloat[] inb,
                  DataBlkFloat[] outb)
           throws MatrixBasedTransformException
Performs the transform. Pass the input throught the LookUpTableFP, apply the matrix to the output and finally pass the intermediate buffer through the LookUpTable8. This operation is designated (LFP*M*L8) * Data are already constructed. Although the data for only one component is returned, the transformation must be done for all components, because the matrix application involves a linear combination of component input to produce the output.

Parameters:
inb - input data block
outb - output data block
Throws:
MatrixBasedTransformException

standardizeMatrixLineThroughLut

private static void standardizeMatrixLineThroughLut(DataBlkInt inb,
                                                    float[] out,
                                                    int dwInputMaxValue,
                                                    LookUpTableFP lut)

standardizeMatrixLineThroughLut

private static void standardizeMatrixLineThroughLut(DataBlkFloat inb,
                                                    float[] out,
                                                    float dwInputMaxValue,
                                                    LookUpTableFP lut)