Class TLcdBandColorSemanticsBuilder

java.lang.Object
com.luciad.imaging.TLcdBandColorSemanticsBuilder

public class TLcdBandColorSemanticsBuilder extends Object
Builder for creating ALcdBandColorSemantics instances. This builder can create a list of color semantics for all bands at once, or create one color semantic for a single band. When creating semantics for all bands via buildSemantics() only the configured ColorModel is used during the construction of the semantics. Other configured properties will be ignored, thus only the ColorModel needs to be set in this case.

When creating semantics for a single band via buildSingleBandSemantic() and a ColorModel has been set, than only the ColorModel and the component index are used during the construction of the semantics. If no ColorModel is set, at least the following properties must be set for all ALcdBandColorSemantics.Type except for ALcdBandColorSemantics.Type.ALPHA and ALcdBandColorSemantics.Type.PALETTE_INDEX:

For band type equal to ALcdBandColorSemantics.Type.ALPHA at least the following properties must be configured:

For band type equal to ALcdBandColorSemantics.Type.PALETTE_INDEX at least the following properties must be configured:

Example usages: Create semantics for all color bands based on a ColorModel:


   List semantics = TLcdBandColorSemanticsBuilder
     .newBuilder()
     .colorModel(cm)
     .buildSemantics();
 
Create semantic for a single RED color band using a ColorModel:

   ALcdBandColorSemantics s = TLcdBandColorSemanticsBuilder
     .newBuilder()
     .colorModel(cm)
     .componentIndex(0)
     .buildSingleBandSemantic();
 
Create semantic for a single RED color band without using a ColorModel:

 ALcdBandColorSemantics s = TLcdBandColorSemanticsBuilder
   .newBuilder()
   .type(ALcdBandColorSemantics.Type.RED)
   .dataType(ALcdBandSemantics.DataType.UNSIGNED_INT)
   .colorSpace(ColorModel.getRGBdefault().getColorSpace())
   .significantBits(16)
   .componentIndex(0)
   .buildSingleBandSemantic();
 
Since:
2015.0