Package qupath.imagej.processing
Class SimpleThresholding
java.lang.Object
qupath.imagej.processing.SimpleThresholding
Collection of static methods to threshold images, either with single global thresholds or 
 using the pixel values of a second image.
 
Output is a ByteProcessor where 255 represents 'positive' pixels, and zero represents the background.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ByteProcessorgreaterThan(ImageProcessor ip1, ImageProcessor ip2) Created a binary image by thresholding pixels to find where ip1 > ip2static ByteProcessorgreaterThanOrEqual(ImageProcessor ip1, ImageProcessor ip2) Created a binary image by thresholding pixels to find where ip1 >= ip2static ByteProcessorimagesEqual(ImageProcessor ip1, ImageProcessor ip2) Created a binary image by identifying pixels where ip1 == ip2static ByteProcessorthresholdAbove(ImageProcessor ip, double threshold) Created a binary image by thresholding pixels to find where ip1 > thresholdstatic ByteProcessorthresholdAboveEquals(ImageProcessor ip, double threshold) Created a binary image by thresholding pixels to find where ip1 >= thresholdstatic ByteProcessorthresholdBelow(ImageProcessor ip, double threshold) Created a binary image by thresholding pixels to find where ip1 < thresholdstatic ByteProcessorthresholdBelowEquals(ImageProcessor ip, double threshold) Created a binary image by thresholding pixels to find where ip1 ≤ thresholdstatic ByteProcessorthresholdBetween(ImageProcessor ip, double lowThreshold, double highThreshold) Created a binary image by thresholding pixels to find where ip >= lowThreshold and ip <= highThresholdstatic ROIthresholdToROI(ImageProcessor ip, RegionRequest request) Generate a QuPath ROI from an ImageProcessor.static ROIthresholdToROI(BufferedImage img, double minThreshold, double maxThreshold, int band, RegionRequest request) Generate a QuPath ROI by thresholding an image channel image.static ROIthresholdToROI(Raster raster, double minThreshold, double maxThreshold, int band, TileRequest request) Generate a QuPath ROI by thresholding an image channel image, deriving coordinates from a TileRequest.
- 
Constructor Details- 
SimpleThresholdingpublic SimpleThresholding()
 
- 
- 
Method Details- 
greaterThanOrEqualCreated a binary image by thresholding pixels to find where ip1 >= ip2- Parameters:
- ip1-
- ip2-
- Returns:
 
- 
greaterThanCreated a binary image by thresholding pixels to find where ip1 > ip2- Parameters:
- ip1-
- ip2-
- Returns:
 
- 
thresholdBelowCreated a binary image by thresholding pixels to find where ip1 < threshold- Parameters:
- ip-
- threshold-
- Returns:
 
- 
thresholdBelowEqualsCreated a binary image by thresholding pixels to find where ip1 ≤ threshold- Parameters:
- ip-
- threshold-
- Returns:
 
- 
imagesEqualCreated a binary image by identifying pixels where ip1 == ip2- Parameters:
- ip1-
- ip2-
- Returns:
 
- 
thresholdAboveCreated a binary image by thresholding pixels to find where ip1 > threshold- Parameters:
- ip-
- threshold-
- Returns:
 
- 
thresholdAboveEqualsCreated a binary image by thresholding pixels to find where ip1 >= threshold- Parameters:
- ip-
- threshold-
- Returns:
 
- 
thresholdBetweenpublic static ByteProcessor thresholdBetween(ImageProcessor ip, double lowThreshold, double highThreshold) Created a binary image by thresholding pixels to find where ip >= lowThreshold and ip <= highThreshold- Parameters:
- ip-
- lowThreshold-
- highThreshold-
- Returns:
 
- 
thresholdToROIpublic static ROI thresholdToROI(BufferedImage img, double minThreshold, double maxThreshold, int band, RegionRequest request) Generate a QuPath ROI by thresholding an image channel image.- Parameters:
- img- the input image (any type)
- minThreshold- minimum threshold; pixels >= minThreshold will be included
- maxThreshold- maximum threshold; pixels <= maxThreshold will be included
- band- the image band to threshold (channel)
- request- a- RegionRequestcorresponding to this image, used to calibrate the coordinates. If null, we assume no downsampling and an origin at (0,0).
- Returns:
- See Also:
 
- 
thresholdToROIpublic static ROI thresholdToROI(Raster raster, double minThreshold, double maxThreshold, int band, TileRequest request) Generate a QuPath ROI by thresholding an image channel image, deriving coordinates from a TileRequest.This can give a more accurate result than depending on a RegionRequest because it is possible to avoid some loss of precision. - Parameters:
- raster-
- minThreshold-
- maxThreshold-
- band-
- request-
- Returns:
- See Also:
 
- 
thresholdToROIGenerate a QuPath ROI from an ImageProcessor.It is assumed that the ImageProcessor has had its min and max threshold values set. - Parameters:
- ip-
- request-
- Returns:
 
 
-