Revision 1426 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/enhancement/EnhancementStretchListManager.java
EnhancementStretchListManager.java | ||
---|---|---|
22 | 22 |
package org.gvsig.raster.impl.grid.filter.enhancement; |
23 | 23 |
|
24 | 24 |
import java.util.ArrayList; |
25 |
import java.util.List; |
|
25 | 26 |
|
26 | 27 |
import org.gvsig.fmap.dal.coverage.RasterLibrary; |
27 | 28 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
... | ... | |
69 | 70 |
stats = (Statistics)filterList.getEnvParam("IStatistics"); |
70 | 71 |
} |
71 | 72 |
|
72 |
/* |
|
73 |
* (non-Javadoc) |
|
74 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#containsFilter(java.lang.String) |
|
75 |
*/ |
|
76 |
@SuppressWarnings("unchecked") |
|
77 |
public Class getFilterClassByID(String id) { |
|
73 |
public Class<?> getFilterClassByID(String id) { |
|
78 | 74 |
if(id.compareTo("enhanced_stretch") == 0) |
79 | 75 |
return LinearStretchEnhancementFilter.class; |
80 | 76 |
return null; |
... | ... | |
267 | 263 |
* @param band |
268 | 264 |
* @param stretch |
269 | 265 |
*/ |
270 |
@SuppressWarnings("unchecked") |
|
271 |
private void putStretchBand(ArrayList filterList, String band, DefaultStretch stretch) { |
|
266 |
private void putStretchBand(List<String> filterList, String band, DefaultStretch stretch) { |
|
272 | 267 |
filterList.add("filter.linearstretchenhancement." + band + ".maxValue=" + stretch.maxValue); |
273 | 268 |
filterList.add("filter.linearstretchenhancement." + band + ".minValue=" + stretch.minValue); |
274 | 269 |
if (stretch.offset != null) |
... | ... | |
291 | 286 |
* Obtiene un Array de Strings a partir de una pila de filtros. Cada elemento |
292 | 287 |
* del array tendr� la forma de elemento=valor. |
293 | 288 |
*/ |
294 |
@SuppressWarnings("unchecked") |
|
295 |
public ArrayList getStringsFromFilterList(ArrayList filterList, RasterFilter rf) { |
|
289 |
public List<String> getStringsFromFilterList(List<String> filterList, RasterFilter rf) { |
|
296 | 290 |
if (rf instanceof LinearStretchEnhancementFilter) { |
297 | 291 |
LinearStretchEnhancementFilter filter = (LinearStretchEnhancementFilter) rf; |
298 | 292 |
DefaultLinearStretchParams stretchs = (DefaultLinearStretchParams) filter.getParam("stretchs"); |
... | ... | |
379 | 373 |
* (non-Javadoc) |
380 | 374 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#createFilterListFromStrings(java.util.ArrayList, java.lang.String, int) |
381 | 375 |
*/ |
382 |
@SuppressWarnings("unchecked") |
|
383 |
public int createFilterListFromStrings(ArrayList filters, String fil, int filteri) throws FilterTypeException { |
|
376 |
public int createFilterListFromStrings(List<String> filters, String fil, int filteri) throws FilterTypeException { |
|
384 | 377 |
String pkgBase = "filter.linearstretchenhancement."; |
385 | 378 |
if (fil.startsWith(pkgBase + "active")) { |
386 | 379 |
boolean exec = true; |
... | ... | |
429 | 422 |
return filteri; |
430 | 423 |
} |
431 | 424 |
|
432 |
/* |
|
433 |
* (non-Javadoc) |
|
434 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#getRasterFilterList() |
|
435 |
*/ |
|
436 |
@SuppressWarnings("unchecked") |
|
437 |
public ArrayList getRasterFilterList() { |
|
438 |
ArrayList filters = new ArrayList(); |
|
425 |
public List<Class<?>> getRasterFilterList() { |
|
426 |
List<Class<?>> filters = new ArrayList<Class<?>>(); |
|
439 | 427 |
filters.add(LinearStretchEnhancementFilter.class); |
440 | 428 |
return filters; |
441 | 429 |
} |
442 | 430 |
|
443 |
/* |
|
444 |
* (non-Javadoc) |
|
445 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#addFilter(java.lang.Class, org.gvsig.raster.dataset.Params) |
|
446 |
*/ |
|
447 |
@SuppressWarnings("unchecked") |
|
448 |
public void addFilter(Class classFilter, Params params) throws FilterTypeException { |
|
431 |
public void addFilter(Class<?> classFilter, Params params) throws FilterTypeException { |
|
449 | 432 |
if (LinearStretchEnhancementFilter.class.isAssignableFrom(classFilter)) { |
450 | 433 |
int[] renderBands = { 0, 1, 2 }; |
451 | 434 |
boolean removeEnds = false; |
Also available in: Unified diff