Statistics
| Revision:

svn-gvsig-desktop / tags / v1_1_Build_1000 / libraries / libCq_CMS_praster / src / org / cresques / filter / bands / PaletteFilter.java @ 11885

History | View | Annotate | Download (2.26 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 */
19

    
20
package org.cresques.filter.bands;
21

    
22
import org.cresques.filter.RasterFilter;
23
import org.cresques.io.data.RasterBuf;
24
import org.cresques.io.datastruct.Palette;
25

    
26
/**
27
 * Clase basa para los filtros de paleta.
28
 * @author Nacho Brodin (brodin_ign@gva.es)
29
 *
30
 */
31

    
32
public abstract class PaletteFilter extends RasterFilter {
33

    
34
        protected Palette palette = null;        
35
        protected boolean interpolate = false;
36
        protected RasterBuf rasterResult = null;
37
        public boolean wmsFilterFlag = false;
38
        
39
        /**
40
         * Obtiene si la paleta ser? aplicada con interpolaci?n de colores o no.
41
         * @return true si es aplicada con interpolaci?n de colores y false si no lo es
42
         */
43
        public boolean isInterpolate() {
44
                return interpolate;
45
        }
46

    
47
        /**
48
         * Asigna si la paleta ser? aplicada con interpolaci?n de colores o no.
49
         * @param interpolate true si queremos que se aplique con interpolaci?n y false si no queremos.
50
         */
51
        public void setInterpolate(boolean interpolate) {
52
                this.interpolate = interpolate;
53
        }
54

    
55
        public PaletteFilter(){
56
                super();
57
        }
58
        
59
        public void pre() {
60
                this.palette = ((Palette) params.get("palette"));
61
                this.interpolate = ((Boolean)params.get("interpolate")).booleanValue();
62
        }
63

    
64
        public void post() {
65
                // TODO Auto-generated method stub
66

    
67
        }
68

    
69
        /**
70
         * Obtiene la paleta
71
         * @return Palette
72
         */
73
        public Palette getPalette() {
74
                return palette;
75
        }
76

    
77
        /**
78
         * Asigna una paleta
79
         * @param palette 
80
         */
81
        public void setPalette(Palette palette) {
82
                this.palette = palette;
83
        }
84

    
85
}