Statistics
| Revision:

gvsig-raster / org.gvsig.raster / tags / 2.0.0 / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / store / props / HistogramComputer.java @ 1708

History | View | Annotate | Download (2.79 KB)

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.fmap.dal.coverage.store.props;
23

    
24
import org.gvsig.fmap.dal.coverage.datastruct.BufferHistogram;
25
import org.gvsig.fmap.dal.coverage.exception.HistogramException;
26
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
27
import org.gvsig.fmap.dal.coverage.process.IncrementableTask;
28

    
29
/**
30
 * Interfaz para la gesti?n de histogramas de un raster. Es la encargada del calculo de un histograma
31
 * total o parcial de un raster a partir de los datos de disco. Adem?s tambi?n es la encargada de gestionar
32
 * salvar este histograma a .rmf. En caso de que solicite un histograma del raster completo este ir?
33
 * a buscarlo al fichero rmf asociado antes de calcularlo por si ya existise. Al realizar el calculo
34
 * del histograma de la imagen completa este ser? salvado en el fichero .rmf asociado al raster.
35
 * 
36
 * @author Nacho Brodin (nachobrodin@gmail.com)
37
 */
38
public interface HistogramComputer extends IncrementableTask {
39
        
40
        /**
41
         * Obtiene el minimo valor de las estadisticas de un histograma.
42
         * @return double
43
         */
44
        public double getMinimum();
45

    
46
        /**
47
         * Obtiene el maximo valor de las estadisticas de un histograma.
48
         * @return double
49
         */
50
        public double getMaximum();
51
        
52
        /**
53
         * Obtiene el histograma. Si puede conseguirlo del fichero rmf ir? all? a 
54
         * buscarlo sino lo calcular?.
55
         * @return histograma 
56
         */
57
        public BufferHistogram getBufferHistogram() throws HistogramException, ProcessInterruptedException;
58

    
59
        /**
60
         * Pone a cero el porcentaje de progreso del proceso de calculo de histograma
61
         */
62
        public void resetPercent();
63
        
64
        /**
65
         * Force to recalculate the histogram next time that the method getBufferHistogram
66
         * be called 
67
         */
68
        public void refreshHistogram();
69
        
70
        /**
71
         * This value represents the percentage of the image that will be used 
72
         * for this process. The default value is one, that means that the entire 
73
         * image will be processed
74
         */
75
        public void setScaleHistogram(double scale);
76
        
77
}