public abstract class GenericFilter extends Object
ImageProcessor object performs all pixel-level
iterations automatically.
Concrete implementations of this class need to define only two methods:float filterPixel(ImageAccessor.Scalar, int, int) andfloat[] filterPixel(ImageAccessor.Rgb, int, int).LinearFilter for a sample implementation.
| Modifier | Constructor and Description |
|---|---|
protected |
GenericFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(ij.process.ImageProcessor ip)
Dispatch work depending on actual (runtime) type of processor.
|
abstract float[] |
filterPixel(ImageAccessor.Rgb source,
int u,
int v)
Calculates and returns the filter result for a single pixel
at the given position.
|
abstract float |
filterPixel(ImageAccessor.Scalar source,
int u,
int v)
Calculates and returns the filter result for a single pixel
at the given position.
|
void |
setOutOfBoundsStrategy(OutOfBoundsStrategy obs)
Set the out-of-bounds strategy of this
GenericFilter. |
protected GenericFilter()
public void setOutOfBoundsStrategy(OutOfBoundsStrategy obs)
GenericFilter. See OutOfBoundsStrategy.obs - the out-of-bounds strategypublic abstract float filterPixel(ImageAccessor.Scalar source, int u, int v)
source - the ImageAccessor.Scalar representing the source (scalar-valued) imageu - the horizontal pixel positionv - the vertical pixel positionpublic abstract float[] filterPixel(ImageAccessor.Rgb source, int u, int v)
source - the ImageAccessor.Rgb representing the source (RGB) imageu - the horizontal pixel positionv - the vertical pixel positionpublic void applyTo(ij.process.ImageProcessor ip)
ip - the image this filter is applied to (destructively)Copyright © 2006–2017, Wilhelm Burger, Mark J. Burge (BSD 2-Clause Simplified License)