public class Kuwahara extends Object implements ij.plugin.filter.PlugInFilter
Modifier and Type | Field and Description |
---|---|
protected int |
imH |
protected int |
imW |
protected int |
kH |
protected int |
kW |
protected int |
nAngles |
protected boolean |
showKernels |
protected int |
size |
static int |
VARIANCE |
static int |
VARIANCE_DIV_MEAN |
static int |
VARIANCE_DIV_MEAN_SQUARE |
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
Constructor and Description |
---|
Kuwahara() |
Modifier and Type | Method and Description |
---|---|
boolean |
applyFilter(ij.process.ImageProcessor inputImage,
int size,
int nAngles,
int criterion)
Apply filter to input image (in place)
|
void |
calculateCriterionVariance(float[][] imSum,
float[][] imSumOfSquares,
float kernelSum,
float[][] value,
float[][] criterion) |
void |
calculateCriterionVarianceDivMean(float[][] imSum,
float[][] imSumOfSquares,
float kernelSum,
float[][] value,
float[][] criterion) |
void |
calculateCriterionVarianceDivMean2(float[][] imSum,
float[][] imSumOfSquares,
float kernelSum,
float[][] value,
float[][] criterion) |
ij.ImageStack |
createKernel(int size,
int nAngles)
create the convolution kernel
|
void |
filter(ij.process.ImageProcessor ipData,
ij.ImageStack imsKernels)
Apply Kuwahara filter to input image
|
void |
run(ij.process.ImageProcessor ipData)
Run method for plugin filter
|
void |
setCriterionMethod(int criterion)
Set the criterion method
|
void |
setNumberOfAngles(int nAngles) |
void |
setSize(int size) |
int |
setup(String arg,
ij.ImagePlus imp) |
protected int imW
protected int imH
protected int kW
protected int kH
protected int nAngles
protected int size
protected boolean showKernels
public static final int VARIANCE
public static final int VARIANCE_DIV_MEAN
public static final int VARIANCE_DIV_MEAN_SQUARE
public int setup(String arg, ij.ImagePlus imp)
setup
in interface ij.plugin.filter.PlugInFilter
public void run(ij.process.ImageProcessor ipData)
run
in interface ij.plugin.filter.PlugInFilter
public void setCriterionMethod(int criterion)
criterion
- public void setNumberOfAngles(int nAngles)
public void setSize(int size)
public ij.ImageStack createKernel(int size, int nAngles)
public void filter(ij.process.ImageProcessor ipData, ij.ImageStack imsKernels)
ipData
- imsKernels
- public final void calculateCriterionVariance(float[][] imSum, float[][] imSumOfSquares, float kernelSum, float[][] value, float[][] criterion)
public final void calculateCriterionVarianceDivMean(float[][] imSum, float[][] imSumOfSquares, float kernelSum, float[][] value, float[][] criterion)
public final void calculateCriterionVarianceDivMean2(float[][] imSum, float[][] imSumOfSquares, float kernelSum, float[][] value, float[][] criterion)
public boolean applyFilter(ij.process.ImageProcessor inputImage, int size, int nAngles, int criterion)
inputImage
- input imagesize
- kernel size (it must be odd)nAngles
- number of anglesCopyright © 2015–2021 Fiji. All rights reserved.