Package com.luciad.imaging.operator.util
Class TLcdLookupTable.Builder
java.lang.Object
com.luciad.imaging.operator.util.TLcdLookupTable.Builder
- Enclosing class:
TLcdLookupTable
Builder for lookup tables. The default table has a single 8-bit color component per table entry and uses linear
interpolation. The dimensions of the table and actual table pixel data must be specified. You can specify the pixel
data using:
- an
index color model
- a
color map
- directly as a
buffer
TLcdLookupTable table = TLcdLookupTable.newBuilder().
fromColorMap(myColorMap).
build();
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the lookup table.componentCount
(int aComponentCount) Sets the number of components for a single table entry.componentType
(TLcdLookupTable.ComponentType aComponentType) Sets the type of a pixel component.Sets the table's entries directly from a buffer.dimensions
(int... aDimensions) Sets the dimensions of the table.fromColorMap
(TLcdColorMap aColorMap) Sets the table's dimensions, component count, component type, interpolation type, interval and data from a color map.fromIndexColorModel
(IndexColorModel aIndexColorModel) Sets the table's dimensions, component count, component type and data from an index color model.fromSignedIndexColorModel
(IndexColorModel aIndexColorModel) Sets the table's dimensions, component count, component type and data from an index color model that is used with signed indices.interpolation
(ELcdInterpolationType aInterpolationType) Sets the interpolation type between table pixels.mappedInterval
(double aMin, double aMax) Sets the the interval of values that should be mapped on the table data.mappedInterval
(ILcdInterval aInterval) Sets the the interval of values that should be mapped on the table data.
-
Method Details
-
dimensions
Sets the dimensions of the table.- Parameters:
aDimensions
- the size of the table along each dimension, the table must have at least 1 dimension and all sizes must be greater than 0- Returns:
- this builder
-
componentCount
Sets the number of components for a single table entry.- Parameters:
aComponentCount
- the number of components for a single entry- Returns:
- this builder
-
componentType
Sets the type of a pixel component.- Parameters:
aComponentType
- the type of a component- Returns:
- this builder
-
interpolation
Sets the interpolation type between table pixels.- Parameters:
aInterpolationType
- the interpolation type- Returns:
- this builder
-
data
Sets the table's entries directly from a buffer. The buffer should contain the appropriate number of bytes according to the tabledimensions(int[])
dimensions},component type
and#components
.- Parameters:
aPixelData
- the pixel buffer- Returns:
- this builder
-
mappedInterval
Sets the the interval of values that should be mapped on the table data.- Parameters:
aMin
- the interval minimumaMax
- the interval maximum- Returns:
- this builder
-
mappedInterval
Sets the the interval of values that should be mapped on the table data.- Parameters:
aInterval
- the interval of values that should be mapped on the table ornull
if it is unknown- Returns:
- this builder
-
fromIndexColorModel
Sets the table's dimensions, component count, component type and data from an index color model. After this call only the other properties, not affected by this call, should be modified. Note that some color models are intended for signed data. In this case you should usefromSignedIndexColorModel(java.awt.image.IndexColorModel)
.- Parameters:
aIndexColorModel
- the index color model- Returns:
- this builder
-
fromSignedIndexColorModel
Sets the table's dimensions, component count, component type and data from an index color model that is used with signed indices. After this call only the other properties, not affected by this call, should be modified. This should for example be used forTLcdIndexColorModel
's and the color models from aTLcdDTEDColorModelFactory
.- Parameters:
aIndexColorModel
- the index color model- Returns:
- this builder
-
fromColorMap
Sets the table's dimensions, component count, component type, interpolation type, interval and data from a color map. After this call only the interpolation and interval properties should be modified.- Parameters:
aColorMap
- the color map- Returns:
- this builder
-
build
Builds the lookup table.- Returns:
- the lookup table
-