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 @ 5439

History | View | Annotate | Download (6.08 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 Valor m?ximo
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?ximo
73
     */
74
    public double getMinimun();
75

    
76
    /**
77
     * Devuelve el m?ximo valor RGB de todos los m?ximos de las bandas
78
     *
79
     * @return M?ximo
80
     */
81
    public double getMaximunByteUnsigned();
82

    
83
    /**
84
     * Devuelve el m?nimo valor RGB de todos los m?nimos de las bandas
85
     * @return M?ximo
86
     */
87
    public double getMinimunByteUnsigned();
88

    
89
    /**
90
     * Obtiene el valor m?dio
91
     *
92
     * @return Valor medio
93
     */
94
    public double[] getMean();
95

    
96
    /**
97
     * Devuelve una lista con los m?nimos de todas las bandas
98
     *
99
     * @return Valor m?nimo
100
     */
101
    public double[] getMin();
102

    
103
    /**
104
     * Obtiene el m?nimo cuando el raster es de typo byte RGB
105
     *
106
     * @return el m?nimo cuando el raster es de typo byte RGB
107
     */
108
    public double[] getMinByteUnsigned();
109

    
110
    /**
111
     * Obtiene el m?ximo cuando el raster es de typo byte RGB
112
     *
113
     * @return el m?ximo cuando el raster es de typo byte RGB
114
     */
115
    public double[] getMaxByteUnsigned();
116

    
117
    /**
118
     * Obtiene el segundo m?ximo cuando el raster es de typo byte RGB
119
     *
120
     * @return el segundo m?ximo cuando el raster es de typo byte RGB
121
     */
122
    public double[] getSecondMaxByteUnsigned();
123

    
124
    /**
125
     * Obtiene el segundo m?nimo cuando el raster es de typo byte RGB
126
     *
127
     * @return el segundo m?nimo cuando el raster es de typo byte RGB
128
     */
129
    public double[] getSecondMinByteUnsigned();
130

    
131
    /**
132
     * Obtiene la varianza
133
     *
134
     * @return Varianza
135
     */
136
    public double[] getVariance();
137

    
138
    /**
139
     * Gets the number of bands
140
     *
141
     * @return the number of bands
142
     */
143
    public int getBandCount();
144

    
145
    /**
146
     * Obtiene un valor de recorte de colas para un porcentaje dado. El valor ser? un array
147
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
148
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
149
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
150
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
151
     *
152
     * @param percent Porcentaje de recorte
153
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
154
     * @return El valor de recorte de colas para el porcentaje dado
155
     */
156
    public Object getTailTrimValue(double percent);
157

    
158
    /**
159
     * Obtiene un valor de recorte de colas para una posici?n dada. El valor ser? un array
160
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
161
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
162
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
163
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
164
     * @param pos posici?n de recorte
165
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
166
     * @return el valor de recorte de colas para la posici?n dada
167
     */
168
    public Object[] getTailTrimValue(int pos);
169

    
170
    /**
171
     * Devuelve el n?mero de valores de recorte de colas calculados.
172
     * @return N?mero de valores de recorte de colas calculados.
173
     */
174
    public int getTailTrimCount();
175

    
176
    /**
177
     * Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
178
     * @return true indica que est?n calculadas y false que no lo est?n
179
     */
180
    public boolean isCalculated();
181

    
182
    /**
183
     * Throws the thread which figure out statistics
184
     * @param scale
185
     * @param status
186
     * @throws FileNotOpenException
187
     * @throws RasterDriverException
188
     * @throws ProcessInterruptedException
189
     */
190
    public void calculate(double scale, SimpleTaskStatus status);
191

    
192
    /**
193
     * Gets the number of pixels by band
194
     *
195
     * @return  the number of pixels by band
196
     */
197
    public long[] getNumberOfCells();
198

    
199
    /**
200
     * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
201
     *
202
     * @return Matriz de varianza-covarianza
203
     */
204
    public double[][] getVarianceCovarianceMatrix();
205

    
206
    /**
207
     * Clones this object
208
     *
209
     * @return this cloned object
210
     */
211
    public Statistics clone();
212

    
213
}