Package qupath.imagej.processing
Class IJFilters
java.lang.Object
qupath.imagej.processing.IJFilters
Helper class for filtering ImageJ images.
 
Many of these methods call built-in ImageJ filters, but adding them as static methods in a single class here may make them easier to find and use... and there are some extras that aren't part of ImageJ.
Important notes:
- In general, the input image is unchanged and a new output image is created.
- These methods do not pay attention to any Roi that has been set on the image!
- Since:
- v0.6.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ImageProcessorblackTopHat(ImageProcessor ip, double radius) Apply a black tophat filter; this is equivalent to subtracting an 'opened' image from the original.static ImageProcessorclose(ImageProcessor ip, double radius) Apply a morphological closing; this is equivalent to applying a maximum followed by a minimum filter.static ImageProcessorclosingByReconstruction(ImageProcessor ip, double radius) Apply a closing by (morphological) reconstruction.static FloatProcessordifferenceOfGaussians(ImageProcessor ip, double sigma1, double sigma2) Apply a Difference of Gaussians filter to an input image.static ImageProcessordilate(ImageProcessor ip, double radius) Apply a dilation; this is equivalent to applying a maximum filter.static ImageProcessorerode(ImageProcessor ip, double radius) Apply an erosion; this is equivalent to applying a minimum filter.static ByteProcessorextendedMaxima(ImageProcessor ip, double h) Find regional maxima in an image above a defined height.static ByteProcessorextendedMinima(ImageProcessor ip, double h) Find regional minima in an image above a defined height.static ImageProcessorgaussian(ImageProcessor ip, double sigma) Apply a Gaussian filter to an input image.static FloatProcessorhMaxima(ImageProcessor ip, double h) Suppress small local maxima in an image using a H-maxima transform.static FloatProcessorhMinima(ImageProcessor ip, double h) Suppress small local minima in an image using a H-minima transform.static ImageProcessormaximum(ImageProcessor ip, double radius) Apply a maximum filter.static ImageProcessormean(ImageProcessor ip, double radius) Apply a mean (average) filter.static ImageProcessormedian(ImageProcessor ip, double radius) Apply a median filter.static ImageProcessorminimum(ImageProcessor ip, double radius) Apply a minimum filter.static ImageProcessoropen(ImageProcessor ip, double radius) Apply a morphological opening; this is equivalent to applying a minimum followed by a maximum filter.static ImageProcessoropeningByReconstruction(ImageProcessor ip, double radius) Apply an opening by (morphological) reconstruction.static ByteProcessorFind regional maxima in an image.static ByteProcessorFind regional minima in an image.static ImageProcessorwhiteTopHat(ImageProcessor ip, double radius) Apply a white tophat filter; this is equivalent to subtracting the original image from the a 'closed' image.
- 
Constructor Details- 
IJFilterspublic IJFilters()
 
- 
- 
Method Details- 
meanApply a mean (average) filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
medianApply a median filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
maximumApply a maximum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
minimumApply a minimum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
dilateApply a dilation; this is equivalent to applying a maximum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
erodeApply an erosion; this is equivalent to applying a minimum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
openApply a morphological opening; this is equivalent to applying a minimum followed by a maximum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
closeApply a morphological closing; this is equivalent to applying a maximum followed by a minimum filter.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
 
- 
blackTopHatApply a black tophat filter; this is equivalent to subtracting an 'opened' image from the original.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
- See Also:
 
- 
whiteTopHatApply a white tophat filter; this is equivalent to subtracting the original image from the a 'closed' image.- Parameters:
- ip- the input image
- radius- the filter radius
- Returns:
- the filtered image
- See Also:
 
- 
openingByReconstructionApply an opening by (morphological) reconstruction.- Parameters:
- ip- the input image
- radius- the radius of the initial opening filter
- Returns:
- the filtered image
 
- 
closingByReconstructionApply a closing by (morphological) reconstruction.- Parameters:
- ip- the input image
- radius- the radius of the initial closing filter
- Returns:
- the filtered image
 
- 
regionalMaximaFind regional maxima in an image.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- Returns:
- a binary image with 255 at the location of regional maxima and 0 elsewhere
 
- 
regionalMinimaFind regional minima in an image.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- Returns:
- a binary image with 255 at the location of regional minima and 0 elsewhere
 
- 
hMaximaSuppress small local maxima in an image using a H-maxima transform.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- h- the height of maxima to suppress
- Returns:
- the input with maxima suppressed
 
- 
hMinimaSuppress small local minima in an image using a H-minima transform.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- h- the height of minima to suppress
- Returns:
- the input with minima suppressed
 
- 
extendedMaximaFind regional maxima in an image above a defined height.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- h- the height of the maxima
- Returns:
- a binary image with 255 at the location of regional maxima and 0 elsewhere
 
- 
extendedMinimaFind regional minima in an image above a defined height.Note: Use with caution! This method is experimental and may change. - Parameters:
- ip- the input image
- h- the height of the minima
- Returns:
- a binary image with 255 at the location of regional minima and 0 elsewhere
 
- 
gaussianApply a Gaussian filter to an input image.- Parameters:
- ip- the input image
- sigma- the sigma value of the Gaussian filter
- Returns:
- the filtered image
 
- 
differenceOfGaussiansApply a Difference of Gaussians filter to an input image.- Parameters:
- ip- the input image
- sigma1- the sigma value of the first Gaussian filter
- sigma2- the sigma value of the second Gaussian filter (to be subtracted)
- Returns:
- the filtered image
 
 
-