Package com.luciad.imaging.operator.util
Class TLcdComponentColorLookupTable.Builder<B extends TLcdComponentColorLookupTable.Builder<B>>
java.lang.Object
com.luciad.imaging.operator.util.TLcdComponentColorLookupTable.Builder<B>
- Enclosing class:
TLcdComponentColorLookupTable
public static class TLcdComponentColorLookupTable.Builder<B extends TLcdComponentColorLookupTable.Builder<B>>
extends Object
Builder for component-based color lookup table's. The default table's are
2 pixels
wide with 8-bit color components and use linear interpolation. The actual filter must be
specified as either a ColorFilter or pixel
buffers.
For example to create a negative filter:
TLcdComponentColorLookupTable table = TLcdComponentColorLookupTable.newBuilder().
filter(
new ILcdColorFilter() {
public void apply( float[] aRGBColorSFCT ) {
aRGBColorSFCT[ 0 ] = 1.f - aRGBColorSFCT[ 0 ];
aRGBColorSFCT[ 1 ] = 1.f - aRGBColorSFCT[ 1 ];
aRGBColorSFCT[ 2 ] = 1.f - aRGBColorSFCT[ 2 ];
}
}
).
build();
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the color lookup table.componentType(TLcdLookupTable.ComponentType aComponentType) Sets the type of the table's color components.filter(ILcdColorFilter aColorFilter) Sets the table's entries from a color filter.Sets the each component table's entries directly from a buffer.Sets the component table's entries directly from a buffer.interpolation(ELcdInterpolationType aInterpolationType) Sets the interpolation type between table pixels.size(int aSize) Sets the size of all table's.size(int aRedSize, int aGreenSize, int aBlueSize) Sets the size of each component's table.
-
Method Details
-
size
Sets the size of all table's.- Parameters:
aSize- the size of the table's- Returns:
- this builder
-
size
Sets the size of each component's table.- Parameters:
aRedSize- the size for the red color componentaGreenSize- the size for the green color componentaBlueSize- the size for the blue color component- Returns:
- this builder
-
componentType
Sets the type of the table's color components. Typically a byte provides sufficient accuracy for rendering.- Parameters:
aComponentType- the component type- Returns:
- this builder
-
interpolation
Sets the interpolation type between table pixels. Note that onlyNONEandLINEARare currently supported.- Parameters:
aInterpolationType- the interpolation type- Returns:
- this builder
-
filter
Sets the table's entries from a color filter.- Parameters:
aColorFilter- the color filter- Returns:
- this builder
-
filter
Sets the each component table's entries directly from a buffer. The buffers should contain the appropriate number of bytes according to the tabletable sizeandcomponent type. Each table entry has 1 component. SeeTLcdComponentColorLookupTableandTLcdLookupTablefor details.- Parameters:
aPixelData- the pixel buffer- Returns:
- this builder
-
filter
Sets the component table's entries directly from a buffer. The buffers should contain the appropriate number of bytes according to the tabletable sizeandcomponent type. Each table entry has 1 component. SeeTLcdComponentColorLookupTableandTLcdLookupTablefor details.- Parameters:
aRedPixelData- the pixel bufferaGreenPixelData- the pixel bufferaBluePixelData- the pixel buffer- Returns:
- this builder
-
build
Builds the color lookup table.- Returns:
- the color lookup table
-