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 / Statistics.java @ 5493
History | View | Annotate | Download (4.9 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.statistics; |
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 |
* @return Gets median of bands
|
85 |
*/
|
86 |
public double[] getMedian(); |
87 |
|
88 |
/**
|
89 |
* Devuelve una lista con los m?nimos de todas las bandas
|
90 |
*
|
91 |
* @return Valor m?nimo
|
92 |
*/
|
93 |
public double[] getMin(); |
94 |
|
95 |
/**
|
96 |
* Obtiene la varianza
|
97 |
*
|
98 |
* @return Varianza
|
99 |
*/
|
100 |
public double[] getVariance(); |
101 |
|
102 |
/**
|
103 |
* Gets the number of bands
|
104 |
*
|
105 |
* @return the number of bands
|
106 |
*/
|
107 |
public int getBandCount(); |
108 |
|
109 |
/**
|
110 |
* Obtiene un valor de recorte de colas para un porcentaje dado. El valor ser? un array
|
111 |
* bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
|
112 |
* esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
|
113 |
* raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
|
114 |
* desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
|
115 |
*
|
116 |
* @param percent Porcentaje de recorte
|
117 |
* @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
|
118 |
* @return El valor de recorte de colas para el porcentaje dado
|
119 |
*/
|
120 |
public Object getTailTrimValue(double percent); |
121 |
|
122 |
/**
|
123 |
* Obtiene un valor de recorte de colas para una posici?n dada. El valor ser? un array
|
124 |
* bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
|
125 |
* esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
|
126 |
* raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
|
127 |
* desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
|
128 |
* @param pos posici?n de recorte
|
129 |
* @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
|
130 |
* @return el valor de recorte de colas para la posici?n dada
|
131 |
*/
|
132 |
public Object[] getTailTrimValue(int pos); |
133 |
|
134 |
/**
|
135 |
* Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
|
136 |
* @return true indica que est?n calculadas y false que no lo est?n
|
137 |
*/
|
138 |
public boolean isCalculated(); |
139 |
|
140 |
/**
|
141 |
* Throws the thread which figure out statistics
|
142 |
* @param status
|
143 |
* @throws FileNotOpenException
|
144 |
* @throws RasterDriverException
|
145 |
* @throws ProcessInterruptedException
|
146 |
*/
|
147 |
public void calculate(SimpleTaskStatus status); //??? scale ??? |
148 |
|
149 |
// /**
|
150 |
// * Gets the number of pixels by band
|
151 |
// *
|
152 |
// * @return the number of pixels by band
|
153 |
// */
|
154 |
// public long[] getNumberOfCells();
|
155 |
|
156 |
/**
|
157 |
* Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
|
158 |
*
|
159 |
* @return Matriz de varianza-covarianza
|
160 |
*/
|
161 |
public double[][] getVarianceCovarianceMatrix(); |
162 |
|
163 |
/**
|
164 |
* Return the histogram.
|
165 |
*
|
166 |
* @return Histogram
|
167 |
*/
|
168 |
public Histogram getHistogram();
|
169 |
|
170 |
} |