Class ContourTracing.ChannelThreshold

java.lang.Object
qupath.lib.analysis.images.ContourTracing.ChannelThreshold
Enclosing class:
ContourTracing

public static class ContourTracing.ChannelThreshold extends Object
Helper class defining global thresholds to apply to a single image channel.
Author:
Pete Bankhead
  • Method Details

    • create

      public static ContourTracing.ChannelThreshold create(int channel)
      Create a simple channel threshold. This contains no intensity values (min/max thresholds are infinity) but it is useful for thresholding classification images. In this case, the channel refers to the classification label.
      Parameters:
      channel -
      Returns:
    • create

      public static ContourTracing.ChannelThreshold create(int channel, double minThreshold, double maxThreshold)
      Create a threshold to select values between a minimum and maximum (inclusive).
      Parameters:
      channel - channel to threshold
      minThreshold - minimum value (inclusive)
      maxThreshold - maximum value (inclusive)
      Returns:
    • createAbove

      public static ContourTracing.ChannelThreshold createAbove(int channel, double minThreshold)
      Create a threshold to select values greater than or equal to a specified threshold.
      Parameters:
      channel - the channel to threshold
      minThreshold - the minimum threshold to apply
      Returns:
    • createBelow

      public static ContourTracing.ChannelThreshold createBelow(int channel, double maxThreshold)
      Create a threshold to select values less than or equal to a specified threshold.
      Parameters:
      channel - the channel to threshold
      maxThreshold - the maximum threshold to apply
      Returns:
    • createExactly

      public static ContourTracing.ChannelThreshold createExactly(int channel, double threshold)
      Create a threshold to select values that are exactly equal to a specified threshold.
      Parameters:
      channel - the channel to threshold
      threshold - the threshold value
      Returns:
    • getMinThreshold

      public double getMinThreshold()
      Get the minimum threshold value. This may be Float.NEGATIVE_INFINITY if no minimum threshold is required.
      Returns:
    • getMaxThreshold

      public double getMaxThreshold()
      Get the maximum threshold value. This may be Float.POSITIVE_INFINITY if no minimum threshold is required.
      Returns:
    • getChannel

      public int getChannel()
      Get the channel to threshold.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object