public class GeorHistogram
extends java.lang.Object
Two constructors are provided: one is the default constructor without parameters, and the other constructor allows you to specify length of GeorHistogramEntry array, in which case the constructor will create a GeorHistogramEntry array based on the length.
In this class, methods are provided for retrieving and setting the GeorHistogramEntry array and each individual entry.
The following two methods defined in the class SublayerInfo are used to retrieve and set histogram in the GeoRaster metadata through an instance of GeorHistogram:
public GeorHistogram getHistogram(); public void setHistogram(GeorHistogram histogram);
Constructor and Description |
---|
GeorHistogram()
Constructs a
GeorHistogram object. |
GeorHistogram(int length)
Constructs a
GeorHistogram object with the given array length. |
Modifier and Type | Method and Description |
---|---|
long[] |
getCounts()
Returns the counts array.
|
GeorHistogramEntry |
getGeorHistogramEntry(double value)
Returns a GeorHistogramEntry entry indexed by a given value.
|
GeorHistogramEntry |
getGeorHistogramEntry(int entryNo)
Returns a GeorHistogramEntry entry indexed by a given entry number.
|
GeorHistogramEntry[] |
getValueAndCount()
Returns the GeorHistogramEntry array.
|
double[] |
getValues()
Returns the values array.
|
boolean |
setValueAndCount(double[] value, long[] count)
Sets the GeorHistogramEntry array by specifying two individual component arrays.
|
boolean |
setValueAndCount(double value, int count)
Sets a GeorHistogramEntry based on value.
|
boolean |
setValueAndCount(GeorHistogramEntry[] entries)
Sets the GeorHistogramEntry array.
|
boolean |
setValueAndCount(int entryNo, double value, int count)
Sets a GeorHistogramEntry based on entryNo.
|
public GeorHistogram()
GeorHistogram
object.public GeorHistogram(int length)
GeorHistogram
object with the given array length.length
- length of GeorHistogram arraypublic GeorHistogramEntry[] getValueAndCount()
public double[] getValues()
public long[] getCounts()
public boolean setValueAndCount(double[] value, long[] count)
value
- cell value arraycount
- count arraypublic boolean setValueAndCount(GeorHistogramEntry[] entries)
entries
- GeorHistogramEntry arraypublic boolean setValueAndCount(int entryNo, double value, int count)
entryNo
- index of GeorHistogramEntry array, from 0 to (array length-1)value
- cell valuecount
- count valuepublic boolean setValueAndCount(double value, int count)
value
- cell valuecount
- count valuepublic GeorHistogramEntry getGeorHistogramEntry(int entryNo)
entryNo
- entry numberpublic GeorHistogramEntry getGeorHistogramEntry(double value)
value
- cell value