public abstract class MorphologicalOperator extends Object implements Filter
| Modifier and Type | Field and Description |
|---|---|
protected int |
center
Mask center index - held to avoid repeated costly calculations
|
protected boolean[][] |
mask
The structuring element
|
protected int[] |
pixel
A preallocated array for pixel storage
|
| Constructor and Description |
|---|
MorphologicalOperator(boolean[][] mask)
Creates a new instance of MorphologicalOperator
|
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
filter(BufferedImage input)
Performs the filter operation on the passed image
|
void |
filter(int width,
int height,
short[] source,
short[] target) |
static boolean[][] |
getTrueMask(int width,
int height)
Returns a completely set mask
|
protected abstract void |
processPosition(int x,
int y,
int width,
short[] source,
short[] target) |
protected abstract void |
processPosition(int x,
int y,
WritableRaster raster,
Raster in)
Processes a postion in the image.
|
protected final boolean[][] mask
protected final int[] pixel
protected int center
public MorphologicalOperator(boolean[][] mask)
public BufferedImage filter(BufferedImage input)
Filterpublic final void filter(int width,
int height,
short[] source,
short[] target)
public static final boolean[][] getTrueMask(int width,
int height)
width - Mask widthheight - Mask heightprotected abstract void processPosition(int x,
int y,
WritableRaster raster,
Raster in)
x - The X coordinatey - The Y coordinateraster - The output rasterin - The input rasterprotected abstract void processPosition(int x,
int y,
int width,
short[] source,
short[] target)
Copyright © 2015–2021 Fiji. All rights reserved.