Class AbstractArrayColorTable<T>

java.lang.Object
net.imglib2.display.AbstractArrayColorTable<T>
All Implemented Interfaces:
ArrayColorTable<T>, ColorTable
Direct Known Subclasses:
ColorTable16, ColorTable8

public abstract class AbstractArrayColorTable<T> extends Object implements ArrayColorTable<T>
Abstract superclass for array-based color lookup tables.
  • Field Details

    • values

      protected final T[] values
      Actual color table values.
  • Constructor Details

    • AbstractArrayColorTable

      public AbstractArrayColorTable(T... values)
      Initializes a color table with the given table values.
  • Method Details

    • getValues

      public T[] getValues()
      Description copied from interface: ArrayColorTable
      Gets a copy of the entire color table.
      Specified by:
      getValues in interface ArrayColorTable<T>
    • argb

      public int argb(int i)
      Description copied from interface: ArrayColorTable
      Converts the tuple at the given position into a packed ARGB value.
      Specified by:
      argb in interface ArrayColorTable<T>
    • lookupARGB

      public int lookupARGB(double min, double max, double value)
      Specified by:
      lookupARGB in interface ColorTable
    • getComponentCount

      public int getComponentCount()
      Description copied from interface: ColorTable
      Gets the number of color components in the table (typically 3 for RGB or 4 for RGBA).
      Specified by:
      getComponentCount in interface ColorTable