public class ZeroMask
extends java.lang.Object
Constructor and Description |
---|
ZeroMask(double small,
double sigma1,
double sigma2,
double sigma3,
float[][][] x)
Constructs a zero mask for a 3D image.
|
ZeroMask(double small,
double sigma1,
double sigma2,
float[][] x)
Constructs a zero mask for a 2D image.
|
ZeroMask(float[][] x)
Constructs a zero mask from a specified array of floats.
|
ZeroMask(float[][][] x)
Constructs a zero mask from a specified array of floats.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(float[] efalse,
EigenTensors2 e)
Applies this mask to a specified eigentensor field.
|
void |
apply(float[] efalse,
EigenTensors3 e)
Applies this mask to a specified eigentensor field.
|
void |
apply(float vfalse,
float[][] v)
Applies this mask to a specified array of values.
|
void |
apply(float vfalse,
float[][][] v)
Applies this mask to a specified array of values.
|
void |
getAsFloats(float[][] mask)
Fills a 2D array of floats representing this mask.
|
void |
getAsFloats(float[][][] mask)
Fills a 3D array of floats representing this mask.
|
float[][] |
getAsFloats2()
Returns a 2D array of floats representing this mask.
|
float[][][] |
getAsFloats3()
Returns a 3D array of floats representing this mask.
|
public ZeroMask(double small, double sigma1, double sigma2, float[][] x)
small
- a small fraction; e.g., 0.1.sigma1
- Gaussian window half-width for 1st dimension.sigma2
- Gaussian window half-width for 2nd dimension.x
- array of image values from which mask is derived.public ZeroMask(double small, double sigma1, double sigma2, double sigma3, float[][][] x)
small
- small value; zeros in mask where labs < small*gabs.sigma1
- Gaussian window half-width for 1st dimension.sigma2
- Gaussian window half-width for 2nd dimension.sigma3
- Gaussian window half-width for 3rd dimension.x
- array of image values from which mask is derived.public ZeroMask(float[][] x)
x
- array of values from which mask is derived.public ZeroMask(float[][][] x)
x
- array of values from which mask is derived.public float[][] getAsFloats2()
public void getAsFloats(float[][] mask)
mask
- array of floats representing this mask.public float[][][] getAsFloats3()
public void getAsFloats(float[][][] mask)
mask
- array of floats representing this mask.public void apply(float vfalse, float[][] v)
vfalse
- value to use where mask is false.v
- array of values to be masked.public void apply(float vfalse, float[][][] v)
vfalse
- value to use where mask is false.v
- array of values to be masked.public void apply(float[] efalse, EigenTensors2 e)
efalse
- eigentensor {e11,e12,e22} to use for samples
where the mask is false.e
- eigentensors to be masked.public void apply(float[] efalse, EigenTensors3 e)
efalse
- eigentensor {e11,e12,e13,e22,e23,e33} to use
for samples where the mask is false.e
- eigentensors to be masked.