public class Median extends Statistics
Statistics
is used for calculating the median of an image. This operation is performed by saving alist of all the pixel
values. When the result is requested, the list is sorted and then the middle value is taken. If the list size is even, then the mean of the 2
middle values.Statistics.StatsType
samples, STATS_PROPERTY, type
Modifier and Type | Method and Description |
---|---|
protected void |
accumulateStats(Statistics stats)
This method is used for accumulating the statistics from another Statistics object
|
void |
addSample(double sample)
This method adds a Double value to the statistics and updates them
|
protected void |
clearStats()
This method is used for clearing the results
|
Long |
getNumSamples()
This method returns the number of samples calculated
|
Object |
getResult()
This method returns the statistic result
|
checkSameStats, getStatsType
public void addSample(double sample)
Statistics
addSample
in class Statistics
sample
- sample value used for updating statisticsprotected void accumulateStats(Statistics stats)
Statistics
accumulateStats
in class Statistics
stats
- Statistics object to add to the current objectpublic Object getResult()
Statistics
getResult
in class Statistics
public Long getNumSamples()
Statistics
getNumSamples
in class Statistics
protected void clearStats()
Statistics
clearStats
in class Statistics
Copyright © 2006–2016 GeoSolutions. All rights reserved.