Class TLcdComponentColorLookupTable

java.lang.Object
com.luciad.imaging.operator.util.ALcdColorLookupTable
com.luciad.imaging.operator.util.TLcdComponentColorLookupTable

public class TLcdComponentColorLookupTable extends ALcdColorLookupTable
A color lookup table that transforms each color component individually.

This represents a color transformations where each component of an input color is is mapped to the same component in the output color. A component-based filter typically requires less memory then a 3D table but it can only transform each component individually. Hence it is only suitable for color effects that do not mix multiple image components. For example a negative filter fits these limitations but a hue filter does not. You can use the builder to conveniently create component-based lookup tables.

A component-based lookup table can also be combined with a 3D table to efficiently implement non-linear color transformations:

  1. Use a component lookup table to remove the non-linearity of the transformation.
  2. Use a (transformed) 3D table to apply the actual transformation.
The tables used in this approach can typically be much smaller than with a single table.

A color is transformed by using each component as coordinate in its 1D lookup table. Assuming color components in [0,1], the color (0.0, 0.0, 0.0) is mapped to the first table entries and the color (1.0, 1.0, 1.0) to the last table entries. The other table entries are uniformly distributed between these. The values that lie between the table entries are computed depending on the ELcdInterpolationType. The alpha component of the color is unchanged.

Note that the interval on the component lookup tables are not used.

Since:
2013.0
  • Constructor Details

    • TLcdComponentColorLookupTable

      public TLcdComponentColorLookupTable(TLcdLookupTable aRedLut, TLcdLookupTable aGreenLut, TLcdLookupTable aBlueLut)
      Creates a component-based color lookup table.

      The lookup table should have 1 dimension and each entry should have 1 component.

      Parameters:
      aRedLut - the lookup table for the red color component
      aGreenLut - the lookup table for the green color component
      aBlueLut - the lookup table for the blue color component
  • Method Details

    • getRedLookupTable

      public TLcdLookupTable getRedLookupTable()
      Returns the lookup table for the red color component.
      Returns:
      the lookup table for the red color component.
    • getGreenLookupTable

      public TLcdLookupTable getGreenLookupTable()
      Returns the lookup table for the green color component.
      Returns:
      the lookup table for the green color component.
    • getBlueLookupTable

      public TLcdLookupTable getBlueLookupTable()
      Returns the lookup table for the blue color component.
      Returns:
      the lookup table for the blue color component.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • newBuilder

      public static TLcdComponentColorLookupTable.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object