public class GeorGrayscale
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 GeorGrayscaleEntry array, in which case the constructor will create a GeorGrayscaleEntry array based on the length.
In this class, methods are provided for retrieving and setting the GeorGrayscaleEntry array and each individual entry.
The following two methods defined in the class SublayerInfo are used to retrieve and set grayScale in the GeoRaster metadata through an instance of GeorGrayscale:
public void setGrayscale(GeorGrayscale grayscale); public GeorGrayscale getGrayscale();
Constructor and Description |
---|
GeorGrayscale()
Constructs a
GeorGrayscale object |
GeorGrayscale(int length)
Constructs a
GeorGrayscale object with the given array length. |
Modifier and Type | Method and Description |
---|---|
GeorGrayscaleEntry |
getGeorGrayscaleEntry(double value)
Returns a GeorGrayscaleEntry entry indexed by a given value.
|
GeorGrayscaleEntry |
getGeorGrayscaleEntry(int entryNo)
Returns a GeorGrayscaleEntry entry indexed by a given entry number.
|
GeorGrayscaleEntry[] |
getGrayscale()
Returns the GeorGrayscaleEntry array.
|
boolean |
setGrayscale(double[] value, int[] gray)
Sets the GeorColormapEntry array by specifying two individual component arrays.
|
boolean |
setGrayscale(double value, int gray)
Sets a GeorGrayscaleEntry based on value.
|
boolean |
setGrayscale(GeorGrayscaleEntry[] entries)
Sets the GeorGrayscaleEntry array.
|
boolean |
setGrayscale(int entryNo, double value, int gray)
Sets a GeorColormapEntry based on entryNo.
|
public GeorGrayscale()
GeorGrayscale
objectpublic GeorGrayscale(int length)
GeorGrayscale
object with the given array length.length
- length of GeorGrayscale arraypublic GeorGrayscaleEntry[] getGrayscale()
public boolean setGrayscale(double[] value, int[] gray)
value
- cell value arraygray
- gray component arraypublic boolean setGrayscale(GeorGrayscaleEntry[] entries)
entries
- GeorGrayscaleEntry arraypublic boolean setGrayscale(int entryNo, double value, int gray)
entryNo
- index of GeorGrayscaleEntry array, from 0 to (array length-1)value
- cell valuegray
- gray componentpublic boolean setGrayscale(double value, int gray)
value
- cell valuegray
- gray color componentpublic GeorGrayscaleEntry getGeorGrayscaleEntry(int entryNo)
entryNo
- entry numberpublic GeorGrayscaleEntry getGeorGrayscaleEntry(double value)
value
- cell value