Revision 5456

View differences:

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/StatisticsCapable.java
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
 * This interface must be implemented by those classes which can provide statistics.
30
 * @author fdiaz
31
 *
32
 */
33
public interface StatisticsCapable {
34

  
35
    /**
36
     * Gets the statistics of the object than implements this interface
37
     *
38
     * @param status
39
     * @return the statistics
40
     */
41
    Statistics getStatistics(SimpleTaskStatus status);
42

  
43
}
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/HistogramCapable.java
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
 * This interface must be implemented by those classes which can provide an histogram.
30
 *
31
 * @author fdiaz
32
 *
33
 */
34
public interface HistogramCapable {
35

  
36
    /**
37
     * Gets the histogram of the object than implements this interface
38
     *
39
     * @param status
40
     * @return the statistics
41
     */
42
    Histogram getHistogram(SimpleTaskStatus status);
43

  
44
}
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/StatisticsBand.java
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 StatisticsBand {
33

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

  
41
    /**
42
     * Obtiene el valor del segundo m?ximo
43
     *
44
     * @return Valor del segundo m?ximo
45
     */
46
    public double getSecondMax();
47

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

  
55
    /**
56
     * Devuelve el m?ximo valor de la banda
57
     *
58
     * @return maximum
59
     */
60
    public double getMaximum();
61

  
62
    /**
63
     * Devuelve el m?nimo valor de la banda
64
     *
65
     * @return minimum
66
     */
67
    public double getMinimun();
68

  
69
    /**
70
     * Obtiene el valor medio
71
     *
72
     * @return Valor medio
73
     */
74
    public double getMean();
75

  
76
    /**
77
     * Obtiene la varianza
78
     *
79
     * @return Varianza
80
     */
81
    public double getVariance();
82

  
83
    /**
84
     * Obtiene un valor de recorte de colas para un porcentaje dado. Este recorte consiste en ordenar los elementos del
85
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
86
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
87
     *
88
     * @param percent Porcentaje de recorte
89
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
90
     * @return El valor de recorte de colas para el porcentaje dado
91
     */
92
    public Object getTailTrimValue(double percent);
93

  
94
    /**
95
     * Obtiene un valor de recorte de colas para una posici?n dada. Este recorte consiste en ordenar los elementos del
96
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
97
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
98
     * @param pos posici?n de recorte
99
     * @return el valor de recorte de colas para la posici?n dada
100
     */
101
    public Object getTailTrimValue(int pos);
102

  
103
    /**
104
     * Devuelve el n?mero de valores de recorte de colas calculados.
105
     * @return N?mero de valores de recorte de colas calculados.
106
     */
107
    public int getTailTrimCount();
108

  
109
    /**
110
     * Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
111
     * @return true indica que est?n calculadas y false que no lo est?n
112
     */
113
    public boolean isCalculated();
114

  
115
    /**
116
     * Throws the thread which figure out statistics
117
     * @param scale
118
     * @param status
119
     * @throws FileNotOpenException
120
     * @throws RasterDriverException
121
     * @throws ProcessInterruptedException
122
     */
123
    public void calculate(double scale, SimpleTaskStatus status);
124

  
125
    /**
126
     * Gets the number of pixels by band
127
     *
128
     * @return  the number of pixels by band
129
     */
130
    public long getNumberOfCells();
131

  
132
    /**
133
     * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
134
     *
135
     * @return Matriz de varianza-covarianza
136
     */
137
    public double[] getVarianceCovarianceMatrix();
138

  
139
    /**
140
     * Gets histogram of the band
141
     *
142
     * @return HistogramBand
143
     */
144
    public HistogramBand getHistogramBand();
145

  
146
}
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/HistogramBand.java
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 HistogramBand {
33

  
34

  
35
    /**
36
     * Obtiene la longitud (n?mero de valores)
37
     * @return entero con la longitud de la banda
38
     * rangos de valores y DataclassList.
39
     */
40
    public int getBandLenght();
41

  
42
    /**
43
     * Obtiene el tipo de datos de la banda
44
     *
45
     * @return el tipo de datos de la banda
46
     */
47
    public int getDataType();
48

  
49
    /**
50
     * Obtiene un valor del histograma segun la posicion dentro de las clases
51
     * @param pos Pixel o valor de la clase del valor a recuperar
52
     *
53
     * @return valor
54
     */
55
    public double getHistogramValueByPos(int pos);
56

  
57
    /**
58
     * Obtiene un valor del histograma
59
     * @param px Pixel o valor de la clase del valor a recuperar
60
     * @return valor
61
     */
62
    public double getHistogramValue(double px);
63

  
64
    /**
65
     * Realiza la uni?n entre el histograma actual y el pasado
66
     * por par?metro.
67
     * @param hist
68
     * @return true if the union has been possible
69
     */
70
    public boolean union(HistogramBand hist);
71

  
72
    /**
73
     * Obtiene la tabla de valores
74
     *
75
     * @return la tabla de valores
76
     */
77
    public long[] getTable();
78

  
79

  
80
    /**
81
     * Obtiene el histograma de la imagen negativa.
82
     *
83
     * @return el histograma de la imagen negativa.
84
     */
85
    public long[] getNegativeTable();
86

  
87
    /**
88
     * Devuelve el minimo valor del histograma
89
     *
90
     * @return el minimo valor del histograma
91
     */
92
    public double getMinimum();
93

  
94
    /**
95
     * Devuelve el maximo valor del histograma
96
     *
97
     * @return el maximo valor del histograma
98
     */
99
    public double getMaximum();
100

  
101
    /**
102
     * Obtiene el n?mero de valores o clases del histograma
103
     * @return entero que representa el n?mero de valores o clases del histograma
104
     */
105
    public int getNumValues();
106

  
107
    /**
108
     * Calculo de estad?sticas a partir de un histograma. El resultado de la funci?n es un array
109
     * bidimensional donde el primer ?ndice inndica la estadistica y el segundo el n?mero de banda.
110
     *
111
     * <UL>
112
     * <LI>m?nimo</LI>
113
     * <LI>m?ximo</LI>
114
     * <LI>media</LI>
115
     * <LI>mediana</LI>
116
     * <LI>N?mero de pixels</LI>
117
     * </UL>
118
     * @param beginPos Posici?n de inicio del histograma para contabilizar estadisticas
119
     * @param endPos Posici?n de fin del histograma para contabilizar estadisticas
120
     * estadistica para esa banda y si est? a false no se calcular?.
121
     *
122
     * @return las estad?sticas a partir del histograma.
123
     */
124
    public double[] getBasicStats(double beginPos, double endPos);
125

  
126
    /**
127
     * Calculo de estad?sticas a partir de un histograma. El resultado de la funci?n es un array
128
     * bidimensional donde el primer ?ndice inndica la estadistica y el segundo el n?mero de banda.
129
     *
130
     * <UL>
131
     * <LI>m?nimo</LI>
132
     * <LI>m?ximo</LI>
133
     * <LI>media</LI>
134
     * <LI>mediana</LI>
135
     * <LI>N?mero de pixels</LI>
136
     * </UL>
137
     *
138
     * @return las estad?sticas a partir del histograma.
139
     */
140
    public double[] getBasicStats();
141

  
142
    /**
143
     * Calcula las estad?sticas.
144
     *
145
     * @param status
146
     */
147
    public void calculate(SimpleTaskStatus status);
148

  
149
    /**
150
     * @return true if the histogram has been calculated
151
     */
152
    public boolean isCalculated();
153

  
154
    /**
155
     * Devuelve el n?mero de valores de un intervalo
156
     *
157
     * @param interval
158
     * @return el n?mero de valores del intervalo
159
     */
160
    public int getValueCount(int interval);
161

  
162
    /**
163
     * Devuelve el valor m?nimo de un intervalo
164
     *
165
     * @param interval
166
     * @return el valor m?nimo del intervalo
167
     */
168
    public int getIntervalMin(int interval);
169

  
170
    /**
171
     * Devuelve el valor m?ximo de un intervalo
172
     *
173
     * @param interval
174
     * @return el valor m?ximo del intervalo
175
     */
176
    public int getIntervalMax(int interval);
177

  
178
}
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
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
}
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/Histogram.java
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

  
26

  
27
/**
28
 * @author fdiaz
29
 *
30
 */
31
public interface Histogram extends Iterable<HistogramBand> {
32

  
33
    /**
34
     * Obtiene el n?mero de bandas del histograma
35
     * @return entero que representa el n?mero de bandas
36
     */
37
    public int size();
38

  
39
    /**
40
     * @param i
41
     * @return
42
     */
43
    public HistogramBand get(int band);
44
//
45
//    /**
46
//     * Realiza la uni?n entre el histograma actual y el pasado
47
//     * por par?metro.
48
//     * @param hist
49
//     * @return true if the union has been possible
50
//     */
51
//    public boolean union(Histogram hist);
52

  
53
    /**
54
     * Obtiene la tabla de valores
55
     *
56
     * @return la tabla de valores
57
     */
58
    public long[][] getTable();
59

  
60

  
61
    /**
62
     * Obtiene el histograma de la imagen negativa.
63
     *
64
     * @return el histograma de la imagen negativa.
65
     */
66
    public long[][] getNegativeTable();
67

  
68
//    /**
69
//     * Devuelve el minimo valor del histograma
70
//     *
71
//     * @return el minimo valor del histograma
72
//     */
73
//    public double getMinimum();
74
//
75
//    /**
76
//     * Devuelve el maximo valor del histograma
77
//     *
78
//     * @return el maximo valor del histograma
79
//     */
80
//    public double getMaximum();
81

  
82
    /**
83
     * Obtiene el n?mero de valores o clases del histograma
84
     * @return entero que representa el n?mero de valores o clases del histograma
85
     */
86
    public int getNumValues();
87

  
88
    /**
89
     * Devuelve si un histograma esta en un rango RGB aceptable
90
     *
91
     * @return si un histograma esta en un rango RGB aceptable
92
     */
93
    public boolean isInRangeRGB();
94

  
95
//    /**
96
//     * Calcula las estad?sticas.
97
//     *
98
//     * @param status
99
//     */
100
//    public void calculate(SimpleTaskStatus status);
101
//
102
//    /**
103
//     * @return true if the histogram has been calculated
104
//     */
105
//    public boolean isCalculated();
106

  
107
//    /**
108
//     * Devuelve los valores m?nimos de todas las bandas
109
//     *
110
//     * @return los valores m?nimos de todas las bandas
111
//     */
112
//    public double[] getMin();
113
//
114
//    /**
115
//     * Devuelve los valores m?nimos de todas las bandas
116
//     *
117
//     * @return los valores m?nimos de todas las bandas
118
//     */
119
//    public double[] getMax();
120

  
121
}
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/StatisticsBand.java
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 StatisticsBand {
33

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

  
41
    /**
42
     * Obtiene el valor del segundo m?ximo
43
     *
44
     * @return Valor del segundo m?ximo
45
     */
46
    public double getSecondMax();
47

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

  
55
    /**
56
     * Devuelve el m?ximo valor de la banda
57
     *
58
     * @return maximum
59
     */
60
    public double getMaximum();
61

  
62
    /**
63
     * Devuelve el m?nimo valor de la banda
64
     *
65
     * @return minimum
66
     */
67
    public double getMinimun();
68

  
69
    /**
70
     * Obtiene el valor medio
71
     *
72
     * @return Valor medio
73
     */
74
    public double getMean();
75

  
76
    /**
77
     * Obtiene la varianza
78
     *
79
     * @return Varianza
80
     */
81
    public double getVariance();
82

  
83
    /**
84
     * Obtiene un valor de recorte de colas para un porcentaje dado. Este recorte consiste en ordenar los elementos del
85
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
86
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
87
     *
88
     * @param percent Porcentaje de recorte
89
     * @param valueByBand array bidimensional de enteros o doubles. Depende del tipo de dato del raster.
90
     * @return El valor de recorte de colas para el porcentaje dado
91
     */
92
    public Object getTailTrimValue(double percent);
93

  
94
    /**
95
     * Obtiene un valor de recorte de colas para una posici?n dada. Este recorte consiste en ordenar los elementos del
96
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
97
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
98
     * @param pos posici?n de recorte
99
     * @return el valor de recorte de colas para la posici?n dada
100
     */
101
    public Object getTailTrimValue(int pos);
102

  
103
    /**
104
     * Devuelve el n?mero de valores de recorte de colas calculados.
105
     * @return N?mero de valores de recorte de colas calculados.
106
     */
107
    public int getTailTrimCount();
108

  
109
    /**
110
     * Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
111
     * @return true indica que est?n calculadas y false que no lo est?n
112
     */
113
    public boolean isCalculated();
114

  
115
    /**
116
     * Throws the thread which figure out statistics
117
     * @param scale
118
     * @param status
119
     * @throws FileNotOpenException
120
     * @throws RasterDriverException
121
     * @throws ProcessInterruptedException
122
     */
123
    public void calculate(double scale, SimpleTaskStatus status);
124

  
125
    /**
126
     * Gets the number of pixels by band
127
     *
128
     * @return  the number of pixels by band
129
     */
130
    public long getNumberOfCells();
131

  
132
    /**
133
     * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
134
     *
135
     * @return Matriz de varianza-covarianza
136
     */
137
    public double[] getVarianceCovarianceMatrix();
138

  
139
    /**
140
     * Gets histogram of the band
141
     *
142
     * @return HistogramBand
143
     */
144
    public HistogramBand getHistogramBand();
145

  
146
}
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/HistogramBand.java
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 HistogramBand {
33

  
34

  
35
    /**
36
     * Obtiene la longitud (n?mero de valores)
37
     * @return entero con la longitud de la banda
38
     * rangos de valores y DataclassList.
39
     */
40
    public int getBandLenght();
41

  
42
    /**
43
     * Obtiene el tipo de datos de la banda
44
     *
45
     * @return el tipo de datos de la banda
46
     */
47
    public int getDataType();
48

  
49
    /**
50
     * Obtiene un valor del histograma segun la posicion dentro de las clases
51
     * @param pos Pixel o valor de la clase del valor a recuperar
52
     *
53
     * @return valor
54
     */
55
    public double getHistogramValueByPos(int pos);
56

  
57
    /**
58
     * Obtiene un valor del histograma
59
     * @param px Pixel o valor de la clase del valor a recuperar
60
     * @return valor
61
     */
62
    public double getHistogramValue(double px);
63

  
64
    /**
65
     * Realiza la uni?n entre el histograma actual y el pasado
66
     * por par?metro.
67
     * @param hist
68
     * @return true if the union has been possible
69
     */
70
    public boolean union(HistogramBand hist);
71

  
72
    /**
73
     * Obtiene la tabla de valores
74
     *
75
     * @return la tabla de valores
76
     */
77
    public long[] getTable();
78

  
79

  
80
    /**
81
     * Obtiene el histograma de la imagen negativa.
82
     *
83
     * @return el histograma de la imagen negativa.
84
     */
85
    public long[] getNegativeTable();
86

  
87
    /**
88
     * Devuelve el minimo valor del histograma
89
     *
90
     * @return el minimo valor del histograma
91
     */
92
    public double getMinimum();
93

  
94
    /**
95
     * Devuelve el maximo valor del histograma
96
     *
97
     * @return el maximo valor del histograma
98
     */
99
    public double getMaximum();
100

  
101
    /**
102
     * Obtiene el n?mero de valores o clases del histograma
103
     * @return entero que representa el n?mero de valores o clases del histograma
104
     */
105
    public int getNumValues();
106

  
107
    /**
108
     * Calculo de estad?sticas a partir de un histograma. El resultado de la funci?n es un array
109
     * bidimensional donde el primer ?ndice inndica la estadistica y el segundo el n?mero de banda.
110
     *
111
     * <UL>
112
     * <LI>m?nimo</LI>
113
     * <LI>m?ximo</LI>
114
     * <LI>media</LI>
115
     * <LI>mediana</LI>
116
     * <LI>N?mero de pixels</LI>
117
     * </UL>
118
     * @param beginPos Posici?n de inicio del histograma para contabilizar estadisticas
119
     * @param endPos Posici?n de fin del histograma para contabilizar estadisticas
120
     * estadistica para esa banda y si est? a false no se calcular?.
121
     *
122
     * @return las estad?sticas a partir del histograma.
123
     */
124
    public double[] getBasicStats(double beginPos, double endPos);
125

  
126
    /**
127
     * Calculo de estad?sticas a partir de un histograma. El resultado de la funci?n es un array
128
     * bidimensional donde el primer ?ndice inndica la estadistica y el segundo el n?mero de banda.
129
     *
130
     * <UL>
131
     * <LI>m?nimo</LI>
132
     * <LI>m?ximo</LI>
133
     * <LI>media</LI>
134
     * <LI>mediana</LI>
135
     * <LI>N?mero de pixels</LI>
136
     * </UL>
137
     *
138
     * @return las estad?sticas a partir del histograma.
139
     */
140
    public double[] getBasicStats();
141

  
142
    /**
143
     * Calcula las estad?sticas.
144
     *
145
     * @param status
146
     */
147
    public void calculate(SimpleTaskStatus status);
148

  
149
    /**
150
     * @return true if the histogram has been calculated
151
     */
152
    public boolean isCalculated();
153

  
154
    /**
155
     * Devuelve el n?mero de valores de un intervalo
156
     *
157
     * @param interval
158
     * @return el n?mero de valores del intervalo
159
     */
160
    public int getValueCount(int interval);
161

  
162
    /**
163
     * Devuelve el valor m?nimo de un intervalo
164
     *
165
     * @param interval
166
     * @return el valor m?nimo del intervalo
167
     */
168
    public int getIntervalMin(int interval);
169

  
170
    /**
171
     * Devuelve el valor m?ximo de un intervalo
172
     *
173
     * @param interval
174
     * @return el valor m?ximo del intervalo
175
     */
176
    public int getIntervalMax(int interval);
177

  
178
}
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/StatisticsCapable.java
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
 * This interface must be implemented by those classes which can provide statistics.
30
 * @author fdiaz
31
 *
32
 */
33
public interface StatisticsCapable {
34

  
35
    /**
36
     * Gets the statistics of the object than implements this interface
37
     *
38
     * @param status
39
     * @return the statistics
40
     */
41
    Statistics getStatistics(SimpleTaskStatus status);
42

  
43
}
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/HistogramClass.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.raster.lib.buffer.api.statistics;
23

  
24

  
25
/**
26
 * Clase que define un intervalo de datos. Es util para cosas como el calculo de histogramas
27
 * con tipo de datos en coma flotante en el cual hay que dividir los intervalos en
28
 * clases. Las clases se tendr?n en cuenta como un intervalo el cual el menor es cerrado y el
29
 * mayor abierto, es decir
30
 * <PRE>
31
 * En las clases:
32
 * 0-1000
33
 * 1000-2000
34
 * los intervalos son
35
 * [0, 1000 [  de 0-999.9p
36
 * [1000, 2000[ de 1000-1999.9p
37
 * </PRE>
38
 *
39
 * @author Nacho Brodin (nachobrodin@gmail.com)
40
 *
41
 */
42
public interface HistogramClass extends Comparable{
43

  
44
	/**
45
	 * Comprueba si el valor pasado por par?metro est? dentro del intervalo
46
	 * @param value Valor a comprobar
47
	 * @return true si est? dentro del intervalo y false si no lo est?
48
	 */
49
	public boolean isIn(double value);
50

  
51
	/**
52
	 * Obtiene el valor m?ximo de la clase
53
	 * @return double que representa al valor m?ximo de la clase
54
	 */
55
	public double getMax();
56

  
57
	/**
58
	 * Asigna el valor m?ximo de la clase
59
	 * @param max double que representa al valor m?ximo de la clase
60
	 */
61
	public void setMax(double max);
62

  
63
	/**
64
	 * Obtiene el valor m?nimo de la clase
65
	 * @return double que representa al valor m?nimo de la clase
66
	 */
67
	public double getMin();
68

  
69
	/**
70
	 * ASigna el valor m?nimo de la clase
71
	 * @param min double que representa al valor m?nimo de la clase
72
	 */
73
	public void setMin(double min);
74

  
75
	/**
76
	 * Obtiene el valor de la clase
77
	 * @return long con el valor
78
	 */
79
	public long getValue();
80

  
81
	/**
82
	 * Asigna el valor de la clase
83
	 * @param long con el valor
84
	 */
85
	public void setValue(long value);
86

  
87
	/**
88
	 * Incrementa en n el valor especificado
89
	 * @param long n
90
	 */
91
	public void increment(long n);
92
}
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/HistogramCapable.java
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
 * This interface must be implemented by those classes which can provide an histogram.
30
 *
31
 * @author fdiaz
32
 *
33
 */
34
public interface HistogramCapable {
35

  
36
    /**
37
     * Gets the histogram of the object than implements this interface
38
     *
39
     * @param status
40
     * @return the statistics
41
     */
42
    Histogram getHistogram(SimpleTaskStatus status);
43

  
44
}
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
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
     * 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
}
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/Histogram.java
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

  
26

  
27
/**
28
 * @author fdiaz
29
 *
30
 */
31
public interface Histogram extends Iterable<HistogramBand> {
32

  
33
    /**
34
     * Obtiene el n?mero de bandas del histograma
35
     * @return entero que representa el n?mero de bandas
36
     */
37
    public int size();
38

  
39
    /**
40
     * @param i
41
     * @return
42
     */
43
    public HistogramBand get(int band);
44
//
45
//    /**
46
//     * Realiza la uni?n entre el histograma actual y el pasado
47
//     * por par?metro.
48
//     * @param hist
49
//     * @return true if the union has been possible
50
//     */
51
//    public boolean union(Histogram hist);
52

  
53
    /**
54
     * Obtiene la tabla de valores
55
     *
56
     * @return la tabla de valores
57
     */
58
    public long[][] getTable();
59

  
60

  
61
    /**
62
     * Obtiene el histograma de la imagen negativa.
63
     *
64
     * @return el histograma de la imagen negativa.
65
     */
66
    public long[][] getNegativeTable();
67

  
68
//    /**
69
//     * Devuelve el minimo valor del histograma
70
//     *
71
//     * @return el minimo valor del histograma
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff