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 Summary
Constructors -
Method Summary
Modifier 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
-
SimpleThresholding
public SimpleThresholding()
-
-
Method Details
-
greaterThanOrEqual
Created a binary image by thresholding pixels to find where ip1 >= ip2- Parameters:
ip1-ip2-- Returns:
-
greaterThan
Created a binary image by thresholding pixels to find where ip1 > ip2- Parameters:
ip1-ip2-- Returns:
-
thresholdBelow
Created a binary image by thresholding pixels to find where ip1 < threshold- Parameters:
ip-threshold-- Returns:
-
thresholdBelowEquals
Created a binary image by thresholding pixels to find where ip1 ≤ threshold- Parameters:
ip-threshold-- Returns:
-
imagesEqual
Created a binary image by identifying pixels where ip1 == ip2- Parameters:
ip1-ip2-- Returns:
-
thresholdAbove
Created a binary image by thresholding pixels to find where ip1 > threshold- Parameters:
ip-threshold-- Returns:
-
thresholdAboveEquals
Created a binary image by thresholding pixels to find where ip1 >= threshold- Parameters:
ip-threshold-- Returns:
-
thresholdBetween
public 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:
-
thresholdToROI
public 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 includedmaxThreshold- maximum threshold; pixels <= maxThreshold will be includedband- the image band to threshold (channel)request- aRegionRequestcorresponding to this image, used to calibrate the coordinates. If null, we assume no downsampling and an origin at (0,0).- Returns:
- See Also:
-
thresholdToROI
public 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:
-
thresholdToROI
Generate 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:
-