public class DirectionalFilter extends AlgoStub
Directional filtering of planar images.
Oriented structuring elements are considered, for example linear structuring elements. A collection of orientation is chosen, and the result of a filtering operation is performed for each orientation of the structuring element. The results are combined to create the resulting image.
Modifier and Type | Class and Description |
---|---|
static class |
DirectionalFilter.Operation
A pre-defined set of operations.
|
static class |
DirectionalFilter.Type
Specifies how to combine the different orientations: min or max.
|
Constructor and Description |
---|
DirectionalFilter(DirectionalFilter.Type type,
DirectionalFilter.Operation op,
int lineLength,
int nTheta)
Creates new instance of directional filter using line structuring
elements.
|
DirectionalFilter(DirectionalFilter.Type type,
DirectionalFilter.Operation op,
OrientedStrelFactory factory,
int nTheta)
Creates new instance of directional filter for arbitrary structuring
elements, by specifying the factory.
|
Modifier and Type | Method and Description |
---|---|
static ij.process.ImageProcessor |
mean(ij.process.ImageProcessor image,
Strel strel)
Computes the average value among the neighbors.
|
static ij.process.ImageProcessor |
median(ij.process.ImageProcessor image,
Strel strel)
Computes the median value among the neighbors.
|
ij.process.ImageProcessor |
process(ij.process.ImageProcessor image)
Apply directional filter with current settings to the specified image.
|
addAlgoListener, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, removeAlgoListener
public DirectionalFilter(DirectionalFilter.Type type, DirectionalFilter.Operation op, int lineLength, int nTheta)
type
- the type of combination (min or max)op
- the operation to apply with each structuring elementlineLength
- the (approximated) length of each line structuring element (in
pixels)nTheta
- the number of directions to considerpublic DirectionalFilter(DirectionalFilter.Type type, DirectionalFilter.Operation op, OrientedStrelFactory factory, int nTheta)
type
- the type of combination (min or max)op
- the operation to apply with each structuring elementfactory
- the factory for creating structuring elements of various
orientationsnTheta
- the number of directions to considerpublic ij.process.ImageProcessor process(ij.process.ImageProcessor image)
image
- a grayscale imagepublic static ij.process.ImageProcessor mean(ij.process.ImageProcessor image, Strel strel)
image
- input imagestrel
- structuring elementpublic static ij.process.ImageProcessor median(ij.process.ImageProcessor image, Strel strel)
image
- input imagestrel
- structuring elementCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.