Class TLcdCompositeOp

java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdCompositeOp

public class TLcdCompositeOp extends ALcdImageOperator
Composes two ALcdBasicImages. This operator results in an image that covers the (spatial) union of the input images.

The composite contains the pixels of the first image without any change. However if the second image may be re-sampled if its pixel grid does not align with that of the first image (ex. due to a different pixel size).

Note:

  • Compositing can result in an ALcdBasicImage with a different spatial bounds from the input images.
  • If one of the input pixels of the input image has a "no data" value, the result for the current pixel is also "no data".

Example


 // Using the static method:
 ALcdBasicImage inputImage = ...;
 ALcdBasicImage secondImage = ...;
 ALcdBasicImage outputImage = TLcdCompositeOp.composite(inputImage, secondImage);

 // Using a data object:
 ALcdBasicImage inputImage = ...;
 ALcdBasicImage secondImage = ...;
 TLcdCompositeOp op = new TLcdCompositeOp();
 ILcdDataObject params = op.getParameterDataType().newInstance();
 params.setValue(TLcdCompositeOp.INPUT_IMAGE, inputImage);
 params.setValue(TLcdCompositeOp.SECOND_IMAGE, secondImage);
 ALcdBasicImage outputImage = op.apply(params);
 
Input

+

Output
Since:
2014.0
  • Field Details

    • NAME

      public static final String NAME
      Name of the operator.
      See Also:
    • INPUT_IMAGE

      public static final TLcdDataProperty INPUT_IMAGE
      The input image.
    • SECOND_IMAGE

      public static final TLcdDataProperty SECOND_IMAGE
      Image to overlay on top of the input image.
    • COMPOSITE_FILTER_TYPE

      public static final TLcdDataType COMPOSITE_FILTER_TYPE
      Input data type of the operator.
  • Constructor Details

    • TLcdCompositeOp

      public TLcdCompositeOp()
      Default constructor.
  • Method Details

    • apply

      public ALcdImage apply(ILcdDataObject aParameters)
      Description copied from class: ALcdImageOperator
      Applies this operator to the given input parameters. The parameters are stored in a data object which must be of the type given by ALcdImageOperator.getParameterDataType().
      Specified by:
      apply in class ALcdImageOperator
      Parameters:
      aParameters - the parameters for the operator
      Returns:
      the image produced by the operator
    • composite

      public static ALcdBasicImage composite(ALcdBasicImage aInputImage, ALcdBasicImage aSecondImage)
      Compose two images.
      Parameters:
      aInputImage - the input image.
      aSecondImage - image to overlay on top of the input.
      Returns:
      the input image with the second image on top of it.