Package org.apache.sis.internal.coverage
Class SampleDimensions
java.lang.Object
org.apache.sis.util.Static
org.apache.sis.internal.coverage.SampleDimensions
Utility methods working on
SampleDimension
instances.- Since:
- 1.2
- Version:
- 1.2
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Do not allow instantiation of this class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Number[]
backgrounds
(List<SampleDimension> bands) Returns the background values of all bands in the given list.static DoubleUnaryOperator[]
toSampleFilters
(ImageProcessor processor, List<SampleDimension> bands) Returns thesampleFilters
arguments to use in a call toImageProcessor.statistics(…)
for excluding no-data values.
-
Constructor Details
-
SampleDimensions
private SampleDimensions()Do not allow instantiation of this class.
-
-
Method Details
-
backgrounds
Returns the background values of all bands in the given list. The length of the returned array is the number of sample dimensions. If a sample dimension does not declare a background value, the corresponding array element is null.- Parameters:
bands
- the bands for which to get background values, ornull
.- Returns:
- the background values, or
null
if the given argument was null. Otherwise the returned array is never null but may contain null elements.
-
toSampleFilters
public static DoubleUnaryOperator[] toSampleFilters(ImageProcessor processor, List<SampleDimension> bands) Returns thesampleFilters
arguments to use in a call toImageProcessor.statistics(…)
for excluding no-data values. If the given sample dimensions are converted to units of measurement, then all "no data" values are already NaN values and this method returns an array ofnull
operators. Otherwise this method returns an array of operators that covert "no data" values toDouble.NaN
.This method is not in public API because it partially duplicates the work of transfer function.
- Parameters:
processor
- the processor to use for creatingDoubleUnaryOperator
.bands
- the sample dimensions for which to createsampleFilters
, ornull
.- Returns:
- the filters, or
null
ifbands
was null. The array may contain null elements.
-