org.jaitools.media.jai.classifiedstats
Class Result

java.lang.Object
  extended by org.jaitools.media.jai.classifiedstats.Result

public class Result
extends Object

Holds the result for a given combination of image band / classifier / statistic / ranges. See documentation for ClassifiedStats for examples on how to access results.

Author:
Daniele Romagnoli, GeoSolutions SAS, Michael Bedward
See Also:
ClassifiedStats

Constructor Summary
Result(int imageBand, Statistic stat, List<Range<Double>> ranges, Double value, long numOffered, long numAccepted, long numNaN, long numNoData, org.apache.commons.collections.keyvalue.MultiKey classifierKeys)
          Create a new Result object.
 
Method Summary
 org.apache.commons.collections.keyvalue.MultiKey getClassifierKeys()
          Get the classifier keys.
 int getImageBand()
          Get the index of the image band for which this result was calculated.
 long getNumAccepted()
          Get the number of values that were accepted, ie.
 long getNumNaN()
          Get the number of NaN values that were sampled from the image when calculating this result.
 long getNumNoData()
          Get the number of NoData values that were sampled from the image when calculating this result.
 long getNumOffered()
          Get the number of values that were offered, ie.
 Collection<Range<Double>> getRanges()
          Get the ranges (if defined) that were used to filter data image values for inclusion in the calculation of this result.
 Statistic getStatistic()
          Get the statistic that this result pertains to.
 Double getValue()
          Get the calculated value of the statistic.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Result

public Result(int imageBand,
              Statistic stat,
              List<Range<Double>> ranges,
              Double value,
              long numOffered,
              long numAccepted,
              long numNaN,
              long numNoData,
              org.apache.commons.collections.keyvalue.MultiKey classifierKeys)
Create a new Result object. This is intended for use by the ClassifiedStats class rather than client code.

Parameters:
imageBand - data image band
stat - the statistic to which this result pertains
ranges - list of ranges (if any) used to filter data image values
value - the calculated value of the statistic
numOffered - number of data image values considered for inclusion
numAccepted - number of data image values actually used for calculating this result
numNaN - number of NaN values read from the data image
numNoData - number of NoData values read from the data image
classifierKeys - the classifier keys (multikey) associated to this result
Method Detail

getRanges

public Collection<Range<Double>> getRanges()
Get the ranges (if defined) that were used to filter data image values for inclusion in the calculation of this result.

Returns:
ranges used to filter data image values

getImageBand

public int getImageBand()
Get the index of the image band for which this result was calculated.

Returns:
image band index

getStatistic

public Statistic getStatistic()
Get the statistic that this result pertains to.

Returns:
the statistic

getValue

public Double getValue()
Get the calculated value of the statistic.

Returns:
value of the statistic

getNumAccepted

public long getNumAccepted()
Get the number of values that were accepted, ie. sampled from the image and included in the calculation of this result.

Returns:
the number of values accepted

getNumOffered

public long getNumOffered()
Get the number of values that were offered, ie. sampled from the image and considered for inclusion in this result.

Returns:
number of values offered

getNumNaN

public long getNumNaN()
Get the number of NaN values that were sampled from the image when calculating this result.

Returns:
number of NaN values sampled

getNumNoData

public long getNumNoData()
Get the number of NoData values that were sampled from the image when calculating this result.

Returns:
number of NoData values sampled

getClassifierKeys

public org.apache.commons.collections.keyvalue.MultiKey getClassifierKeys()
Get the classifier keys. The key order respects the order of the classifier layers. Supposing you have set a classified stats with classifierImage1 and classifierImage2 the MultiKey [key1, key2] refers to the key associated with classifierImage1 and classifierImage2 respectively.

Returns:
the classifier keys

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2015. All Rights Reserved.