Package qupath.lib.analysis.images
Class ContourTracing.ChannelThreshold
java.lang.Object
qupath.lib.analysis.images.ContourTracing.ChannelThreshold
- Enclosing class:
ContourTracing
Helper class defining global thresholds to apply to a single image channel.
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(int channel) Create a simple channel threshold.create
(int channel, double minThreshold, double maxThreshold) Create a threshold to select values between a minimum and maximum (inclusive).createAbove
(int channel, double minThreshold) Create a threshold to select values greater than or equal to a specified threshold.createBelow
(int channel, double maxThreshold) Create a threshold to select values less than or equal to a specified threshold.createExactly
(int channel, double threshold) Create a threshold to select values that are exactly equal to a specified threshold.int
Get the channel to threshold.double
Get the maximum threshold value.double
Get the minimum threshold value.toString()
-
Method Details
-
create
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 thresholdminThreshold
- minimum value (inclusive)maxThreshold
- maximum value (inclusive)- Returns:
-
createAbove
Create a threshold to select values greater than or equal to a specified threshold.- Parameters:
channel
- the channel to thresholdminThreshold
- the minimum threshold to apply- Returns:
-
createBelow
Create a threshold to select values less than or equal to a specified threshold.- Parameters:
channel
- the channel to thresholdmaxThreshold
- the maximum threshold to apply- Returns:
-
createExactly
Create a threshold to select values that are exactly equal to a specified threshold.- Parameters:
channel
- the channel to thresholdthreshold
- the threshold value- Returns:
-
getMinThreshold
public double getMinThreshold()Get the minimum threshold value. This may beFloat.NEGATIVE_INFINITY
if no minimum threshold is required.- Returns:
-
getMaxThreshold
public double getMaxThreshold()Get the maximum threshold value. This may beFloat.POSITIVE_INFINITY
if no minimum threshold is required.- Returns:
-
getChannel
public int getChannel()Get the channel to threshold.- Returns:
-
toString
-