public class SimpleGridder2 extends java.lang.Object implements Gridder2
Note that this simple method performs no interpolation for grid cells that do not contain at least one scattered sample. It may however be used as a first step in other more sophisticated gridding methods. In particular, the averaging performed by this simple gridder provides a crude form of anti-alias filtering when grid cells contain multiple scattered samples.
Constructor and Description |
---|
SimpleGridder2(float[] f,
float[] x1,
float[] x2)
Constructs a simple gridder with specified known samples.
|
Modifier and Type | Method and Description |
---|---|
static float[][] |
getGriddedSamples(float fnull,
Sampling s1,
Sampling s2,
float[][] g)
Gets the non-null samples from the specified gridded sample values.
|
float[][] |
grid(Sampling s1,
Sampling s2)
Computes gridded sample values from the known sample values.
|
static float[][] |
samplesOnGrid(Sampling s1,
Sampling s2,
float[] f,
float[] x1,
float[] x2)
Returns samples adjusted to lie on a specified grid.
|
static float[][] |
samplesOnGrid(Sampling s1,
Sampling s2,
float[] f,
float[] x1,
float[] x2,
float[] sd)
Returns samples adjusted to lie on a specified grid.
|
void |
setNullValue(float fnull)
Sets the null value used for grid cells that contain no known samples.
|
void |
setScattered(float[] f,
float[] x1,
float[] x2)
Sets the known (scattered) samples.
|
public SimpleGridder2(float[] f, float[] x1, float[] x2)
f
- array of known sample values f(x1,x2).x1
- array of known sample x1 coordinates.x2
- array of known sample x2 coordinates.public void setNullValue(float fnull)
fnull
- the null value.public static float[][] samplesOnGrid(Sampling s1, Sampling s2, float[] f, float[] x1, float[] x2)
s1
- sampling of x1.s2
- sampling of x2.f
- array of sample values f(x1,x2).x1
- array of sample x1 coordinates.x2
- array of sample x2 coordinates.public static float[][] samplesOnGrid(Sampling s1, Sampling s2, float[] f, float[] x1, float[] x2, float[] sd)
s1
- sampling of x1.s2
- sampling of x2.f
- array of sample values f(x1,x2).x1
- array of sample x1 coordinates.x2
- array of sample x2 coordinates.sd
- array of std dev for sample values; null, if none.public static float[][] getGriddedSamples(float fnull, Sampling s1, Sampling s2, float[][] g)
fnull
- the null value.s1
- sampling of x1.s2
- sampling of x2.g
- array of gridded sample values.public void setScattered(float[] f, float[] x1, float[] x2)
Gridder2
setScattered
in interface Gridder2
f
- array of sample values f(x1,x2).x1
- array of sample x1 coordinates.x2
- array of sample x2 coordinates.