gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster_dataaccess_refactoring / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / grid / RasterFilter.java @ 2348
History | View | Annotate | Download (4.69 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.grid; |
23 |
|
24 |
import java.util.Hashtable; |
25 |
import java.util.TreeMap; |
26 |
|
27 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
28 |
import org.gvsig.fmap.dal.coverage.exception.FilterAddException; |
29 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
30 |
|
31 |
/**
|
32 |
* Este interfaz es implementado por el ancestro de cualquier filtro o el propio filtro.
|
33 |
* Contiene las operaciones necesarias para su ejecuci?n a trav?s de la pila de filtros.
|
34 |
*
|
35 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
36 |
*/
|
37 |
public interface RasterFilter { |
38 |
public static String RESULT_BUFFER = "raster"; |
39 |
public static String RESULT_TRANSPARENCY = "transparency"; |
40 |
|
41 |
/**
|
42 |
* Acciones a realizar antes de la ejecuci?n del filtro
|
43 |
*/
|
44 |
public void pre() throws FilterAddException; |
45 |
|
46 |
/**
|
47 |
* Ejecuci?n de la funci?n process de todo el filtro.
|
48 |
* @throws ProcessInterruptedException
|
49 |
*
|
50 |
*/
|
51 |
public void execute() throws ProcessInterruptedException, FilterAddException; |
52 |
|
53 |
/**
|
54 |
* Procesa la posici?n x,y del raster
|
55 |
* @param x posici?n X
|
56 |
* @param y posici?n Y
|
57 |
*/
|
58 |
public void process(int x, int y); |
59 |
|
60 |
/**
|
61 |
* Acciones a realizar despu?s de la ejecuci?n del filtro
|
62 |
*/
|
63 |
public void post(); |
64 |
|
65 |
/**
|
66 |
* Returns true if this filter is to conver the input buffer to RGB. This kind
|
67 |
* of filters will be in the top of the stack because all others need as input
|
68 |
* a RGB data buffer
|
69 |
* @return
|
70 |
*/
|
71 |
public boolean isToConvertToRGB(); |
72 |
|
73 |
/**
|
74 |
* Par?metros pasados al filtro en forma de nombre de par?metro y objeto que
|
75 |
* representa al par?metro. Este puede ser cualquier tipo de variable u objeto.
|
76 |
*
|
77 |
* Par?metros obligatorios:
|
78 |
* inRaster (IRaster)
|
79 |
* par?metros obligatorios (si se da el caso)
|
80 |
* previousFilter (IRasterFilter)
|
81 |
*
|
82 |
* @param name
|
83 |
* @param value
|
84 |
*/
|
85 |
public void addParam(String name, Object value); |
86 |
|
87 |
/**
|
88 |
* Devuelve los resultados despues de la ejecuci?n del filtro.
|
89 |
* @param name
|
90 |
* @return
|
91 |
*/
|
92 |
public Object getResult(String name); |
93 |
|
94 |
/**
|
95 |
* Obtiene el tipo de datos de entrada al filtro
|
96 |
* @return Tipo de dato
|
97 |
*/
|
98 |
public int getInRasterDataType(); |
99 |
|
100 |
/**
|
101 |
* Obtiene el tipo de datos de salida del filtro
|
102 |
* @return Tipo de dato
|
103 |
*/
|
104 |
public int getOutRasterDataType(); |
105 |
|
106 |
/**
|
107 |
* Obtiene el grupo del filtro
|
108 |
* @return
|
109 |
*/
|
110 |
public String getGroup(); |
111 |
|
112 |
/**
|
113 |
* Devuelve el nombre interno del filtro
|
114 |
* @return the fName
|
115 |
*/
|
116 |
public String getName(); |
117 |
|
118 |
/**
|
119 |
* @param name the fName to set
|
120 |
*/
|
121 |
public void setName(String name); |
122 |
|
123 |
/**
|
124 |
* Obtiene el TreeMap con los par?metros del entorno
|
125 |
* @return TreeMap
|
126 |
*/
|
127 |
public TreeMap<String, Object> getEnv(); |
128 |
|
129 |
/**
|
130 |
* Asigna el TreeMap con los par?metros del entorno
|
131 |
* @param env
|
132 |
*/
|
133 |
public void setEnv(TreeMap<String, Object> env); |
134 |
|
135 |
/**
|
136 |
* Obtiene un par?metro a partir de la clave
|
137 |
* @param name Par?metro
|
138 |
* @return Par?metro
|
139 |
*/
|
140 |
public Object getParam(String name); |
141 |
|
142 |
/**
|
143 |
* Gets the param list
|
144 |
* @return
|
145 |
*/
|
146 |
public Hashtable<String, Object> getParams(); |
147 |
|
148 |
/**
|
149 |
* Gets the param list
|
150 |
* @param params
|
151 |
*/
|
152 |
public void setParams(Hashtable<String, Object> params); |
153 |
|
154 |
/**
|
155 |
* Devolver? un booleano indicando si es visible o no en el panel de filtros.
|
156 |
* @return
|
157 |
*/
|
158 |
public boolean isVisible(); |
159 |
|
160 |
/**
|
161 |
* Obtener que datos puede tratar una interfaz con sus valores
|
162 |
* @param nameFilter. Cada tipo de filtro puede tener parametros distintos
|
163 |
* @return
|
164 |
*/
|
165 |
public Params getUIParams(String nameFilter); |
166 |
|
167 |
/**
|
168 |
* Gets the list of specific filter names. Each kind of filter can have a list
|
169 |
* of specific types. This function returns the names of this filters
|
170 |
* @return
|
171 |
*/
|
172 |
public String[] getNames(); |
173 |
|
174 |
/**
|
175 |
* Gets the manager name
|
176 |
* @return
|
177 |
*/
|
178 |
public String getManagerName(); |
179 |
} |