public class Clips
extends java.lang.Object
The lower bound clipMin must be less than the upper bound clipMax; this restriction is silently enforced by all methods of this class. This means that clips returned may not exactly equal those specified.
This class is most useful when computing clips from percentiles. For example, the bounds clipMin and clipMax may correspond to percMin=1% and percMax=99%, respectively. The default percentiles percMin=0% and percMax=100% correspond to minimum and maximum values.
Clips maintain a reference to an array of values, so that clips can be updated when percentiles are changed. If not using percentiles, because clipMin and clipMax are specified explicitly, then these arrays are ignored.
Constructor and Description |
---|
Clips(double percMin,
double percMax,
float[] f)
Constructs clips for the specified percentiles and array.
|
Clips(double percMin,
double percMax,
float[][] f)
Constructs clips for the specified percentiles and array.
|
Clips(double percMin,
double percMax,
float[][][] f)
Constructs clips for the specified percentiles and array.
|
Clips(double percMin,
double percMax,
Float3 f3)
Constructs clips for the specified percentiles and array.
|
Clips(float[] f)
Constructs clips for the specified array.
|
Clips(float[][] f)
Constructs clips for the specified array.
|
Clips(float[][][] f)
Constructs clips for the specified array.
|
Clips(Float3 f3)
Constructs clips for the specified array.
|
Modifier and Type | Method and Description |
---|---|
float |
getClipMax()
Gets the maximum clip value.
|
float |
getClipMin()
Gets the minimum clip value.
|
float |
getPercentileMax()
Gets the maximum percentile.
|
float |
getPercentileMin()
Gets the minimum percentile.
|
void |
setArray(float[] f)
Sets the array of values for these clips.
|
void |
setArray(float[][] f)
Sets the array of values for these clips.
|
void |
setArray(float[][][] f)
Sets the array of values for these clips.
|
void |
setArray(Float3 f3)
Sets the array of values for these clips.
|
void |
setClips(double clipMin,
double clipMax)
Sets the clip min and max values explicitly.
|
void |
setPercentiles(double percMin,
double percMax)
Sets the percentiles used to compute clips for this view.
|
public Clips(float[] f)
f
- array of values; by reference, not by copy.public Clips(float[][] f)
f
- array of values; by reference, not by copy.public Clips(float[][][] f)
f
- array of values; by reference, not by copy.public Clips(Float3 f3)
f3
- abstract 3-D array of values; by reference, not by copy.public Clips(double percMin, double percMax, float[] f)
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.f
- array of values; by reference, not by copy.public Clips(double percMin, double percMax, float[][] f)
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.f
- array of values; by reference, not by copy.public Clips(double percMin, double percMax, float[][][] f)
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.f
- array of values; by reference, not by copy.public Clips(double percMin, double percMax, Float3 f3)
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.f3
- abstract 3-D array of values; by reference, not by copy.public void setArray(float[] f)
f
- array of values; by reference, not by copy.public void setArray(float[][] f)
f
- array of values; by reference, not by copy.public void setArray(float[][][] f)
f
- array of values; by reference, not by copy.public void setArray(Float3 f3)
f3
- array of values; by reference, not by copy.public void setClips(double clipMin, double clipMax)
clipMin
- values < clipMin will be clipped to clipMin.clipMax
- values > clipMax will be clipped to clipMax.public float getClipMin()
public float getClipMax()
public void setPercentiles(double percMin, double percMax)
Calling this method enables the computation of clips from percentiles. Any clip min and max specified or computed previously will be forgotten.
Clip min and max values can only be computed if an array of values has been specified. If clips were constructed without such an array, then both percentiles and an array of values should be set to enable the use of percentiles.
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.public float getPercentileMin()
public float getPercentileMax()