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 / HistogramBand.java @ 5482

History | View | Annotate | Download (5.01 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 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 long getHistogramValueByPos(int pos);
56

    
57
    /**
58
     * Obtiene un valor del histograma
59
     * @param value valor de la clase a recuperar
60
     * @return valor
61
     */
62
    public long getHistogramValue(double value);
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 los valores de las clases
74
     *
75
     * @return los valores de las clases
76
     */
77
    public long[] getFrequencies();
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 long 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 double 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 double getIntervalMax(int interval);
177

    
178
    /**
179
     * Returns median value
180
     * @return
181
     */
182
    public double getMedian();
183
}