Class TLcdLookupTable

java.lang.Object
com.luciad.imaging.operator.util.TLcdLookupTable

public class TLcdLookupTable extends Object
An immutable lookup table.

The number of entries in the table is equal to the product of its sizes. Each entry has getComponentCount() components of a specific type. The values that lie between the table entries are computed depending on the ELcdInterpolationType.

The entries in the data buffer are first ordered along the first dimension, then along the second (if it exists), and so on. The components of an entry are consecutive.

You can use the builder to conveniently create a lookup table.

Since:
2013.0
  • Constructor Details

    • TLcdLookupTable

      public TLcdLookupTable(int[] aDimensions, int aComponentCount, TLcdLookupTable.ComponentType aComponentType, ELcdInterpolationType aInterpolation, Buffer aData)
      Creates a lookup table with user-defined settings.

      The data contains the the product of the aDimensions entries with each aComponentCount components of type aComponentType.

      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
      aComponentCount - the number of components for a single entry
      aComponentType - the type of a component
      aInterpolation - the interpolation type for the components
      aData - the buffer that contains the data
  • Method Details

    • getDimensionCount

      public int getDimensionCount()
      Returns the number of dimensions of the lookup table.
      Returns:
      the number of dimensions
    • getSize

      public int getSize(int aDimension)
      Returns the size of the table along the specified dimension.
      Parameters:
      aDimension - the dimension in [0, getDimensionCount()[.
      Returns:
      the size along the aDimension'th dimension
    • getComponentCount

      public int getComponentCount()
      The number of components for a single entry in the table.
      Returns:
      the number of components
    • getComponentType

      public TLcdLookupTable.ComponentType getComponentType()
      The type of a component.
      Returns:
      the type of a component
    • getInterpolation

      public ELcdInterpolationType getInterpolation()
      Returns the type of interpolation that is used for evaluating values that lie between table entries.
      Returns:
      the interpolation type
    • getData

      public Buffer getData()
      Returns the buffer with the table data.
      Returns:
      the buffer with the table data
    • getInterval

      public ILcdInterval getInterval()
      Returns the interval of values that should be mapped on the table data.
      Returns:
      the interval or null if it is unknown
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • newBuilder

      public static TLcdLookupTable.Builder newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.