Class TLcdBandSelectOp

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

public final class TLcdBandSelectOp extends ALcdImageOperator
Extracts a subset of the color bands of an image and/or reorders the bands.

For color data the bands should generally not be re-ordered. Otherwise they may or may not be interpreted as a color anymore. See here for details.

Example


   // Using the static method:
   ALcdImage inputImage = ...;
   int[] bands = new int[]{0};
   ALcdImage outputImage = TLcdBandSelectOp.bandSelect(inputImage, bands);

   // Using a data object:
   ALcdImage inputImage = ...;
   int[] bands = new int[]{0};
   TLcdBandSelectOp op = new TLcdBandSelectOp();
   ILcdDataObject params = op.getParameterDataType().newInstance();
   params.setValue(TLcdBandSelectOp.INPUT_IMAGE, inputImage);
   params.setValue(TLcdBandSelectOp.INPUT_BANDS, bands);
   ALcdImage 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.
    • INPUT_BANDS

      public static final TLcdDataProperty INPUT_BANDS
      The indices of the bands to be retained, in the order in which they are to appear in the output.
    • BAND_SELECT_FILTER_TYPE

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

    • TLcdBandSelectOp

      public TLcdBandSelectOp()
      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
    • bandSelect

      public static ALcdImage bandSelect(ALcdImage aSource, int[] aBands)
      Extracts a subset of the bands from the given image and/or reorders the bands.
      Parameters:
      aSource - the image to be processed
      aBands - the indices of the bands to be retained, in the order in which they are to appear in the output
      Returns:
      image containing only the specified bands of the source image