Package inra.ijpb.segment
Class Threshold
java.lang.Object
inra.ijpb.segment.Threshold
public class Threshold
extends java.lang.Object
Static methods for thresholding images.
- Author:
- David Legland
-
Method Summary
Modifier and Type Method Description static ij.ImagePlusthreshold(ij.ImagePlus image, double lower, double upper)Creates a new 3D binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).static ij.ImageStackthreshold(ij.ImageStack image, double lower, double upper)Creates a new 3D binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).static ij.process.ImageProcessorthreshold(ij.process.ImageProcessor image, double lower, double upper)Creates a new binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
threshold
public static final ij.ImagePlus threshold(ij.ImagePlus image, double lower, double upper)Creates a new 3D binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).- Parameters:
image- the imagePlus that contains the grayscale imagelower- the lower threshold bound (inclusive)upper- the upper threshold bound (inclusive)- Returns:
- a new ImagePlus containing the binarised image
-
threshold
public static final ij.process.ImageProcessor threshold(ij.process.ImageProcessor image, double lower, double upper)Creates a new binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).- Parameters:
image- the input grayscale imagelower- the lower threshold bound (inclusive)upper- the upper threshold bound (inclusive)- Returns:
- a binary image
-
threshold
public static final ij.ImageStack threshold(ij.ImageStack image, double lower, double upper)Creates a new 3D binary image with value 255 when input image has value betweenloweranduppervalues (inclusive).- Parameters:
image- the input 3D grayscale imagelower- the lower threshold bound (inclusive)upper- the upper threshold bound (inclusive)- Returns:
- a 3D binary image
-