Package net.imglib2.display
Class AbstractArrayColorTable<T>
java.lang.Object
net.imglib2.display.AbstractArrayColorTable<T>
- All Implemented Interfaces:
ArrayColorTable<T>,ColorTable
- Direct Known Subclasses:
ColorTable16,ColorTable8
Abstract superclass for array-based color lookup tables.
- Author:
- Stephan Saalfeld, Curtis Rueden, Mark Hiner
-
Field Summary
FieldsFields inherited from interface net.imglib2.display.ColorTable
ALPHA, BLUE, GREEN, RED -
Constructor Summary
ConstructorsConstructorDescriptionAbstractArrayColorTable(T... values) Initializes a color table with the given table values. -
Method Summary
Modifier and TypeMethodDescriptionintargb(int i) Converts the tuple at the given position into a packed ARGB value.abstract intget(int comp, int bin) Gets an individual value from the color table.intGets the number of color components in the table (typically 3 for RGB or 4 for RGBA).abstract intgetResampled(int comp, int bins, int bin) Gets an individual value from a color table with given number of bins.T[]Gets a copy of the entire color table.intlookupARGB(double min, double max, double value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.imglib2.display.ArrayColorTable
getBits, getNativeMethods inherited from interface net.imglib2.display.ColorTable
getLength
-
Field Details
-
values
Actual color table values.
-
-
Constructor Details
-
AbstractArrayColorTable
Initializes a color table with the given table values.
-
-
Method Details
-
getValues
Description copied from interface:ArrayColorTableGets a copy of the entire color table.- Specified by:
getValuesin interfaceArrayColorTable<T>
-
argb
public int argb(int i) Description copied from interface:ArrayColorTableConverts the tuple at the given position into a packed ARGB value.- Specified by:
argbin interfaceArrayColorTable<T>
-
lookupARGB
public int lookupARGB(double min, double max, double value) - Specified by:
lookupARGBin interfaceColorTable
-
getComponentCount
public int getComponentCount()Description copied from interface:ColorTableGets the number of color components in the table (typically 3 for RGB or 4 for RGBA).- Specified by:
getComponentCountin interfaceColorTable
-
get
public abstract int get(int comp, int bin) Gets an individual value from the color table.Value is unsigned 8 bits.
- Specified by:
getin interfaceColorTable- 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 abstract int getResampled(int comp, int bins, int bin) Gets an individual value from a color table with given number of bins.Value is unsigned 8 bits.
- Specified by:
getResampledin interfaceColorTable- 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.
-