Different views are sometime synonymous for a given coverage. For example the native and rendered views are identical when the coverage values are unsigned 8 or 16 bits integers, but distinct if the native values are 32 bits integers. This is because in the later case, the 32 bits integer values can not be processed directly by an index color model.
|Enum Constant and Description|
Coverage data are the values of some geophysics phenomenon, for example an elevation in metres or a temperature in Celsius degrees.
Coverage data come directly from some source (typically a file) and are unprocessed.
Coverage data are packed, usually as integers convertible to geophysics values.
Coverage data have no meaning other than visual color.
Coverage data are compatible with common Java2D color models.
Special value for returning the same coverage unchanged.
|Modifier and Type||Method and Description|
Returns suggested rendering hints for a JAI operation on the given image.
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final ViewType NATIVE
public static final ViewType PACKED
public static final ViewType RENDERED
Conversions to the RGB color space are not allowed, because the data are often related to geophysics values in some way. For example the coverage may contains Sea Surface Temperature (SST) data packed as 8 bits integers and convertible to degrees Celsius using the following formula: temperature = pixel_value × 0.15 - 3. A conversion to RGB space would lose this relationship, and any oceanographical calculation accidentally performed on this space would produce wrong results.
Interpolations other than nearest neighbor are not allowed, because some special values are often used as pad values for missing data. An interpolation between a "real" value (for example a value convertible to the above-cited SST) and "pad" value would produce a wrong result.
public static final ViewType GEOPHYSICS
doubleprimitive type), but this is not mandatory if there is never fractional parts or missing values in a particular coverage.
If the coverage contains some "no data" values, then those missing values
must be represented by
constant, or any other value in the NaN range as explained there. Real numbers used as "pad values" like
Conversions to RGB color space is not allowed. All computations (including interpolations) must be performed in this geophysics space.
public static final ViewType PHOTOGRAPHIC
Conversions to the RGB color space are allowed. Because the coverage has no geophysics meaning other than visual color, there is no significant data lose in the replacement of index color model.
Interpolation are not allowed on indexed values. They must be performed on the RGB or similar color space instead.
public static final ViewType SAME
public static ViewType values()
for (ViewType c : ViewType.values()) System.out.println(c);
public boolean isInterpolationAllowed()
trueif interpolations other than nearest neighbor are allowed. Those interpolations require the following conditions:
This method may conservatively returns
false if unsure. If interpolations
are wanted but not allowed, then users should try to convert the coverage to the
geophysics space, which supports interpolations. If no
geophysics view is available, then users may convert the image to the RGB space
if replacement of index color model
is allowed. Interpolations in the RGB space produce nice-looking images, but the
pixel values lose all geophysical meaning. If the color space conversion is not
allowed, then then users should stick with nearest
trueif interpolations are allowed.
public boolean isReplaceIndexColorModelAllowed()
trueif the replacement of index color model is allowed. Such replacements may occurs during some operations requirying interpolations, like scale, in order to produce images that look nicer. However such replacements should be attempted only in last resort (interpolations in the geophysics space should be preferred) and only if the coverage data don't have any meaning other than visual color, as in photographic images.
trueif replacement of
public boolean isTransformOnColormapAllowed()
trueif operations can be performed on the colormap rather than the values.
trueif operations can be performed on the colormap.
public RenderingHints getRenderingHints(RenderedImage image)
JAI.KEY_INTERPOLATIONis sets to "nearest neighbor" if
false, and left unchanged otherwise.
JAI.KEY_REPLACE_INDEX_COLOR_MODELis sets to the value returned by
JAI.KEY_TRANSFORM_ON_COLORMAPis sets to the value returned by
image- The image on which to apply an operation.
Copyright © 2009–2014 Geotoolkit.org. All rights reserved.