Class TLcdLookupTable.Builder

java.lang.Object
com.luciad.imaging.operator.util.TLcdLookupTable.Builder
Enclosing class:
TLcdLookupTable

public static class TLcdLookupTable.Builder extends Object
Builder for lookup tables. The default table has a single 8-bit color component per table entry and uses linear interpolation. The dimensions of the table and actual table pixel data must be specified. You can specify the pixel data using:

For example to create a table based on a color map:


   TLcdLookupTable table = TLcdLookupTable.newBuilder().
     fromColorMap(myColorMap).
     build();
 
  • Method Details

    • dimensions

      public TLcdLookupTable.Builder dimensions(int... aDimensions)
      Sets the dimensions of the table.
      Parameters:
      aDimensions - the size of the table along each dimension, the table must have at least 1 dimension and all sizes must be greater than 0
      Returns:
      this builder
    • componentCount

      public TLcdLookupTable.Builder componentCount(int aComponentCount)
      Sets the number of components for a single table entry.
      Parameters:
      aComponentCount - the number of components for a single entry
      Returns:
      this builder
    • componentType

      public TLcdLookupTable.Builder componentType(TLcdLookupTable.ComponentType aComponentType)
      Sets the type of a pixel component.
      Parameters:
      aComponentType - the type of a component
      Returns:
      this builder
    • interpolation

      public TLcdLookupTable.Builder interpolation(ELcdInterpolationType aInterpolationType)
      Sets the interpolation type between table pixels.
      Parameters:
      aInterpolationType - the interpolation type
      Returns:
      this builder
    • data

      public TLcdLookupTable.Builder data(Buffer aPixelData)
      Sets the table's entries directly from a buffer.

      The buffer should contain the appropriate number of bytes according to the table dimensions(int[]) dimensions}, component type and #components.

      Parameters:
      aPixelData - the pixel buffer
      Returns:
      this builder
    • mappedInterval

      public TLcdLookupTable.Builder mappedInterval(double aMin, double aMax)
      Sets the the interval of values that should be mapped on the table data.
      Parameters:
      aMin - the interval minimum
      aMax - the interval maximum
      Returns:
      this builder
    • mappedInterval

      public TLcdLookupTable.Builder mappedInterval(ILcdInterval aInterval)
      Sets the the interval of values that should be mapped on the table data.
      Parameters:
      aInterval - the interval of values that should be mapped on the table or null if it is unknown
      Returns:
      this builder
    • fromIndexColorModel

      public TLcdLookupTable.Builder fromIndexColorModel(IndexColorModel aIndexColorModel)
      Sets the table's dimensions, component count, component type and data from an index color model.

      After this call only the other properties, not affected by this call, should be modified.

      Note that some color models are intended for signed data. In this case you should use fromSignedIndexColorModel(java.awt.image.IndexColorModel).

      Parameters:
      aIndexColorModel - the index color model
      Returns:
      this builder
    • fromSignedIndexColorModel

      public TLcdLookupTable.Builder fromSignedIndexColorModel(IndexColorModel aIndexColorModel)
      Sets the table's dimensions, component count, component type and data from an index color model that is used with signed indices.

      After this call only the other properties, not affected by this call, should be modified.

      This should for example be used for TLcdIndexColorModel's and the color models from a TLcdDTEDColorModelFactory.

      Parameters:
      aIndexColorModel - the index color model
      Returns:
      this builder
    • fromColorMap

      public TLcdLookupTable.Builder fromColorMap(TLcdColorMap aColorMap)
      Sets the table's dimensions, component count, component type, interpolation type, interval and data from a color map.

      After this call only the interpolation and interval properties should be modified.

      Parameters:
      aColorMap - the color map
      Returns:
      this builder
    • build

      public TLcdLookupTable build()
      Builds the lookup table.
      Returns:
      the lookup table