Revision 5497 trunk/extensions/extRasterTools/src/org/gvsig/rasterTools/brightnessContrast/filter/BrightnessContrastStackManager.java

View differences:

BrightnessContrastStackManager.java
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

  
1 20
package org.gvsig.rasterTools.brightnessContrast.filter;
2 21

  
3 22
import java.util.ArrayList;
4 23

  
5 24
import org.cresques.io.GeoRasterFile;
6 25
import org.cresques.io.raster.IStackManager;
7
import org.cresques.io.raster.LinearEnhancementFilter;
8
import org.cresques.io.raster.LinearEnhancementImageFilter;
9
import org.cresques.io.raster.LinearEnhancementShortFilter;
10 26
import org.cresques.io.raster.RasterBuf;
11 27
import org.cresques.io.raster.RasterFilter;
12 28
import org.cresques.io.raster.RasterFilterStack;
13 29
import org.cresques.io.raster.RasterFilterStackManager;
14
import org.gvsig.rasterTools.histogram.filter.HistogramFilter;
15
import org.gvsig.rasterTools.histogram.filter.HistogramImageFilter;
16 30

  
17 31
/**
18 32
 * Gestor de la pila de filtros para el filtro de brillo.
......
167 181
	public int createStackFromStrings(ArrayList filters, String fil, GeoRasterFile[] grfList, int filteri) {
168 182
		this.grfList = grfList;
169 183

  
170
			if((fil.startsWith("filter.brightContHist.active"))&&
184
			if((fil.startsWith("filter.brightCont.active"))&&
171 185
					(RasterFilterStackManager.getValue(fil).equals("true"))){
172 186
				
173 187
				int incrBrillo = 0;
......
188 202
						prop--;
189 203
					}
190 204
				}
191
				addHistogramFilter();
192 205
				addBrightnessFilter(incrBrillo);
193 206
				addContrastFilter(incrContraste);	
194 207
			}
......
209 222
		
210 223
		
211 224
		if((rf instanceof BrightnessFilter) || 
212
			(rf instanceof ContrastFilter) ||
213
			(rf instanceof HistogramFilter)){
214
			filterList.add("filter.brightContHist.active=true");
225
			(rf instanceof ContrastFilter)){
226
			filterList.add("filter.brightCont.active=true");
215 227
		}
216 228
		
217 229
		if(rf instanceof BrightnessFilter){

Also available in: Unified diff