|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
ObjectEnum<SampleConversionType>
SampleConversionType
public enum SampleConversionType
Kind of conversions which are allowed on sample values during the read process. This enum is
given to SpatialImageReadParam in order to give to the reading process some flexibility
about the values to be stored in the Raster objects.
By default, the reading process performed by SpatialImageReader is strict and will store
the same values than the ones read from the stream. However more efficient storage can sometime
be achieved if some conversions are allowed, for example replacing fill values by 0 and applying
an offset for avoiding negative numbers. The ImageCoverageReader class in particular
allows some changes based on the additional knowledge inferred from image metadata.
SampleConverter,
SpatialImageReadParam.setSampleConversionAllowed(SampleConversionType, boolean)
| coverage/geotk-coverageio (download) | View source code for this class |
| Enum Constant Summary | |
|---|---|
REPLACE_FILL_VALUES
Indicates that SpatialImageReader is allowed to replace
fill values by NaN. |
|
SHIFT_SIGNED_INTEGERS
Indicates that SpatialImageReader is allowed to apply an offset on signed integer
values in order to get unsigned integers. |
|
STORE_AS_FLOATS
Indicates that SpatialImageReader is allowed to store samples as floating point
values instead than integer values. |
|
| Method Summary | |
|---|---|
static SampleConversionType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SampleConversionType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final SampleConversionType SHIFT_SIGNED_INTEGERS
SpatialImageReader is allowed to apply an offset on signed integer
values in order to get unsigned integers. More specifically, if the SpatialImageReader
getRawDataType(int) method returns
DataBuffer.TYPE_SHORT and this conversion type
is allowed,
then SpatialImageReader will process as if the getRawDataType(int) method
returned TYPE_USHORT. Consequently, an offset may be
added to every sample values in order to avoid negative values.
See SpatialImageReader.getRawDataType(int) for more information and an example.
SampleConverter.createOffset(double, double)public static final SampleConversionType REPLACE_FILL_VALUES
SpatialImageReader is allowed to replace
fill values by NaN.
This replacement is possible only if the raw data type is DataBuffer.TYPE_FLOAT or TYPE_DOUBLE.
SampleConverter.createPadValueMask(double)public static final SampleConversionType STORE_AS_FLOATS
SpatialImageReader is allowed to store samples as floating point
values instead than integer values. When provided, this enum ensures that
fill values can be replaced by
NaN if the REPLACE_FILL_VALUES enum is also provided.
| Method Detail |
|---|
public static SampleConversionType[] values()
for (SampleConversionType c : SampleConversionType.values()) System.out.println(c);
public static SampleConversionType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||