Revision 20726 trunk/libraries/libRaster/src/org/gvsig/raster/grid/filter/enhancement/BrightnessFilter.java

View differences:

BrightnessFilter.java
23 23
import org.gvsig.raster.dataset.Params;
24 24
import org.gvsig.raster.grid.filter.RasterFilter;
25 25
/**
26
 * Clase basa para los filtros de brillo.
26
 * Clase base para los filtros de brillo.
27 27
 *
28 28
 * @version 31/05/2007
29 29
 * @author Miguel ?ngel Querol Carratal?  (miguelangel.querol@iver.es)
......
50 50
	 */
51 51
	public void pre() {
52 52
		exec = true;
53
		incrBrillo = ((Integer) params.get("incrBrillo")).intValue();
53 54
		raster = rasterResult;
54 55
		raster = (RasterBuffer) params.get("raster");
55
		height = raster.getHeight();
56
		width = raster.getWidth();
57
		incrBrillo = ((Integer) params.get("incrBrillo")).intValue();
58
		rasterResult = RasterBuffer.getBuffer(IBuffer.TYPE_BYTE, raster.getWidth(), raster.getHeight(), raster.getBandCount(), true);
56
		if (raster != null) {
57
			height = raster.getHeight();
58
			width = raster.getWidth();
59
			rasterResult = RasterBuffer.getBuffer(IBuffer.TYPE_BYTE, raster.getWidth(), raster.getHeight(), raster.getBandCount(), true);
60
		}
59 61
	}
60 62

  
61 63
	/*

Also available in: Unified diff