|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.util.math.Range
org.esa.beam.util.math.Histogram
public class Histogram
Instances of the Histogram class store histogram data.
| Field Summary | |
|---|---|
static float |
LEFT_AREA_SKIPPED_95
|
static float |
RIGHT_AREA_SKIPPED_95
|
| Constructor Summary | |
|---|---|
Histogram(int[] binCounts,
double min,
double max)
Constructs a new instance for the given bin counts and the given value range. |
|
| Method Summary | |
|---|---|
void |
aggregate(Object values,
boolean unsigned,
IndexValidator validator,
com.bc.ceres.core.ProgressMonitor pm)
|
static Histogram |
computeHistogram(RenderedImage image,
javax.media.jai.ROI roi,
int numBins,
Range range)
|
static Histogram |
computeHistogramByte(byte[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given byte array in the given value range. |
static Histogram |
computeHistogramDouble(double[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given double array in the given value range. |
static Histogram |
computeHistogramDouble(DoubleList values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given Histogram.DoubleList in the given value range. |
static Histogram |
computeHistogramFloat(float[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given float array in the given value range. |
static Histogram |
computeHistogramGeneric(Object values,
boolean unsigned,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given Histogram.DoubleList in the given value range. |
static Histogram |
computeHistogramInt(int[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given int array in the given value range. |
static Histogram |
computeHistogramShort(short[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given short array in the given value range. |
static Histogram |
computeHistogramUByte(byte[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given byte array in the given value range. |
static Histogram |
computeHistogramUInt(int[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given int array in the given value range. |
static Histogram |
computeHistogramUShort(short[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Computes the histogram for the values in the given short array in the given value range. |
Range |
findRange(double leftHistoAreaSkipped,
double rightHistoAreaSkipped)
Returns the value range for the case that the given ratios of the sum of all bin values are skipped from the lower and upper bounds of this histogram. |
Range |
findRange(double leftHistoAreaSkipped,
double rightHistoAreaSkipped,
boolean skipLeftPeek,
boolean skipRightPeek)
|
Range |
findRangeFor95Percent()
Returns the value range for the case that 2.5% of the sum of all bin values are skipped from the the lower and upper bounds of this histogram. |
int[] |
getBinCounts()
Gets the bin values of this histogram. |
int |
getBinCountsSum()
Gets the sum of all counts |
int |
getBinIndex(double value)
Gets the bin index for the given value. |
int |
getMaxBinCount()
Gets the maximum bin value found this histogram. |
int |
getNumBins()
Gets the number of bins in this histogram. |
Range |
getRange(int binIndex)
Gets the data value range for the given bin index. |
Range |
getRange(int binIndex1,
int binIndex2)
Gets the data value range for the given bin index range. |
void |
setBinCounts(int[] binCounts)
Sets the bin values of this histogram. |
void |
setBinCounts(int[] binValues,
double min,
double max)
Sets the bin values and range of this histogram. |
| Methods inherited from class org.esa.beam.util.math.Range |
|---|
computeRangeByte, computeRangeDouble, computeRangeDouble, computeRangeFloat, computeRangeGeneric, computeRangeInt, computeRangeShort, computeRangeUByte, computeRangeUInt, computeRangeUShort, getMax, getMin, isValid, setMax, setMin, setMinMax, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final float LEFT_AREA_SKIPPED_95
public static final float RIGHT_AREA_SKIPPED_95
| Constructor Detail |
|---|
public Histogram(int[] binCounts,
double min,
double max)
binCounts - the bin countsmin - the minimum valuemax - the maximum value| Method Detail |
|---|
public int getNumBins()
public int[] getBinCounts()
public void setBinCounts(int[] binValues,
double min,
double max)
binValues - the bin valuesmin - the minimum value of the rangemax - the maximum value of the rangepublic void setBinCounts(int[] binCounts)
binCounts - the bin valuespublic int getMaxBinCount()
public int getBinCountsSum()
public Range findRangeFor95Percent()
public Range findRange(double leftHistoAreaSkipped,
double rightHistoAreaSkipped)
leftHistoAreaSkipped - the normalized area (a ratio of the entire area) of samples skipped from the left
end of the histogram, must be greater than or equal to 0.0 and less
than 1.0 - rightHistoAreaSkippedrightHistoAreaSkipped - the normalized area (a ratio of the entire area) of samples skipped from the upper
end of the histogram must be greater than or equal to 0.0 and less than
1.0 - leftHistoAreaSkipped
public Range findRange(double leftHistoAreaSkipped,
double rightHistoAreaSkipped,
boolean skipLeftPeek,
boolean skipRightPeek)
public Range getRange(int binIndex)
binIndex - the bin index
public Range getRange(int binIndex1,
int binIndex2)
binIndex1 - the first bin indexbinIndex2 - the second bin index
public int getBinIndex(double value)
value - the value
-1 if the value is not covered by this histogram.
public void aggregate(Object values,
boolean unsigned,
IndexValidator validator,
com.bc.ceres.core.ProgressMonitor pm)
aggregate in class Range
public static Histogram computeHistogramByte(byte[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
byte array in the given value range. The array
elements are interpreted as signed byte values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedpm - a monitor to inform the user about progress
computeHistogramUByte(byte[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramUByte(byte[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
byte array in the given value range. The array
elements are interpreted as unsigned byte values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedpm - a monitor to inform the user about progress
computeHistogramByte(byte[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramShort(short[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
short array in the given value range. The array
elements are interpreted as signed short values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computed
computeHistogramUShort(short[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramUShort(short[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
short array in the given value range. The array
elements are interpreted as unsigned short values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedpm - a monitor to inform the user about progress
computeHistogramShort(short[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramInt(int[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
int array in the given value range. The array
elements are interpreted as signed byte values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedhistogram - a histogram instance to be reused, can be nullpm - a monitor to inform the user about progress
computeHistogramUInt(int[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramUInt(int[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
int array in the given value range. The array
elements are interpreted as unsigned byte values. Values at a given index i for which
validator.validate(i) returns false are excluded from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.range - the value range, if null the range is automatically computedhistogram - a histogram instance to be reused, can be nullpm - a monitor to inform the user about progress
computeHistogramInt(int[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramFloat(float[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
float array in the given value range. Values at a
given index i for which validator.validate(i) returns false are excluded
from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedhistogram - a histogram instance to be reused, can be nullpm - a monitor to inform the user about progress
computeHistogramDouble(double[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramDouble(double[] values,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
double array in the given value range. Values at
a given index i for which validator.validate(i) returns false are excluded
from the computation.
values - the array whose histogram to computevalidator - used to validate the array indexes, must not be null. Use IndexValidator.TRUE instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedhistogram - a histogram instance to be reused, can be nullpm - a monitor to inform the user about progress
computeHistogramFloat(float[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramDouble(DoubleList values,
IndexValidator validator,
int numBins,
Range range,
Histogram histo,
com.bc.ceres.core.ProgressMonitor pm)
Histogram.DoubleList in the given value range.
Values at a given index i for which validator.validate(i) returns false
are excluded from the computation.
values - the Histogram.DoubleList whose histogram to computevalidator - used to validate the indexes, must not be null. Use IndexValidator.TRUE
instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedpm - a monitor to inform the user about progress
computeHistogramByte(byte[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogramGeneric(Object values,
boolean unsigned,
IndexValidator validator,
int numBins,
Range range,
Histogram histogram,
com.bc.ceres.core.ProgressMonitor pm)
Histogram.DoubleList in the given value range.
Values at a given index i for which validator.validate(i) returns false
are excluded from the computation.
values - the Histogram.DoubleList whose histogram to computevalidator - used to validate the indexes, must not be null. Use IndexValidator.TRUE
instead.numBins - the number of bins for the histogramrange - the value range, if null the range is automatically computedpm - a monitor to inform the user about progress
computeHistogramByte(byte[], org.esa.beam.util.math.IndexValidator, int, org.esa.beam.util.math.Range, org.esa.beam.util.math.Histogram, com.bc.ceres.core.ProgressMonitor)
public static Histogram computeHistogram(RenderedImage image,
javax.media.jai.ROI roi,
int numBins,
Range range)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||