Class ColorTable8

    • Constructor Summary

      Constructors 
      Constructor Description
      ColorTable8()
      Initializes an 8-bit color table with a linear grayscale ramp.
      ColorTable8​(byte[]... values)
      Initializes an 8-bit color table with the given table values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get​(int comp, int bin)
      Gets an individual value from the color table.
      int getBits()
      Gets the number of bits in each color component value.
      int getLength()
      Gets the number of elements for each color component in the table.
      int getNative​(int comp, int bin)
      Gets an individual value from the color table.
      int getResampled​(int comp, int bins, int bin)
      Gets an individual value from a color table with given number of bins.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ColorTable8

        public ColorTable8()
        Initializes an 8-bit color table with a linear grayscale ramp.
      • ColorTable8

        public ColorTable8​(byte[]... values)
        Initializes an 8-bit color table with the given table values.
    • Method Detail

      • getLength

        public int getLength()
        Description copied from interface: ColorTable
        Gets the number of elements for each color component in the table.
      • getBits

        public int getBits()
        Description copied from interface: ArrayColorTable
        Gets the number of bits in each color component value.
      • get

        public int get​(int comp,
                       int bin)
        Description copied from class: AbstractArrayColorTable
        Gets an individual value from the color table.

        Value is unsigned 8 bits.

        Specified by:
        get in interface ColorTable
        Specified by:
        get in class AbstractArrayColorTable<byte[]>
        Parameters:
        comp - The color component to query.
        bin - The index into the color table.
        Returns:
        The value of the table at the specified position.
      • getNative

        public int getNative​(int comp,
                             int bin)
        Description copied from interface: ArrayColorTable
        Gets an individual value from the color table.

        Value is unsigned with ArrayColorTable.getBits() bits.

        Parameters:
        comp - The color component to query.
        bin - The index into the color table.
        Returns:
        The value of the table at the specified position.
      • getResampled

        public int getResampled​(int comp,
                                int bins,
                                int bin)
        Description copied from class: AbstractArrayColorTable
        Gets an individual value from a color table with given number of bins.

        Value is unsigned 8 bits.

        Specified by:
        getResampled in interface ColorTable
        Specified by:
        getResampled in class AbstractArrayColorTable<byte[]>
        Parameters:
        comp - The color component to query.
        bins - The total number of bins.
        bin - The index into the color table.
        Returns:
        The value of the table at the specified position.