Class TiffRasterStatistics
- java.lang.Object
-
- org.apache.commons.imaging.formats.tiff.TiffRasterStatistics
-
public class TiffRasterStatistics extends java.lang.ObjectCollects and stores a set of simple statistics from the input raster.
-
-
Constructor Summary
Constructors Constructor Description TiffRasterStatistics(AbstractTiffRasterData raster, float excludedValue)Constructs an instance of this class, tabulating results from the input raster data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCountOfNulls()Gets the count of the number of null samples in the collection.intgetCountOfSamples()Gets the count of the number of non-null and non-excluded samples in the collection.floatgetExcludedValue()Gets the value that was set for exclusion, or a Float.NaN if not was set.floatgetMaxValue()Gets the maximum value found in the source datafloatgetMeanValue()Gets the mean value for all sample values in the raster.floatgetMinValue()Gets the minimum value found in the source databooleanisAnExcludedValueSet()Indicates if a sample value was set to be deliberately excluded from the statistics.
-
-
-
Constructor Detail
-
TiffRasterStatistics
TiffRasterStatistics(AbstractTiffRasterData raster, float excludedValue)
Constructs an instance of this class, tabulating results from the input raster data.- Parameters:
raster- the input dataexcludedValue- an optional value to ignore; use Float.NaN if no value is to be ignored.
-
-
Method Detail
-
getCountOfNulls
public int getCountOfNulls()
Gets the count of the number of null samples in the collection.- Returns:
- the a positive number, potentially zero
-
getCountOfSamples
public int getCountOfSamples()
Gets the count of the number of non-null and non-excluded samples in the collection.- Returns:
- the a positive number, potentially zero
-
getExcludedValue
public float getExcludedValue()
Gets the value that was set for exclusion, or a Float.NaN if not was set.- Returns:
- the excluded value (if any).
-
getMaxValue
public float getMaxValue()
Gets the maximum value found in the source data- Returns:
- the maximum value found in the source data
-
getMeanValue
public float getMeanValue()
Gets the mean value for all sample values in the raster. Null-data values and excluded values are not considered.- Returns:
- the mean value of the samples
-
getMinValue
public float getMinValue()
Gets the minimum value found in the source data- Returns:
- the minimum value found in the source data
-
isAnExcludedValueSet
public boolean isAnExcludedValueSet()
Indicates if a sample value was set to be deliberately excluded from the statistics.- Returns:
- true if a value was set for exclusion; otherwise, false
-
-