Class OpCreators.ImageNormalizationBuilder

  • Enclosing class:
    OpCreators

    public static class OpCreators.ImageNormalizationBuilder
    extends java.lang.Object
    Builder for a OpCreators.TileOpCreator that can be used for image preprocessing using min/max percentiles or zero-mean-unit-variance normalization.
    • Constructor Detail

      • ImageNormalizationBuilder

        public ImageNormalizationBuilder()
    • Method Detail

      • percentiles

        public OpCreators.ImageNormalizationBuilder percentiles​(double minPercentile,
                                                                double maxPercentile)
        Specify min and max percentiles to calculate normalization values. See ImageOps.Normalize.percentile(double, double).
        Parameters:
        minPercentile -
        maxPercentile -
        Returns:
        this builder
      • eps

        public OpCreators.ImageNormalizationBuilder eps​(double eps)
        Error constant used for numerical stability and avoid dividing by zero. Default is 1e-6;
        Parameters:
        eps -
        Returns:
        this builder
      • perChannel

        public OpCreators.ImageNormalizationBuilder perChannel​(boolean perChannel)
        Compute the normalization values separately per channel; if false, values are computed jointly across channels.
        Parameters:
        perChannel -
        Returns:
        this builder
      • downsample

        public OpCreators.ImageNormalizationBuilder downsample​(double downsample)
        Specify the downsample factor to use when calculating the normalization. If this is not provided, then maxDimension(int) will be used to calculate a downsample value automatically.

        The downsample should be ≥ 1.0 and high enough to ensure that the entire image can be fit in memory. A downsample of 1.0 for a whole slide image will probably fail due to memory or array size limits.

        Parameters:
        downsample -
        Returns:
        this builder see maxDimension(int)
      • maxDimension

        public OpCreators.ImageNormalizationBuilder maxDimension​(int maxDimension)
        The maximum width or height, which is used to calculate a downsample factor for the image if downsample(double) is not specified.

        The current default value is 2048;

        Parameters:
        maxDimension -
        Returns:
        this builder
      • useMask

        public OpCreators.ImageNormalizationBuilder useMask​(boolean useMask)
        Optionally use any ROI mask provided for the calculation. This can restrict the region that is considered.
        Parameters:
        useMask -
        Returns:
        this builder