|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.splat.util.MedianFilter
public class MedianFilter
Create a median filtered version of a data array. The median is the middle value from those in a region about the current value (i.e. this is a windowed filter).
Constructor Summary | |
---|---|
MedianFilter(double[] data,
int window)
Create an instance, obtaining the median in a region window elements wide about each input position. |
Method Summary | |
---|---|
protected double[] |
doCalc(double[] data,
int window)
Perform the median filtering of array using a region of size window about each position. |
double[] |
eval()
Get the averaged data. |
int |
getWindow()
Get the number of values used in the averaging window. |
void |
setData(double[] data)
Set the data to be used for input to the averaging calculations. |
void |
setWindow(int window)
Set the window to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MedianFilter(double[] data, int window)
data
- the array of values to be median filtered.window
- the number of positions that are used for the
window. Will be increased to the nearest odd
integer and has a minimum value of 3.Method Detail |
---|
public void setWindow(int window)
public int getWindow()
public void setData(double[] data)
public double[] eval()
protected double[] doCalc(double[] data, int window)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |