Class StxFactory

java.lang.Object
org.esa.snap.core.datamodel.StxFactory

public class StxFactory extends Object
The factory for Stx instances. The design of this class is following the Builder pattern.
  • Field Details

  • Constructor Details

    • StxFactory

      public StxFactory()
  • Method Details

    • withMinimum

      public StxFactory withMinimum(Number minimum)
    • withMaximum

      public StxFactory withMaximum(Number maximum)
    • withMean

      public StxFactory withMean(Number mean)
    • withStandardDeviation

      public StxFactory withStandardDeviation(Number standardDeviation)
    • withIntHistogram

      public StxFactory withIntHistogram(boolean intHistogram)
    • withLogHistogram

      public StxFactory withLogHistogram(boolean logHistogram)
    • withHistogram

      public StxFactory withHistogram(WrappedHistogram histogram)
    • withResolutionLevel

      public StxFactory withResolutionLevel(Integer resolutionLevel)
    • withRoiMask

      public StxFactory withRoiMask(Mask roiMask)
    • withRoiImage

      public StxFactory withRoiImage(RenderedImage roiImage)
      Parameters:
      roiImage - The ROI image. Ignored if ROI mask is used.
      Returns:
      This instance.
    • withRoiShape

      public StxFactory withRoiShape(Shape roiShape)
    • withHistogramBinCount

      public StxFactory withHistogramBinCount(Integer histogramBinCount)
    • withHistogramBins

      public StxFactory withHistogramBins(int[] histogramBins)
    • create

      public Stx create()
      Creates an Stx instance.
      Returns:
      The statistics.
    • create

      public Stx create(Mask[] roiMasks, RasterDataNode[] rasters, ProgressMonitor pm)
      Computes statistics for the given set of raster data nodes.
      Parameters:
      roiMasks - An array of roi masks, must be null or have the same length as rasters.
      rasters - The raster data nodes.
      pm - A progress monitor.
      Returns:
      The statistics.
    • create

      public Stx create(RasterDataNode raster, ProgressMonitor pm)
      Computes statistics for the given raster data node.
      Parameters:
      raster - The raster data node.
      pm - A progress monitor.
      Returns:
      The statistics.
    • accumulate

      public static void accumulate(RasterDataNode rasterDataNode, int level, RenderedImage roiImage, Shape roiShape, org.esa.snap.core.datamodel.StxOp op, ProgressMonitor pm)