Package net.imglib2.display
Class ColorTable16
java.lang.Object
net.imglib2.display.AbstractArrayColorTable<short[]>
net.imglib2.display.ColorTable16
- All Implemented Interfaces:
ArrayColorTable<short[]>,ColorTable
16-bit color lookup table.
- Author:
- Stephan Saalfeld, Curtis Rueden
-
Field Summary
Fields inherited from class net.imglib2.display.AbstractArrayColorTable
valuesFields inherited from interface net.imglib2.display.ColorTable
ALPHA, BLUE, GREEN, RED -
Constructor Summary
ConstructorsConstructorDescriptionInitializes a 16-bit color table with a linear grayscale ramp.ColorTable16(short[]... values) Initializes a 16-bit color table with the given table values. -
Method Summary
Modifier and TypeMethodDescriptionintget(int comp, int bin) Gets an individual value from the color table.intgetBits()Gets the number of bits in each color component value.intGets the number of elements for each color component in the table.intgetNative(int c, int i) Gets an individual value from the color table.intgetResampled(int comp, int bins, int bin) Gets an individual value from a color table with given number of bins.Methods inherited from class net.imglib2.display.AbstractArrayColorTable
argb, getComponentCount, getValues, lookupARGB
-
Constructor Details
-
ColorTable16
public ColorTable16()Initializes a 16-bit color table with a linear grayscale ramp. -
ColorTable16
public ColorTable16(short[]... values) Initializes a 16-bit color table with the given table values.
-
-
Method Details
-
getLength
public int getLength()Description copied from interface:ColorTableGets the number of elements for each color component in the table. -
getBits
public int getBits()Description copied from interface:ArrayColorTableGets the number of bits in each color component value. -
get
public int get(int comp, int bin) Description copied from class:AbstractArrayColorTableGets an individual value from the color table.Value is unsigned 8 bits.
- Specified by:
getin interfaceColorTable- Specified by:
getin classAbstractArrayColorTable<short[]>- 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 c, int i) Description copied from interface:ArrayColorTableGets an individual value from the color table.Value is unsigned with
ArrayColorTable.getBits()bits.- Parameters:
c- The color component to query.i- 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:AbstractArrayColorTableGets an individual value from a color table with given number of bins.Value is unsigned 8 bits.
- Specified by:
getResampledin interfaceColorTable- Specified by:
getResampledin classAbstractArrayColorTable<short[]>- 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.
-