Class TLcdHistogramOp

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

public final class TLcdHistogramOp extends ALcdImageOperator
Computes a histogram of a given image. Produces a one-dimensional output image with integer components.

When the input image consists of multiple bands, the resulting one-dimensional output image will consist of multiple bands as well. I.e., a histogram is computed for each band in the input image.

Example


   // Using the static method:
   ALcdImage inputImage = ...;
   int binCount = ...;
   ALcdImage outputImage = TLcdHistogramOp.histogram(inputImage,binCount);

   // Using a data object:
   ALcdImage inputImage = ...;
   TLcdHistogramOp op = new TLcdHistogramOp();
   ILcdDataObject params = op.getParameterDataType().newInstance();
   params.setValue(TLcdHistogramOp.INPUT_IMAGE,image);
   params.setValue(TLcdHistogramOp.BIN_COUNT,binCount);
   ALcdImage outputImage = op.apply(params);
 
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.
    • BIN_COUNT

      public static final TLcdDataProperty BIN_COUNT
      Number of bins in the resulting histogram.
    • HISTOGRAM_FILTER_TYPE

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

    • TLcdHistogramOp

      public TLcdHistogramOp()
      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
    • histogram

      public static ALcdImage histogram(ALcdBasicImage aSource, int aBinCount)
      Creates a histogram operator for a given input image.
      Parameters:
      aSource - the image to be processed
      aBinCount - the number of bins of the resulting histogram
      Returns:
      the histogram operator