Statistics
| Revision:

gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.buffer / org.gvsig.raster.lib.buffer.api / src / main / java / org / gvsig / raster / lib / buffer / api / Statistics.java @ 5441

History | View | Annotate | Download (4.88 KB)

1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2016 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.raster.lib.buffer.api;
24

    
25
import org.gvsig.tools.task.SimpleTaskStatus;
26

    
27

    
28
/**
29
 * @author fdiaz
30
 *
31
 */
32
public interface Statistics {
33

    
34
    /**
35
     * Gets the number of values by band
36
     *
37
     * @return the number of values by band
38
     */
39
    public long[] getNumberOfValues();
40

    
41
    /**
42
     * Devuelve una lista con los m?ximos de todas las bandas
43
     *
44
     * @return Valores m?ximos
45
     */
46
    public double[] getMax();
47

    
48
    /**
49
     * Obtiene el valor del segundo m?ximo
50
     *
51
     * @return Valor del segundo m?ximo
52
     */
53
    public double[] getSecondMax();
54

    
55
    /**
56
     * Obtiene el valor del segundo m?nimo
57
     *
58
     * @return Valor del segundo m?nimo
59
     */
60
    public double[] getSecondMin();
61

    
62
    /**
63
     * Devuelve el m?ximo valor de todos los m?ximos de las bandas
64
     *
65
     * @return M?ximo
66
     */
67
    public double getMaximun();
68

    
69
    /**
70
     * Devuelve el m?nimo valor de todos los m?nimos de las bandas
71
     *
72
     * @return M?nimo
73
     */
74
    public double getMinimun();
75

    
76
    /**
77
     * Obtiene el valor m?dio
78
     *
79
     * @return Valor medio
80
     */
81
    public double[] getMean();
82

    
83
    /**
84
     * Devuelve una lista con los m?nimos de todas las bandas
85
     *
86
     * @return Valor m?nimo
87
     */
88
    public double[] getMin();
89

    
90
    /**
91
     * Obtiene la varianza
92
     *
93
     * @return Varianza
94
     */
95
    public double[] getVariance();
96

    
97
    /**
98
     * Gets the number of bands
99
     *
100
     * @return the number of bands
101
     */
102
    public int getBandCount();
103

    
104
    /**
105
     * Obtiene un valor de recorte de colas para un porcentaje dado. El valor ser? un array
106
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
107
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
108
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
109
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
110
     *
111
     * @param percent Porcentaje de recorte
112
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
113
     * @return El valor de recorte de colas para el porcentaje dado
114
     */
115
    public Object getTailTrimValue(double percent);
116

    
117
    /**
118
     * Obtiene un valor de recorte de colas para una posici?n dada. El valor ser? un array
119
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
120
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
121
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
122
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
123
     * @param pos posici?n de recorte
124
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
125
     * @return el valor de recorte de colas para la posici?n dada
126
     */
127
    public Object[] getTailTrimValue(int pos);
128

    
129
    /**
130
     * Devuelve el n?mero de valores de recorte de colas calculados.
131
     * @return N?mero de valores de recorte de colas calculados.
132
     */
133
    public int getTailTrimCount();
134

    
135
    /**
136
     * Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
137
     * @return true indica que est?n calculadas y false que no lo est?n
138
     */
139
    public boolean isCalculated();
140

    
141
    /**
142
     * Throws the thread which figure out statistics
143
     * @param scale
144
     * @param status
145
     * @throws FileNotOpenException
146
     * @throws RasterDriverException
147
     * @throws ProcessInterruptedException
148
     */
149
    public void calculate(double scale, SimpleTaskStatus status);
150

    
151
    /**
152
     * Gets the number of pixels by band
153
     *
154
     * @return  the number of pixels by band
155
     */
156
    public long[] getNumberOfCells();
157

    
158
    /**
159
     * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
160
     *
161
     * @return Matriz de varianza-covarianza
162
     */
163
    public double[][] getVarianceCovarianceMatrix();
164

    
165
}