org.geotoolkit.image.io.metadata
Interface SampleDimension

All Superinterfaces:
RangeDimension, SampleDomain

public interface SampleDimension
extends RangeDimension, SampleDomain

The range of physical values in an image band. This interface is a generalization of the Band interface defined by ISO 19115-2: Band describes specifically the range of wavelengths in the electromagnetic spectrum, while SampleDimension allows any kind of physical measurements.

The SampleDimension API is intentionally identical to the Band API with the restriction to wavelengths removed, some methods omitted and the following method added:

Since:
3.06
Version:
3.06
Author:
Martin Desruisseaux (Geomatys)
See Also:
Band
Module:
coverage/geotk-coverageio (download)    View source code for this class

Method Summary
 Integer getBitsPerValue()
          Maximum number of significant bits in the uncompressed representation for the value in each band of each pixel.
 double[] getFillSampleValues()
          Returns the sample values used for filling the cells that do not have any physical value.
 Double getMaxValue()
          The maximal value that can be stored in the designated band, or null if unspecified.
 Double getMinValue()
          The minimal value that can be stored in the designated band, or null if unspecified.
 Double getOffset()
          The physical value corresponding to a cell value of zero.
 Double getScaleFactor()
          Scale factor which has been applied to the cell value.
 TransferFunctionType getTransferFunctionType()
          Type of transfer function to be used when scaling a physical value for a given element.
 Unit<?> getUnits()
          The units in which the value are expressed.
 NumberRange<?> getValidSampleValues()
          The range of valid sample values in the band, not including fill sample values.
 
Methods inherited from interface RangeDimension
getDescriptor, getSequenceIdentifier
 

Method Detail

getValidSampleValues

NumberRange<?> getValidSampleValues()
The range of valid sample values in the band, not including fill sample values. This is the range of values as they are stored in the image file, before the scale factor and offset are applied for conversion to physical values.

This range doesn't need to be determined from the actual content of the image (e.g. as determined from the JAI extrema operation). It is typically the minimal and maximal values that can be stored in the band.

The information provided by this method could be inferred from the information provided by the ISO 19115-2 getMinValue() and getMaxValue() methods. Nevertheless this getValidSampleValues() method has been added because it allows to specify whatever the minimal and maximal values are inclusive or exclusive, and can handle the numbers as integers when this the type used by the underlying image format (it has an impact on the arithmetic operations used).

Specified by:
getValidSampleValues in interface SampleDomain
Returns:
The range of sample values (not including fill values), or null if unspecified.
See Also:
getMinValue(), getMaxValue(), getUnits()

getFillSampleValues

double[] getFillSampleValues()
Returns the sample values used for filling the cells that do not have any physical value. Sample values are values as they are stored in the image file, before the scale factor and offset are applied for conversion to physical values.

Specified by:
getFillSampleValues in interface SampleDomain
Returns:
The sample values used for filling the cells that do not have any physical value.

getMinValue

Double getMinValue()
The minimal value that can be stored in the designated band, or null if unspecified. In the particular case of a measurement in the electromagnetic spectrum, this is the shortest wavelength that the sensor is capable of collecting.

This method is equivalent to the code below (null checks omitted for simplicity):

return getValidSampleValues().getMinimum(true) * getScaleFactor() + getOffset();

Returns:
The minimal value that can be stored in the designated band, or null.
See Also:
Band.getMinValue()

getMaxValue

Double getMaxValue()
The maximal value that can be stored in the designated band, or null if unspecified. In the particular case of a measurement in the electromagnetic spectrum, this is the longest wavelength that the sensor is capable of collecting.

This method is equivalent to the code below (null checks omitted for simplicity):

return getValidSampleValues().getMaximum(true) * getScaleFactor() + getOffset();

Returns:
The maximal value that can be stored in the designated band, or null.
See Also:
Band.getMaxValue()

getUnits

Unit<?> getUnits()
The units in which the value are expressed.

Returns:
Units in which the value are expressed, or null.
See Also:
Band.getUnits()

getBitsPerValue

Integer getBitsPerValue()
Maximum number of significant bits in the uncompressed representation for the value in each band of each pixel. Returns null if unspecified.

Returns:
Maximum number of significant bits in the uncompressed representation, or null.
See Also:
Band.getBitsPerValue()

getScaleFactor

Double getScaleFactor()
Scale factor which has been applied to the cell value. Returns null if unspecified.

Returns:
Scale factor which has been applied to the cell value, or null.
See Also:
Band.getScaleFactor()

getOffset

Double getOffset()
The physical value corresponding to a cell value of zero. Returns null if unspecified.

Returns:
The physical value corresponding to a cell value of zero, or null.
See Also:
Band.getOffset()

getTransferFunctionType

TransferFunctionType getTransferFunctionType()
Type of transfer function to be used when scaling a physical value for a given element.

Returns:
Type of transfer function.
See Also:
Band.getTransferFunctionType()


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.