svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libRaster / src / org / gvsig / raster / grid / filter / enhancement / EnhancementStretchListManager.java @ 29786
History | View | Annotate | Download (18.7 KB)
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2006 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 |
package org.gvsig.raster.grid.filter.enhancement; |
20 |
|
21 |
import java.util.ArrayList; |
22 |
|
23 |
import org.gvsig.raster.dataset.FileNotOpenException; |
24 |
import org.gvsig.raster.dataset.Params; |
25 |
import org.gvsig.raster.dataset.RasterDriverException; |
26 |
import org.gvsig.raster.grid.filter.FilterTypeException; |
27 |
import org.gvsig.raster.grid.filter.IRasterFilterListManager; |
28 |
import org.gvsig.raster.grid.filter.RasterFilter; |
29 |
import org.gvsig.raster.grid.filter.RasterFilterList; |
30 |
import org.gvsig.raster.grid.filter.RasterFilterListManager; |
31 |
import org.gvsig.raster.grid.filter.enhancement.LinearStretchParams.Stretch; |
32 |
import org.gvsig.raster.grid.filter.statistics.StatisticsListManager; |
33 |
import org.gvsig.raster.hierarchy.IStatistics; |
34 |
import org.gvsig.tools.ToolsLocator; |
35 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
36 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
37 |
/**
|
38 |
* Gestor de la pila de filtros para el filtro de realce por intervalos.
|
39 |
*
|
40 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
41 |
*/
|
42 |
public class EnhancementStretchListManager implements IRasterFilterListManager { |
43 |
protected RasterFilterList filterList = null; |
44 |
private RasterFilterListManager filterListManager = null; |
45 |
private IStatistics stats = null; |
46 |
|
47 |
/**
|
48 |
* Constructor
|
49 |
* @param filterListManager
|
50 |
*/
|
51 |
public EnhancementStretchListManager(RasterFilterListManager filterListManager) {
|
52 |
this.filterListManager = filterListManager;
|
53 |
this.filterList = filterListManager.getFilterList();
|
54 |
stats = (IStatistics)filterList.getEnvParam("IStatistics");
|
55 |
} |
56 |
|
57 |
/**
|
58 |
* Asigna el objeto con las estadisticas.
|
59 |
* @param stats
|
60 |
*/
|
61 |
public void setStatistics(IStatistics stats) { |
62 |
this.stats = stats;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
* Registra EnhancementStretchListManager en los puntos de extension de RasterFilter
|
67 |
*/
|
68 |
public static void register() { |
69 |
ExtensionPointManager extensionPoints =ToolsLocator.getExtensionPointManager(); |
70 |
ExtensionPoint point=extensionPoints.get("RasterFilter");
|
71 |
point.append("EnhancementStretch", "", EnhancementStretchListManager.class); |
72 |
} |
73 |
|
74 |
/**
|
75 |
* A�ade un filtro de realce.
|
76 |
* La forma de inserci�n del filtro es fija ya que la inserci�n de un realce lleva implicita
|
77 |
* la inserci�n de un filtro de recorte de colas (tailtrim), aunque no en todos los casos.
|
78 |
* Si ya existe un filtro de realce en la lista se obtiene la posici�n de este.
|
79 |
* Si es necesario un recorte de colas entonces se comprueba si existe un uno reemplazandose
|
80 |
* por el nuevo y sino se insertar� uno. Al final reemplazamos el realce que existia.
|
81 |
*
|
82 |
* Si por el contrario no existen realce ni trim se a�aden ambos al final de la lista.
|
83 |
* @param stats Objeto de estadisticas asociado
|
84 |
* @param tailTrim porcentaje de recorte de colas. Ser� un valor entre 0 y 1.
|
85 |
* @param insertionMode Modo de inserci�n
|
86 |
* @param renderBands bandas RGB mostradas en la visualizaci�n.
|
87 |
* @throws FilterTypeException
|
88 |
*/
|
89 |
public void addEnhancedStretchFilter(LinearStretchParams leParams, IStatistics stats, int[] renderBands, boolean removeEnds) throws FilterTypeException { |
90 |
try {
|
91 |
if (!leParams.hasTailTrim()) { // En este caso siempre es necesario el m�ximo y |
92 |
// m�nimo
|
93 |
if (!stats.isCalculated())
|
94 |
try {
|
95 |
stats.calcFullStatistics(); |
96 |
} catch (FileNotOpenException e) {
|
97 |
// No podemos aplicar el filtro
|
98 |
return;
|
99 |
} catch (RasterDriverException e) {
|
100 |
// No podemos aplicar el filtro
|
101 |
return;
|
102 |
} |
103 |
} else {
|
104 |
StatisticsListManager slm = new StatisticsListManager(filterListManager, stats);
|
105 |
slm.addTailFilter(leParams.getTailTrimList(), 0D, removeEnds, stats);
|
106 |
} |
107 |
|
108 |
RasterFilter filter = createEnhancedFilter(leParams, stats, renderBands, removeEnds); |
109 |
if (filter != null) |
110 |
filterList.add(filter); |
111 |
} catch (InterruptedException e) { |
112 |
//Si se ha interrumpido no a�adimos el filtro
|
113 |
} |
114 |
} |
115 |
|
116 |
/**
|
117 |
* Crea un filtro de realce por tramos de forma est�tica
|
118 |
* @param leParams Par�metros del filtro
|
119 |
* @param stats
|
120 |
* @param renderBands
|
121 |
* @return
|
122 |
*/
|
123 |
public static RasterFilter createEnhancedFilter(LinearStretchParams leParams, IStatistics stats, int[] renderBands, boolean removeEnds) { |
124 |
RasterFilter filter = new LinearStretchEnhancementFloatFilter();
|
125 |
if (filter != null) { |
126 |
filter.addParam("stats", stats);
|
127 |
filter.addParam("remove", new Boolean(false)); |
128 |
filter.addParam("renderBands", renderBands);
|
129 |
filter.addParam("stretchs", leParams);
|
130 |
filter.addParam("remove", new Boolean(removeEnds)); |
131 |
} |
132 |
|
133 |
return filter;
|
134 |
} |
135 |
|
136 |
/**
|
137 |
* Convierte un array de dobles a una cadena
|
138 |
* @param values
|
139 |
* @return
|
140 |
*/
|
141 |
private String convertArrayToString(double[] values) { |
142 |
StringBuffer buffer = new StringBuffer(); |
143 |
for (int i = 0; i < values.length; i++) { |
144 |
buffer.append(values[i]); |
145 |
if (i < (values.length - 1)) |
146 |
buffer.append(",");
|
147 |
} |
148 |
return buffer.toString();
|
149 |
} |
150 |
|
151 |
/**
|
152 |
* Convierte una array de enteros a una cadena
|
153 |
* @param values
|
154 |
* @return
|
155 |
*/
|
156 |
private String convertArrayToString(int[] values) { |
157 |
StringBuffer buffer = new StringBuffer(); |
158 |
for (int i = 0; i < values.length; i++) { |
159 |
buffer.append(values[i]); |
160 |
if (i < (values.length - 1)) |
161 |
buffer.append(",");
|
162 |
} |
163 |
return buffer.toString();
|
164 |
} |
165 |
|
166 |
/**
|
167 |
* Convierte una cadena a un array de enteros
|
168 |
* @param from
|
169 |
* @return
|
170 |
*/
|
171 |
private int[] StringToIntegerArray(String from) { |
172 |
String[] valueList = from.split(","); |
173 |
int[] values = new int[valueList.length]; |
174 |
for (int i = 0; i < values.length; i++) |
175 |
try {
|
176 |
values[i] = Integer.parseInt(valueList[i]);
|
177 |
} catch (NumberFormatException e) { |
178 |
} |
179 |
return values;
|
180 |
} |
181 |
|
182 |
/**
|
183 |
* Convierte una cadena a un array de dobles
|
184 |
* @param from
|
185 |
* @return
|
186 |
*/
|
187 |
private double[] StringToDoubleArray(String from) { |
188 |
String[] valueList = from.split(","); |
189 |
double[] values = new double[valueList.length]; |
190 |
for (int i = 0; i < values.length; i++) |
191 |
try {
|
192 |
values[i] = Double.parseDouble(valueList[i]);
|
193 |
} catch (NumberFormatException e) { |
194 |
} |
195 |
return values;
|
196 |
} |
197 |
|
198 |
/**
|
199 |
* Guarda en el array de valores, todos los valores del objeto Strech para ser
|
200 |
* almacenado en el
|
201 |
* @param filterList
|
202 |
* @param band
|
203 |
* @param stretch
|
204 |
*/
|
205 |
private void putStretchBand(ArrayList filterList, String band, Stretch stretch) { |
206 |
filterList.add("filter.linearstretchenhancement." + band + ".maxValue=" + stretch.maxValue); |
207 |
filterList.add("filter.linearstretchenhancement." + band + ".minValue=" + stretch.minValue); |
208 |
if (stretch.offset != null) |
209 |
filterList.add("filter.linearstretchenhancement." + band + ".offset=" + convertArrayToString(stretch.offset)); |
210 |
if (stretch.scale != null) |
211 |
filterList.add("filter.linearstretchenhancement." + band + ".scale=" + convertArrayToString(stretch.scale)); |
212 |
if (stretch.stretchIn != null) |
213 |
filterList.add("filter.linearstretchenhancement." + band + ".stretchIn=" + convertArrayToString(stretch.stretchIn)); |
214 |
if (stretch.stretchOut != null) |
215 |
filterList.add("filter.linearstretchenhancement." + band + ".stretchOut=" + convertArrayToString(stretch.stretchOut)); |
216 |
filterList.add("filter.linearstretchenhancement." + band + ".tailTrimMax=" + stretch.tailTrimMax); |
217 |
filterList.add("filter.linearstretchenhancement." + band + ".tailTrimMin=" + stretch.tailTrimMin); |
218 |
filterList.add("filter.linearstretchenhancement." + band + ".tailTrimValueMax=" + stretch.tailTrimValueMax); |
219 |
filterList.add("filter.linearstretchenhancement." + band + ".tailTrimValueMin=" + stretch.tailTrimValueMin); |
220 |
filterList.add("filter.linearstretchenhancement." + band + ".functionType=" + stretch.functionType); |
221 |
filterList.add("filter.linearstretchenhancement." + band + ".valueFunction=" + stretch.valueFunction); |
222 |
} |
223 |
|
224 |
/**
|
225 |
* Obtiene un Array de Strings a partir de una pila de filtros. Cada elemento
|
226 |
* del array tendr� la forma de elemento=valor.
|
227 |
*/
|
228 |
public ArrayList getStringsFromFilterList(ArrayList filterList, RasterFilter rf) { |
229 |
if (rf instanceof LinearStretchEnhancementFilter) { |
230 |
LinearStretchEnhancementFilter filter = (LinearStretchEnhancementFilter) rf; |
231 |
LinearStretchParams stretchs = (LinearStretchParams) filter.getParam("stretchs");
|
232 |
int [] renderBands = (int[]) filter.getParam("renderBands"); |
233 |
|
234 |
filterList.add("filter.linearstretchenhancement.active=true");
|
235 |
filterList.add("filter.linearstretchenhancement.removeends=" + filter.getRemoveEnds());
|
236 |
putStretchBand(filterList, "red", stretchs.red);
|
237 |
putStretchBand(filterList, "green", stretchs.green);
|
238 |
putStretchBand(filterList, "blue", stretchs.blue);
|
239 |
filterList.add("filter.linearstretchenhancement.renderbands=" + convertArrayToString(renderBands));
|
240 |
filterList.add("filter.linearstretchenhancement.RGB=" + Boolean.valueOf(stretchs.rgb).toString()); |
241 |
} |
242 |
|
243 |
return filterList;
|
244 |
} |
245 |
|
246 |
/**
|
247 |
* Configura algun parametro del objeto Stretch, respecto a una banda, su
|
248 |
* propiedad y el valor, en caso de no encontrar la propiedad o no ser dicha
|
249 |
* banda, devuelve false. Es util para usarlo para extraer los valores de
|
250 |
* createFilterListFromStrings
|
251 |
* @param band
|
252 |
* @param property
|
253 |
* @param value
|
254 |
* @param stretch
|
255 |
* @return
|
256 |
*/
|
257 |
public boolean getStretchBand(String band, String property, String value, Stretch stretch) { |
258 |
if (property.startsWith("filter.linearstretchenhancement." + band)) { |
259 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".maxValue")) { |
260 |
stretch.maxValue = Double.parseDouble(value);
|
261 |
return true; |
262 |
} |
263 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".minValue")) { |
264 |
stretch.minValue = Double.parseDouble(value);
|
265 |
return true; |
266 |
} |
267 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".offset")) { |
268 |
stretch.offset = StringToDoubleArray(value); |
269 |
return true; |
270 |
} |
271 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".scale")) { |
272 |
stretch.scale = StringToDoubleArray(value); |
273 |
return true; |
274 |
} |
275 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".stretchIn")) { |
276 |
stretch.stretchIn = StringToDoubleArray(value); |
277 |
return true; |
278 |
} |
279 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".stretchOut")) { |
280 |
stretch.stretchOut = StringToIntegerArray(value); |
281 |
return true; |
282 |
} |
283 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".tailTrimMax")) { |
284 |
stretch.tailTrimMax = Double.parseDouble(value);
|
285 |
return true; |
286 |
} |
287 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".tailTrimMin")) { |
288 |
stretch.tailTrimMin = Double.parseDouble(value);
|
289 |
return true; |
290 |
} |
291 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".tailTrimValueMax")) { |
292 |
stretch.tailTrimValueMax = Double.parseDouble(value);
|
293 |
return true; |
294 |
} |
295 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".tailTrimValueMin")) { |
296 |
stretch.tailTrimValueMin = Double.parseDouble(value);
|
297 |
return true; |
298 |
} |
299 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".functionType")) { |
300 |
stretch.functionType = Integer.parseInt(value);
|
301 |
return true; |
302 |
} |
303 |
if (property.startsWith("filter.linearstretchenhancement." + band + ".valueFunction")) { |
304 |
stretch.valueFunction = Double.parseDouble(value);
|
305 |
return true; |
306 |
} |
307 |
} |
308 |
return false; |
309 |
} |
310 |
|
311 |
/*
|
312 |
* (non-Javadoc)
|
313 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#createFilterListFromStrings(java.util.ArrayList, java.lang.String, int)
|
314 |
*/
|
315 |
public int createFilterListFromStrings(ArrayList filters, String fil, int filteri) throws FilterTypeException { |
316 |
String pkgBase = "filter.linearstretchenhancement."; |
317 |
if (fil.startsWith(pkgBase + "active")) { |
318 |
boolean exec = true; |
319 |
boolean removeEnds = false; |
320 |
if ((RasterFilterListManager.getValue(fil).equals("false"))) |
321 |
exec = false;
|
322 |
filters.remove(0);
|
323 |
int[] renderBands = new int[] { 0, 0, 0 }; |
324 |
LinearStretchParams stretchParams = new LinearStretchParams();
|
325 |
|
326 |
for (int propFilter = 0; propFilter < filters.size(); propFilter++) { |
327 |
String elem = (String) filters.get(propFilter); |
328 |
String value = RasterFilterListManager.getValue(elem);
|
329 |
|
330 |
if (elem.startsWith("filter.linearstretchenhancement.renderbands")) { |
331 |
renderBands = StringToIntegerArray(value); |
332 |
continue;
|
333 |
} |
334 |
|
335 |
if (elem.startsWith("filter.linearstretchenhancement.RGB")) { |
336 |
stretchParams.rgb = Boolean.parseBoolean(value);
|
337 |
continue;
|
338 |
} |
339 |
|
340 |
if (elem
|
341 |
.startsWith("filter.linearstretchenhancement.removeends")) {
|
342 |
removeEnds = Boolean.parseBoolean(value);
|
343 |
continue;
|
344 |
} |
345 |
|
346 |
if (getStretchBand("red", elem, value, stretchParams.red)) |
347 |
continue;
|
348 |
if (getStretchBand("green", elem, value, stretchParams.green)) |
349 |
continue;
|
350 |
if (getStretchBand("blue", elem, value, stretchParams.blue)) |
351 |
continue;
|
352 |
} |
353 |
|
354 |
filterList.remove(LinearStretchEnhancementFilter.class); |
355 |
addEnhancedStretchFilter(stretchParams, stats, renderBands, |
356 |
removeEnds); |
357 |
|
358 |
LinearStretchEnhancementFilter lsef = (LinearStretchEnhancementFilter) filterList.getFilterByBaseClass(LinearStretchEnhancementFilter.class); |
359 |
lsef.setExec(exec); |
360 |
} |
361 |
return filteri;
|
362 |
} |
363 |
|
364 |
/*
|
365 |
* (non-Javadoc)
|
366 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#getRasterFilterList()
|
367 |
*/
|
368 |
public ArrayList getRasterFilterList() { |
369 |
ArrayList filters = new ArrayList(); |
370 |
filters.add(LinearStretchEnhancementFilter.class); |
371 |
return filters;
|
372 |
} |
373 |
|
374 |
/*
|
375 |
* (non-Javadoc)
|
376 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#addFilter(java.lang.Class, org.gvsig.raster.dataset.Params)
|
377 |
*/
|
378 |
public void addFilter(Class classFilter, Params params) throws FilterTypeException { |
379 |
if (classFilter.equals(LinearStretchEnhancementFilter.class)) {
|
380 |
int[] renderBands = { 0, 1, 2 }; |
381 |
boolean removeEnds = false; |
382 |
|
383 |
LinearStretchParams leParams = new LinearStretchParams();
|
384 |
|
385 |
for (int i = 0; i < params.getNumParams(); i++) { |
386 |
if (params.getParam(i).id.equals("RenderBands") && |
387 |
params.getParam(i).defaultValue instanceof String) { |
388 |
String[] bands = new String((String) params.getParam(i).defaultValue).split(" "); |
389 |
renderBands[0] = new Integer(bands[0]).intValue(); |
390 |
renderBands[1] = new Integer(bands[1]).intValue(); |
391 |
renderBands[2] = new Integer(bands[2]).intValue(); |
392 |
continue;
|
393 |
} |
394 |
|
395 |
if (params.getParam(i).id.equals("Remove")) |
396 |
removeEnds = ((Boolean) params.getParam(i).defaultValue).booleanValue();
|
397 |
|
398 |
if (params.getParam(i).id.equals("RGB")) |
399 |
leParams.rgb = ((Boolean) params.getParam(i).defaultValue).booleanValue();
|
400 |
|
401 |
if (params.getParam(i).id.equals("StretchInRed") && |
402 |
params.getParam(i).defaultValue instanceof double[]) |
403 |
leParams.red.stretchIn = ((double[]) params.getParam(i).defaultValue); |
404 |
|
405 |
if (params.getParam(i).id.equals("StretchInGreen") && |
406 |
params.getParam(i).defaultValue instanceof double[]) |
407 |
leParams.green.stretchIn = ((double[]) params.getParam(i).defaultValue); |
408 |
|
409 |
if (params.getParam(i).id.equals("StretchInBlue") && |
410 |
params.getParam(i).defaultValue instanceof double[]) |
411 |
leParams.blue.stretchIn = ((double[]) params.getParam(i).defaultValue); |
412 |
|
413 |
if (params.getParam(i).id.equals("StretchOutRed") && |
414 |
params.getParam(i).defaultValue instanceof int[]) |
415 |
leParams.red.stretchOut = ((int[]) params.getParam(i).defaultValue); |
416 |
|
417 |
if (params.getParam(i).id.equals("StretchOutGreen") && |
418 |
params.getParam(i).defaultValue instanceof int[]) |
419 |
leParams.green.stretchOut = ((int[]) params.getParam(i).defaultValue); |
420 |
|
421 |
if (params.getParam(i).id.equals("StretchOutBlue") && |
422 |
params.getParam(i).defaultValue instanceof int[]) |
423 |
leParams.blue.stretchOut = ((int[]) params.getParam(i).defaultValue); |
424 |
|
425 |
if (params.getParam(i).id.equals("TailTrimRedMin") && |
426 |
params.getParam(i).defaultValue instanceof Double) |
427 |
leParams.red.tailTrimMin = ((Double) params.getParam(i).defaultValue).doubleValue();
|
428 |
|
429 |
if (params.getParam(i).id.equals("TailTrimRedMax") && |
430 |
params.getParam(i).defaultValue instanceof Double) |
431 |
leParams.red.tailTrimMax = ((Double) params.getParam(i).defaultValue).doubleValue();
|
432 |
|
433 |
if (params.getParam(i).id.equals("TailTrimGreenMin") && |
434 |
params.getParam(i).defaultValue instanceof Double) |
435 |
leParams.green.tailTrimMin = ((Double) params.getParam(i).defaultValue).doubleValue();
|
436 |
|
437 |
if (params.getParam(i).id.equals("TailTrimGreenMax") && |
438 |
params.getParam(i).defaultValue instanceof Double) |
439 |
leParams.green.tailTrimMax = ((Double) params.getParam(i).defaultValue).doubleValue();
|
440 |
|
441 |
if (params.getParam(i).id.equals("TailTrimBlueMin") && |
442 |
params.getParam(i).defaultValue instanceof Double) |
443 |
leParams.blue.tailTrimMin = ((Double) params.getParam(i).defaultValue).doubleValue();
|
444 |
|
445 |
if (params.getParam(i).id.equals("TailTrimBlueMax") && |
446 |
params.getParam(i).defaultValue instanceof Double) |
447 |
leParams.blue.tailTrimMax = ((Double) params.getParam(i).defaultValue).doubleValue();
|
448 |
|
449 |
if (params.getParam(i).id.equals("StretchRedFunctionType") && |
450 |
params.getParam(i).defaultValue instanceof Integer) |
451 |
leParams.red.functionType = ((Integer) params.getParam(i).defaultValue).intValue();
|
452 |
|
453 |
if (params.getParam(i).id.equals("StretchRedValueFunction") && |
454 |
params.getParam(i).defaultValue instanceof Double) |
455 |
leParams.red.valueFunction = ((Double) params.getParam(i).defaultValue).doubleValue();
|
456 |
|
457 |
if (params.getParam(i).id.equals("StretchGreenFunctionType") && |
458 |
params.getParam(i).defaultValue instanceof Integer) |
459 |
leParams.green.functionType = ((Integer) params.getParam(i).defaultValue).intValue();
|
460 |
|
461 |
if (params.getParam(i).id.equals("StretchGreenValueFunction") && |
462 |
params.getParam(i).defaultValue instanceof Double) |
463 |
leParams.green.valueFunction = ((Double) params.getParam(i).defaultValue).doubleValue();
|
464 |
|
465 |
if (params.getParam(i).id.equals("StretchBlueFunctionType") && |
466 |
params.getParam(i).defaultValue instanceof Integer) |
467 |
leParams.blue.functionType = ((Integer) params.getParam(i).defaultValue).intValue();
|
468 |
|
469 |
if (params.getParam(i).id.equals("StretchBlueValueFunction") && |
470 |
params.getParam(i).defaultValue instanceof Double) |
471 |
leParams.blue.valueFunction = ((Double) params.getParam(i).defaultValue).doubleValue();
|
472 |
} |
473 |
|
474 |
addEnhancedStretchFilter(leParams, (IStatistics) filterList.getEnvParam("IStatistics"), renderBands, removeEnds);
|
475 |
} |
476 |
} |
477 |
} |