
Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java/org/gvsig/raster/roimask/algorithm
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskAlgorithmLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskAlgorithmLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskAlgorithmLibrary.java	(revision 15576)
@@ -0,0 +1,35 @@
+package org.gvsig.raster.roimask.algorithm;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Initialization of ROIMaskAlgorithmLibrary library.
+ */
+public class ROIMaskAlgorithmLibrary extends AbstractLibrary {
+	public static final String         PROCESS_LABEL   = "ROIMaskProcess";
+	
+    @Override
+    protected void doInitialize() throws LibraryException {
+        // Nothing to do
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+    	//Registers the process and its parameters
+    	RasterBaseAlgorithmLibrary.register(PROCESS_LABEL, ROIMaskProcess.class);
+    	ROIMaskProcess.registerParameters();
+    	
+        Messages.addResourceFamily(
+            "org.gvsig.raster.roimask.algorithm", 
+            ROIMaskAlgorithmLibrary.class.getClassLoader(), 
+            ROIMaskAlgorithmLibrary.class.getClass().getName());
+        //registerGeoProcess(new RasterReprojectAlgorithmLibrary());
+        
+        Messages.addResourceFamily("org.gvsig.raster.roimask.algorithm.i18n.text",
+        		ROIMaskAlgorithmLibrary.class.getClassLoader(),
+        		ROIMaskAlgorithmLibrary.class.getClass().getName()); 
+    }
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskAlgorithmLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskException.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskException.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskException.java	(revision 15576)
@@ -0,0 +1,19 @@
+package org.gvsig.raster.roimask.algorithm;
+
+import org.gvsig.raster.algorithm.process.ProcessException;
+
+
+/**
+ * This exception is thrown if happen problems processing data with this algorithm.
+ */
+public class ROIMaskException extends ProcessException {
+	private static final long serialVersionUID = -3022090543908771484L;
+	
+	public ROIMaskException(String msg){
+		super(msg);
+	}
+	
+	public ROIMaskException(String msg, Throwable e){
+		super(msg, e);
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskProcess.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskProcess.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskProcess.java	(revision 15576)
@@ -0,0 +1,322 @@
+package org.gvsig.raster.roimask.algorithm;
+
+import java.awt.geom.Rectangle2D;
+
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.dataset.BufferParam;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.datastruct.NoData;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.store.RasterQuery;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.roi.ROI;
+
+/**
+ * Process 
+ */
+public class ROIMaskProcess extends DataProcess {
+	public static String      RASTER_STORE1     = "RasterStore1";
+	public static String      BUFFER            = "Buffer";
+	public static String      PATH              = "Path";
+	public static String      FILENAME          = "FileName";
+	public static String      ROIS              = "Rois";
+	public static String      INVERSE           = "Inverse";
+	public static String      ALPHA             = "Alpha";
+	public static String      ALPHA_BAND        = "AlphaBand";
+	public static String      NODATA            = "NoData";
+	
+	private RasterDataStore   store             = null;
+	private String            filename          = null;
+	
+	private ROI[]             rois              = null;  
+	private boolean           inverse           = false;
+	private int               alpha             = 0;
+	private NoData            nodata            = null;
+	
+	private double            noDataResult      = 0;
+	
+	/**
+	 * This buffer is just to test
+	 */
+	private Buffer            bufferForTest     = null;
+	
+	public static void registerParameters() {
+		registerInputParameter(RASTER_STORE1, RasterDataStore.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(PATH, String.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(ROIS, ROI[].class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(INVERSE, Boolean.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(ALPHA, Integer.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(NODATA, NoData.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		
+		registerOutputParameter(FILENAME, String.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerOutputParameter(ALPHA_BAND, Buffer.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+		registerOutputParameter(BUFFER, Buffer.class, ROIMaskAlgorithmLibrary.PROCESS_LABEL);
+	}
+	
+	public void init() {
+		store = getParam(RASTER_STORE1) != null ? (RasterDataStore)getParam(RASTER_STORE1) : null;
+		filename = getStringParam(PATH);
+		inverse = getBooleanParam(INVERSE);
+		alpha = getIntParam(ALPHA);
+		
+		nodata = getParam(NODATA) != null ? (NoData)getParam(NODATA) : null;
+		rois = getParam(ROIS) != null ? (ROI[])getParam(ROIS) : null;
+		
+		switch (store.getDataType()[0]) {
+		case Buffer.TYPE_BYTE:
+			if(nodata.getValue() != null)
+				noDataResult = nodata.getValue().byteValue();
+			else
+				noDataResult = RasterLibrary.defaultByteNoDataValue;
+			break;
+		case Buffer.TYPE_SHORT:
+			if(nodata.getValue() != null)
+				noDataResult = nodata.getValue().shortValue();
+			else
+				noDataResult = RasterLibrary.defaultShortNoDataValue;			
+			break;
+		case Buffer.TYPE_INT:
+			if(nodata.getValue() != null)
+				noDataResult = nodata.getValue().intValue();
+			else
+				noDataResult = RasterLibrary.defaultIntegerNoDataValue;			
+			break;
+		case Buffer.TYPE_FLOAT:
+			if(nodata.getValue() != null)
+				noDataResult = nodata.getValue().floatValue();
+			else
+				noDataResult = RasterLibrary.defaultFloatNoDataValue;			
+			break;
+		case Buffer.TYPE_DOUBLE:
+			if(nodata.getValue() != null)
+				noDataResult = nodata.getValue().doubleValue();
+			else
+				noDataResult = RasterLibrary.defaultDoubleNoDataValue;			
+			break;
+		}
+	}
+
+	public void process() throws ProcessInterruptedException, ProcessException {
+		insertLineLog(Messages.getText("applying_mask"));
+		try {
+			if (store == null)
+				throw new ROIMaskException("Store not found");
+			
+			RasterQuery query = RasterLocator.getManager().createQuery();
+			
+			Extent windowExtent = getExtentResult(getOutputWindow(), null, store);
+			Rectangle2D sourcePxBBox = null;
+			if(isOutputRescaled()) {
+				sourcePxBBox = new Rectangle2D.Double(0, 0, getOutputWidth(), getOutputHeight());
+				query.setSupersamplingOption(true);
+			} else {
+				sourcePxBBox = getSourcePxBox(windowExtent, store);
+				query.setSupersamplingOption(false);
+			}
+			double cellSize = windowExtent.width() / sourcePxBBox.getWidth();
+			
+			if(isForPreviews()) {
+				query.setReadOnly(false);
+				query.forceRGBRequest();
+				query.setDrawableBands(store.getRender().getRenderColorInterpretation().buildRenderBands());
+			} else {
+				query.setAllDrawableBands();
+				query.setReadOnly(true);
+			}
+			
+			int w = (int)sourcePxBBox.getWidth();
+			int h = (int)sourcePxBBox.getHeight();
+			
+			query.setAreaOfInterest(windowExtent, w, h);
+			Buffer sourceBuffer = null;
+			try {
+				sourceBuffer = store.query(query);
+				sourceBuffer.setDataExtent(windowExtent.toRectangle2D());
+			} catch (QueryException e) {
+				throw new ROIMaskException("Error reading data", e);
+			} 
+
+			bufferForTest = sourceBuffer;
+			ColorInterpretation ci = store.getColorInterpretation();
+			int ouputAlphaBandNumber = -1;
+			
+			if(rois != null && rois.length > 0) {
+				nodata.setNoDataTransparent(false);
+				if(ci.isRGBA()) {
+					bufferForTest = processRGB(windowExtent, sourceBuffer, w, h, cellSize, ci.getAlphaBand());
+					ouputAlphaBandNumber = bufferForTest.getBandCount() - 1;
+					ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(ColorInterpretation.ARGB);
+				} else if(ci.isRGB()) {
+					bufferForTest = processRGB(windowExtent, sourceBuffer, w, h, cellSize, -1);
+					ouputAlphaBandNumber = bufferForTest.getBandCount() - 1;
+					ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(ColorInterpretation.ARGB);
+				} else {
+					bufferForTest = processMDT(windowExtent, sourceBuffer, cellSize);
+					ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(ColorInterpretation.GRAYSCALE);
+				}
+			} 
+			
+			if(!isForPreviews()) {
+				super.exportRaster(filename, 
+						bufferForTest, 
+						ci,
+						windowExtent,
+						nodata,
+						store.getProjection());
+				addOutputValue(FILENAME, filename);
+			} else {
+				addOutputValue(BUFFER, bufferForTest);
+			}
+				
+			addOutputValue(ALPHA_BAND, ouputAlphaBandNumber);
+		} catch (ROIMaskException e) {
+			if (incrementableTask != null)
+				incrementableTask.processFinalize();
+			messageBoxError("Error in mask process", this, e);
+		}
+	}
+	
+	private Buffer processRGB(Extent extent, Buffer sourceBuffer, int w, int h, double cellsize, int inputAlphaBandNumber) throws ProcessInterruptedException, ProcessException {
+		BufferParam params = RasterLocator.getManager().getBufferFactory().createBufferParams(
+				w, h, 4, store.getDataType()[0], true);
+		Buffer outputBuffer = null;
+		try {
+			outputBuffer = RasterLocator.getManager().getBufferFactory().createBuffer(params);
+		} catch (Exception e) {
+			throw new ProcessException("Error creating buffer", e);
+		} 
+
+		for (int row = 0; row < h; row++) {
+			for (int col = 0; col < w; col++) {
+				double wcX = extent.minX() + ((((double) col) * extent.width()) / ((double) w));
+				double wcY = extent.minY() + ((((double) (h - (row))) * extent.height()) / ((double) h));
+				
+				for (int iBand = 0; iBand < 3; iBand++) {
+					outputBuffer.setElem(row, col, iBand, sourceBuffer.getElemByte(row, col, iBand));
+				}
+				
+				boolean insideRoi = false;
+				for (int i = 0; i < rois.length; i++) {
+					if (((ROI) rois[i]).isInside(wcX, wcY, cellsize, cellsize)) {
+						if (inverse) {
+							if(inputAlphaBandNumber != -1)
+								outputBuffer.setElem(row, col, 3, sourceBuffer.getElemByte(row, col, inputAlphaBandNumber));
+							else
+								outputBuffer.setElem(row, col, 3, (byte) 255);
+						} else {
+							outputBuffer.setElem(row, col, 3, (byte) (255 - alpha));
+						}
+						insideRoi = true;
+					}
+				}
+
+				if(!insideRoi) {
+					if (inverse) {
+						outputBuffer.setElem(row, col, 3, (byte) (255 - alpha));
+					} else {
+						if(inputAlphaBandNumber != -1)
+							outputBuffer.setElem(row, col, 3, sourceBuffer.getElemByte(row, col, inputAlphaBandNumber));
+						else
+							outputBuffer.setElem(row, col, 3, (byte) 255);
+					}
+				}
+			}
+			updatePercent(row, h);
+		}
+		return outputBuffer;
+	}
+	
+	private Buffer processMDT(Extent extent, Buffer inputBuffer, double cellsize) throws ProcessInterruptedException, ProcessException {
+		int w = inputBuffer.getWidth();
+		int h = inputBuffer.getHeight();
+		Buffer outputBuffer = null;
+		
+		BufferParam params = RasterLocator.getManager().getBufferFactory().createBufferParams(
+				w, h, inputBuffer.getBandCount(), inputBuffer.getDataType(), true);
+		try {
+			outputBuffer = RasterLocator.getManager().getBufferFactory().createBuffer(params);
+		} catch (Exception e) {
+			throw new ProcessException("Error creating buffer", e);
+		} 
+		
+		for (int row = 0; row < h; row++) {
+			for (int col = 0; col < w; col++) {
+				for (int nband = 0; nband < inputBuffer.getBandCount(); nband++) {
+					double wcX = extent.minX() + ((((double) col) * extent.width()) / ((double) w));
+					double wcY = extent.minY() + ((((double) (h - (row))) * extent.height()) / ((double) h));
+					boolean insideRoi = false;
+					for (int i = 0; i < rois.length; i++) {
+						if (((ROI) rois[i]).isInside(wcX, wcY, cellsize, cellsize)) {
+							if (inverse)
+								 writePixel(inputBuffer, outputBuffer, col, row, nband);
+							else
+								writeNoData(outputBuffer, col, row, nband);
+							insideRoi = true;
+						}
+					}
+
+					if(!insideRoi) {
+						if (inverse)
+							writeNoData(outputBuffer, col, row, nband);
+						else {
+							writePixel(inputBuffer, outputBuffer, col, row, nband);
+						}
+					}
+				}
+			}
+			updatePercent(row, h);
+		}
+		return outputBuffer;
+	}
+	
+	private void writePixel(Buffer inputBuffer, Buffer outputBuffer, int col, int row, int nband) {
+		switch (inputBuffer.getDataType()) {
+		case Buffer.TYPE_BYTE:
+			outputBuffer.setElem(row, col, nband, inputBuffer.getElemByte(row, col, nband));
+			break;
+		case Buffer.TYPE_SHORT:
+			outputBuffer.setElem(row, col, nband, inputBuffer.getElemShort(row, col, nband));
+			break;
+		case Buffer.TYPE_INT:
+			outputBuffer.setElem(row, col, nband, inputBuffer.getElemInt(row, col, nband));
+			break;
+		case Buffer.TYPE_FLOAT:
+			outputBuffer.setElem(row, col, nband, inputBuffer.getElemFloat(row, col, nband));
+			break;
+		case Buffer.TYPE_DOUBLE:
+			outputBuffer.setElem(row, col, nband, inputBuffer.getElemDouble(row, col, nband));
+			break;
+		}
+	}
+	
+	private void writeNoData(Buffer outputBuffer, int col, int row, int nband) {
+		switch (outputBuffer.getDataType()) {
+		case Buffer.TYPE_BYTE:
+			outputBuffer.setElem(row, col, nband, (byte)noDataResult);
+			break;
+		case Buffer.TYPE_SHORT:
+			outputBuffer.setElem(row, col, nband, (short)noDataResult);
+			break;
+		case Buffer.TYPE_INT:
+			outputBuffer.setElem(row, col, nband, (int)noDataResult);
+			break;
+		case Buffer.TYPE_FLOAT:
+			outputBuffer.setElem(row, col, nband, (float)noDataResult);
+			break;
+		case Buffer.TYPE_DOUBLE:
+			outputBuffer.setElem(row, col, nband, (double)noDataResult);
+			break;
+		}
+	}
+	
+	public String getTitle() {
+		return Messages.getText("mask_process");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm/ROIMaskProcess.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask/algorithm
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/images/action
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/images/cursor
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/images
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_ca.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_pt.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_cs.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_fr.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_de.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_eu.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_it.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_zh.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_en.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_gl.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/algorithm
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources-plugin
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.algorithm.ROIMaskAlgorithmLibrary

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/pom.xml	(revision 15576)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.algorithm</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.algorithm</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask</artifactId>
+		<version>2.2.155</version>
+	</parent>
+    <dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.algorithm</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    <!--
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    -->
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.algorithm
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/pom.xml	(revision 15576)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.lib.api</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.lib.api</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask.lib</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+     </dependencies>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java/org/gvsig/raster/roimask/lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.lib.ROIMaskLibrary
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskService.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskService.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskService.java	(revision 15576)
@@ -0,0 +1,37 @@
+package org.gvsig.raster.roimask.lib;
+
+import java.util.Date;
+
+/**
+ * Represents a Raster element.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface ROIMaskService {
+
+    /**
+     * Returns the Raster's message.
+     * 
+     * @return the message associated to a TaskWithoutPreviewService
+     * @throws ROIMaskMessageException
+     *             if there is an error getting the Raster's message
+     */
+    public String getMessage() throws ROIMaskMessageException;
+
+    /**
+     * Returns the {@link ROIMaskManager}
+     * 
+     * @return {@link ROIMaskManager}
+     * @see {@link ROIMaskManager}
+     */
+    public ROIMaskManager getManager();
+
+    /**
+     * Returns the Raster's creation date.
+     * 
+     * @return the creation date associated to a TaskWithoutPreviewService
+     */
+    public Date getDate();
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskService.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLocator.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLocator.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLocator.java	(revision 15576)
@@ -0,0 +1,63 @@
+package org.gvsig.raster.roimask.lib;
+
+import org.gvsig.tools.locator.BaseLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * This locator is the entry point for the Raster library, providing
+ * access to all Raster services through the {@link ROIMaskManager}
+ * .
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskLocator extends BaseLocator {
+    public static final String                      MANAGER_NAME         = "ROIMask.manager";
+    public static final String                      MANAGER_DESCRIPTION  = "ROIMask Manager";
+    private static final String                     LOCATOR_NAME         = "ROIMask.locator";
+    private static final ROIMaskLocator  INSTANCE             = new ROIMaskLocator();
+
+    /**
+     * Return the singleton instance.
+     * 
+     * @return the singleton instance
+     */
+    public static ROIMaskLocator getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Return the Locator's name.
+     * 
+     * @return a String with the Locator's name
+     */
+    public final String getLocatorName() {
+        return LOCATOR_NAME;
+    }
+
+    /**
+     * Return a reference to the ROIMaskManager.
+     * 
+     * @return a reference to the ROIMaskManager
+     * @throws LocatorException
+     *             if there is no access to the class or the class cannot be
+     *             instantiated
+     * @see Locator#get(String)
+     */
+    public static ROIMaskManager getManager() throws LocatorException {
+        return (ROIMaskManager) getInstance().get(MANAGER_NAME);
+    }
+
+    /**
+     * Registers the Class implementing the RasterManager interface.
+     * 
+     * @param clazz
+     *            implementing the RasterManager interface
+     */
+    public static void registerManager(
+        Class<? extends ROIMaskManager> clazz) {
+        getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz);
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskMessageException.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskMessageException.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskMessageException.java	(revision 15576)
@@ -0,0 +1,29 @@
+package org.gvsig.raster.roimask.lib;
+
+import org.gvsig.tools.exception.BaseException;
+
+/**
+ * Exception thrown when there is an error getting a Raster message.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskMessageException extends BaseException {
+
+    private static final long serialVersionUID = -4051458353306878010L;
+
+    private static final String MESSAGE =
+        "An error has been produced " + "getting the Raster message";
+
+    private static final String KEY = "_RasterMessageException";
+
+    /**
+     * Creates a new {@link ROIMaskMessageException}.
+     * 
+     * @param cause
+     *            the original cause
+     */
+    public ROIMaskMessageException(Throwable cause) {
+        super(MESSAGE, cause, KEY, serialVersionUID);
+    }
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskMessageException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLibrary.java	(revision 15576)
@@ -0,0 +1,34 @@
+package org.gvsig.raster.roimask.lib;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * Library for API initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskLibrary extends AbstractLibrary {
+	
+	public ROIMaskLibrary() {
+        registerAsAPI(ROIMaskLibrary.class);
+	}
+	
+    @Override
+    protected void doInitialize() throws LibraryException {
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        // Validate there is any implementation registered.
+    	ROIMaskManager manager = ROIMaskLocator.getManager();
+        if (manager == null) {
+            throw new ReferenceNotRegisteredException(
+            		ROIMaskLocator.MANAGER_NAME, 
+            		ROIMaskLocator.getInstance());
+        }
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskManager.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskManager.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskManager.java	(revision 15576)
@@ -0,0 +1,14 @@
+package org.gvsig.raster.roimask.lib;
+
+/**
+ * This class is responsible of the management of the library's business logic.
+ * It is the library's main entry point, and provides all the services to manage
+ * {@link ROIMaskService}s.
+ * 
+ * @see ROIMaskService
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface ROIMaskManager {
+	
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib/ROIMaskManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask/lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.api
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/pom.xml	(revision 15576)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.lib</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.raster.roimask.lib</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+	<modules>
+		<module>org.gvsig.raster.roimask.lib.api</module>
+		<module>org.gvsig.raster.roimask.lib.impl</module>
+	</modules>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_zh.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_en.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_gl.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_ca.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_pt.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_cs.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_fr.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_de.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_eu.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_it.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask/lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources-plugin
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.lib.impl.ROIMaskDefaultImplLibrary
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/ROIMaskDefaultImplLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/ROIMaskDefaultImplLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/ROIMaskDefaultImplLibrary.java	(revision 15576)
@@ -0,0 +1,31 @@
+package org.gvsig.raster.roimask.lib.impl;
+
+import org.gvsig.raster.roimask.lib.ROIMaskLibrary;
+import org.gvsig.raster.roimask.lib.ROIMaskLocator;
+import org.gvsig.raster.roimask.lib.impl.regionalpha.RegionAlphaListManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library for default implementation initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskDefaultImplLibrary extends AbstractLibrary {
+	
+	public ROIMaskDefaultImplLibrary() {
+		registerAsImplementationOf(ROIMaskLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+        //Register the default GeometryManager
+		ROIMaskLocator.registerManager(DefaultROIMaskManager.class);
+	}
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+    	RegionAlphaListManager.register();
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/ROIMaskDefaultImplLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskManager.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskManager.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskManager.java	(revision 15576)
@@ -0,0 +1,24 @@
+package org.gvsig.raster.roimask.lib.impl;
+
+import org.gvsig.raster.roimask.lib.ROIMaskManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Default {@link ROIMaskManager} implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultROIMaskManager implements ROIMaskManager {
+	private static DefaultROIMaskManager   internalInstance  = new DefaultROIMaskManager();
+	private static final Logger                       logger            = LoggerFactory.getLogger(DefaultROIMaskManager.class);
+	
+	/**
+	 * Gets an instance of this object for internal use.
+	 * @return DefaultRasterManager
+	 */
+	public static DefaultROIMaskManager getInstance() {
+		return internalInstance;
+	}
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaFilter.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaFilter.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaFilter.java	(revision 15576)
@@ -0,0 +1,148 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.roimask.lib.impl.regionalpha;
+
+import java.util.List;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.datastruct.Params;
+import org.gvsig.fmap.dal.coverage.exception.FilterAddException;
+import org.gvsig.fmap.dal.coverage.grid.filter.BaseRasterFilter;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.raster.roi.ROI;
+
+/**
+ * 
+ * @author BorSanZa - Borja Sánchez Zamorano 
+ */
+public class RegionAlphaFilter extends BaseRasterFilter {
+	public static String[]     names           = new String[] { "regionalpha" };
+	private RegionAlphaUI      regionAlphaUI   = null;
+	private List<ROI>          roiList         = null;
+	protected boolean[]        selectedROI     = null;
+	protected int              alpha           = 255;
+	protected boolean          inverse         = false;
+
+	/* Variables que hacen falta en el process */
+	protected double           cellsize        = 0D;
+	protected Extent           bufferExtent     = null;
+	
+	/**
+	 * Constructor
+	 */
+	public RegionAlphaFilter() {
+		super();
+		setName(names[0]);
+	}
+
+	public String getGroup() {
+		return "mascaras";
+	}
+
+	public String[] getNames() {
+		return names;
+	}
+
+	public Params getUIParams(String nameFilter) {
+		Params params = RasterLocator.getManager().createParams(
+				"Panel", getRegionAlphaUI(), -1, null);
+		params.setParam("FilterName", nameFilter, -1, null);
+		params.setParam("Alpha",
+				new Integer(alpha),
+				Params.SLIDER,
+				new String[]{ "0", "255", "0", "1", "25" }); //min, max, valor defecto, intervalo pequeño, intervalo grande;
+
+		return params;
+	}
+	
+	private RegionAlphaUI getRegionAlphaUI() {
+		if (regionAlphaUI == null) {
+			regionAlphaUI = new RegionAlphaUI();
+			regionAlphaUI.setROIList(getROIList());
+		}
+		return regionAlphaUI;
+	}
+	
+	@SuppressWarnings("unchecked")
+	protected List<ROI> getROIList() {
+		if(roiList == null)
+			roiList = (List<ROI>)getEnv().get("SrcROI");
+		return roiList;
+	}
+
+	public void pre() throws FilterAddException {
+		super.pre();
+		
+		Boolean inverseBoolean = (Boolean) params.get("inverse");
+		if (inverseBoolean != null)
+			inverse = inverseBoolean.booleanValue();
+		
+		alpha = ((Integer) params.get("alpha")).intValue();
+		selectedROI = (boolean[]) params.get("selected_roi");
+		
+		if(raster.getDataExtent() == null)
+			throw new FilterAddException("Buffer extension cannot be null");
+		
+		bufferExtent = RasterLocator.getManager().getDataStructFactory().createExtent(raster.getDataExtent());
+		cellsize = raster.getDataExtent().getWidth() / raster.getWidth();
+		
+		if(hasInputTransparency())
+			createBufferResult(raster.getDataType(), raster.getBandCount());
+		else
+			createBufferResult(raster.getDataType(), raster.getBandCount() + 1);
+	}
+	
+	/**
+	 * Gets the result of this filter
+	 */
+	public Object getResult(String name) {
+		if (name.equals(RESULT_TRANSPARENCY)) {
+			String[] values = new String[rasterResult.getBandCount()];
+			for (int i = 0; i < values.length; i++) {
+				values[i] = ColorInterpretation.UNDEF_BAND;
+			}
+			ColorInterpretation ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(values);
+			ci.setColorInterpValue(rasterResult.getBandCount() - 1, ColorInterpretation.ALPHA_BAND);
+			transparency.setColorInterpretation(ci);
+			transparency.activeTransparency();
+			return transparency;
+		}
+
+		return super.getResult(name);
+	}
+
+	public void post() {
+	}
+
+	public void process(int x, int y) {
+	}
+	
+	public int getInRasterDataType() {
+		return Buffer.TYPE_BYTE;
+	}
+	
+	public int getOutRasterDataType() {
+		return Buffer.TYPE_BYTE;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaListManager.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaListManager.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaListManager.java	(revision 15576)
@@ -0,0 +1,125 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.roimask.lib.impl.regionalpha;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.fmap.dal.coverage.datastruct.Params;
+import org.gvsig.fmap.dal.coverage.exception.FilterTypeException;
+import org.gvsig.fmap.dal.coverage.grid.AbstractRasterFilterManager;
+import org.gvsig.fmap.dal.coverage.grid.RasterFilter;
+import org.gvsig.fmap.dal.coverage.grid.RasterFilterList;
+import org.gvsig.fmap.dal.coverage.grid.RegistrableFilterListener;
+
+public class RegionAlphaListManager extends AbstractRasterFilterManager {
+	public static String   ID = "RegionAlpha";
+	
+	/**
+	 * Default constructor. Sets the filter list.
+	 * @param filterList
+	 */
+	public RegionAlphaListManager(RasterFilterList filterList) {
+		super(filterList);
+	}
+
+	public static void register() {
+		AbstractRasterFilterManager.register(ID, RegionAlphaListManager.class, RegionAlphaUI.class);
+	}
+	
+	public String getManagerID() {
+		return ID;
+	}
+	
+	public boolean isDataTypeSupported(int dataType) {
+		return true;
+	}
+	
+	public Class<?> getFilterClassByID(String id) {
+		if( id.compareTo("regionalpha") == 0)
+			return RegionAlphaFilter.class;
+		return null;
+	}
+
+	public void addRegionAlphaFilter(boolean[] selectedROI, int alpha, Boolean inverse) throws FilterTypeException {
+		RasterFilter filter = new RegionAlphaByteFilter();
+
+		//Cuando el filtro esta creado, tomamos los valores y lo añadimos a la pila
+		if (filter != null) {
+			filter.addParam("inverse", inverse);
+			filter.addParam("alpha", Integer.valueOf(alpha));
+			filter.addParam("selected_roi", selectedROI);
+			getFilterList().add(filter);
+		}
+	}
+
+	public List<Class<?>> getRasterFilterList() {
+		List<Class<?>> filters = new ArrayList<Class<?>>();
+		filters.add(RegionAlphaFilter.class);
+		return filters;
+	}
+	
+	public RasterFilter createFilter(Params params) {
+		boolean[] selectedROI = ((boolean[]) params.getParamById("selected_roi").getDefaultValue());
+		Boolean inverse = ((Boolean) params.getParamById("inverse").getDefaultValue());
+		Integer alpha = ((Integer) params.getParamById("Alpha").getDefaultValue());
+		
+		RasterFilter filter = new RegionAlphaByteFilter();
+		filter.addParam("selected_roi", selectedROI);
+		filter.addParam("inverse", inverse);
+		filter.addParam("alpha", alpha);
+		return filter;
+	}
+	
+	public void addFilter(Params params) throws FilterTypeException {
+		addFilter(RegionAlphaFilter.class, params);
+	}
+
+	public void addFilter(Class<?> classFilter, Params params) throws FilterTypeException {
+		if (classFilter.equals(RegionAlphaFilter.class)) {
+			boolean[] selectedROI = null;
+			Boolean inverse = new Boolean(false);
+			int alpha = 255;
+
+			Params paramsUI = null;
+			for (int i = 0; i < params.getNumParams(); i++) {
+				if (params.getParam(i).getId().equals("Panel") &&
+					params.getParam(i).getDefaultValue() instanceof RegistrableFilterListener) {
+					paramsUI = ((RegistrableFilterListener) params.getParam(i).getDefaultValue()).getParams();
+				}
+				if (params.getParam(i).getId().equals("Alpha") && params.getParam(i).getDefaultValue() instanceof Integer) {
+					alpha = ((Integer) params.getParam(i).getDefaultValue()).intValue();
+				}
+			}
+
+			if (paramsUI != null) {
+				for (int i = 0; i < paramsUI.getNumParams(); i++) {
+					if (paramsUI.getParam(i).getId().equals("selected_roi"))
+						selectedROI = (boolean[]) paramsUI.getParam(i).getDefaultValue();
+					if (paramsUI.getParam(i).getId().equals("inverse"))
+						inverse = (Boolean) paramsUI.getParam(i).getDefaultValue();
+				}
+			}
+			addRegionAlphaFilter(selectedROI, alpha, inverse);
+		}
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaListManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaByteFilter.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaByteFilter.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaByteFilter.java	(revision 15576)
@@ -0,0 +1,68 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.roimask.lib.impl.regionalpha;
+
+import org.gvsig.raster.roi.ROI;
+
+/**
+ * Writes the alpha band filtering with the ROI
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class RegionAlphaByteFilter extends RegionAlphaFilter {
+	public void process(int x, int y) {
+		if(bufferExtent == null) {
+			for (int j = 0; j < raster.getBandCount(); j++) 
+				rasterResult.setElem(y, x, j, raster.getElemByte(y, x, j));
+			return;
+		}
+		
+		double wcX = bufferExtent.minX() + ((((double) x) * bufferExtent.width()) / ((double) raster.getWidth()));
+		double wcY = bufferExtent.minY() + ((((double) (raster.getHeight() - (y))) * bufferExtent.height()) / ((double) raster.getHeight()));
+		
+		for (int iBand = 0; iBand < numberOfBandsToProcess(); iBand++) {
+			rasterResult.setElem(y, x, iBand, raster.getElemByte(y, x, iBand));
+		}
+		
+		for (int i = 0; i < getROIList().size(); i++) {
+			if (selectedROI[i] && ((ROI) getROIList().get(i)).isInside(wcX, wcY, cellsize, cellsize)) {
+				if (inverse) {
+					if(hasInputTransparency())
+						rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, raster.getElemByte(y, x, transparency.getAlphaBandNumber()));
+					else
+						rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, (byte) 255);
+				} else {
+					rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, (byte) (255 - alpha));
+				}
+				return;
+			}
+		}
+		
+		if (inverse) {
+			rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, (byte) (255 - alpha));
+		} else {
+			if(hasInputTransparency())
+				rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, raster.getElemByte(y, x, transparency.getAlphaBandNumber()));
+			else
+				rasterResult.setElem(y, x, rasterResult.getBandCount() - 1, (byte) 255);
+		}
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaByteFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaUI.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaUI.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaUI.java	(revision 15576)
@@ -0,0 +1,260 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.roimask.lib.impl.regionalpha;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.datastruct.Params;
+import org.gvsig.fmap.dal.coverage.grid.FilterUIListener;
+import org.gvsig.fmap.dal.coverage.grid.RegistrableFilterListener;
+import org.gvsig.gui.beans.table.TableContainer;
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.roi.ROI;
+/**
+ * Es el interfaz gráfico que contiene el filtro de regiones de interes.
+ * En el se muestra una tabla con las posibles Rois a seleccionar y también
+ * un Checkbox para definir si la seleccion es normal o invertida.
+ * 
+ * @author BorSanZa - Borja Sánchez Zamorano (borja.sanchez@iver.es)
+ */
+public class RegionAlphaUI extends JPanel implements RegistrableFilterListener, TableModelListener, ChangeListener {
+	private static final long serialVersionUID       = 4525736825113598035L;
+	private TableContainer    tableContainer         = null;
+	private JLabel            warning                = null;
+	//private List<ROI>         roiList                = null;
+	private JCheckBox         negative               = null;
+	private boolean           lastInv                = false;
+	protected Params          loadedParams           = null;
+	private ArrayList<FilterUIListener>          
+                              actionCommandListeners = new ArrayList<FilterUIListener>();
+	
+	/**
+	 * Constructor de un RegionAlphaUI
+	 */
+	public RegionAlphaUI() {
+		init(null);
+	}
+	
+	public void init(Object obj) {
+		setLayout(new BorderLayout());
+		add(getTableContainer(), BorderLayout.CENTER);
+		add(getWarning(), BorderLayout.NORTH);
+		add(getInverse(), BorderLayout.SOUTH);
+	}
+	
+	/**
+	 * Obtiene el contenedor con la tabla.
+	 * @return
+	 */
+	private TableContainer getTableContainer() {
+		if (tableContainer == null) {
+			String[] columnNames = {" ", "Nombre", ""};
+			int[] columnWidths = {22, 334, 0};
+			tableContainer = new TableContainer(columnNames, columnWidths);
+			tableContainer.setPreferredSize(new Dimension(0, 130));
+			tableContainer.setModel("CheckBoxModel");
+			tableContainer.initialize();
+			tableContainer.setControlVisible(false);
+			tableContainer.setMoveRowsButtonsVisible(false);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMinWidth(22);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMaxWidth(22);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMinWidth(0);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMaxWidth(0);
+			tableContainer.getModel().addTableModelListener(this);
+		}
+		return tableContainer;
+	}
+	
+	/**
+	 * Obtiene el checkbox que informa de si selecciona lo que contiene las Rois
+	 * o su inversa.
+	 * @return JCheckBox
+	 */
+	private JCheckBox getInverse() {
+		if (negative == null) {
+			negative = new JCheckBox();
+			negative.setText(Messages.getText("inversa"));
+			negative.addChangeListener(this);
+		}
+		return negative;
+	}
+
+	/**
+	 * Obtiene el mensaje de aviso de que no hay rois en la lista. Esta etiqueta solo
+	 * es mostrada en caso en que la capa no tenga ROIs asociadas.
+	 * @return JLabel Etiqueta con el mensaje de aviso.
+	 */
+	public JLabel getWarning() {
+		if(warning == null) {
+			warning = new JLabel(Messages.getText("rois_needed"));
+			warning.setVisible(false);
+		}
+		return warning;
+	}
+	
+	/**
+	 * Asigna la capa.
+	 * @param layer
+	 */
+	public void setROIList(List<ROI> roiList) {
+		//this.roiList = roiList;
+		if(roiList == null || roiList.size() == 0)
+			getWarning().setVisible(true);
+		
+		if (roiList != null) {
+			for (int i = 0; i < roiList.size(); i++) {
+				ROI roi = (ROI) roiList.get(i);
+	
+				Object row[] = {"", "", ""};
+				
+				boolean active = false;
+				
+				if (roiList != null) {
+					for (int r = 0; r < roiList.size(); r++) {
+						if (((ROI) roiList.get(r)) == roi) {
+							active = true;
+							break;
+						}
+					}
+				}
+				
+				row[0] = new Boolean(active);
+				row[1] = roi.getName(); 
+				row[2] = new Integer(i);
+				try {
+					getTableContainer().addRow(row);
+				} catch (NotInitializeException e) {
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Obtiene la lista de ROIs seleccionadas
+	 * @return ArrayList con la lista de ROIs
+	 */
+	/*private List<ROI> getSelectedROIs() {
+		List<ROI> selected = new ArrayList<ROI>();
+		if (roiList != null) {
+			for (int i = 0; i < roiList.size(); i++) {
+				try {
+					if (((Boolean) tableContainer.getModel().getValueAt(i, 0)).booleanValue()) {
+						selected.add(roiList.get(i));
+					}
+				} catch (ArrayIndexOutOfBoundsException e) {
+					//Entra aquí si se han añadido ROIs con el cuadro abierto. Pasamos de hacer nada
+				}
+			}
+		}
+		return selected;
+	}*/
+	
+	private boolean[] getPositionSelectedROIs() {
+		boolean[] selectedROIs = new boolean[tableContainer.getModel().getRowCount()];
+
+		for (int i = 0; i < tableContainer.getModel().getRowCount(); i++) {
+			try {
+				selectedROIs[i] = ((Boolean) tableContainer.getModel().getValueAt(i, 0)).booleanValue();
+			} catch (ArrayIndexOutOfBoundsException e) {
+				//Entra aquí si se han añadido ROIs con el cuadro abierto. Pasamos de hacer nada
+			}
+		}
+
+		return selectedROIs;
+	}
+	
+	/**
+	 * Sobrecargamos el método getParams para que siempre devuelva
+	 * algo.
+	 */
+	public Params getParams() {
+		Params params = null;
+		if(loadedParams != null) {
+			params = loadedParams;
+			loadedParams = null;
+			return params;
+		}
+		params = RasterLocator.getManager().createParams(
+				"selected_roi",
+				getPositionSelectedROIs(),
+				-1,
+				null);
+		params.setParam("inverse",
+				new Boolean(getInverse().isSelected()),
+				-1,
+				null);
+		return params;
+	}
+	
+	public void setParams(Params params) {
+		this.loadedParams = params;
+	}
+
+	public void tableChanged(TableModelEvent e) {
+		callStateChanged();
+	}
+
+	/**
+	 * Cambio de estado para el check de inversa
+	 * @param e
+	 */
+	public void stateChanged(ChangeEvent e) {
+		if (e.getSource().equals(getInverse())) {
+			if (((JCheckBox) e.getSource()).isSelected() != lastInv) {
+				callStateChanged();
+				lastInv = ((JCheckBox) e.getSource()).isSelected();
+			}
+		}
+	}
+	
+	public void addFilterUIListener(FilterUIListener listener) {
+		if (!actionCommandListeners.contains(listener))
+			actionCommandListeners.add(listener);
+	}
+
+	public void callStateChanged() {
+		Iterator<FilterUIListener> acIterator = actionCommandListeners.iterator();
+		while (acIterator.hasNext()) {
+			FilterUIListener listener = (FilterUIListener) acIterator.next();
+			listener.actionValuesCompleted(new EventObject(this));
+		}
+	}
+
+	public void removeStateChangedListener(FilterUIListener listener) {
+		actionCommandListeners.remove(listener);
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha/RegionAlphaUI.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/regionalpha
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskService.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskService.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskService.java	(revision 15576)
@@ -0,0 +1,114 @@
+package org.gvsig.raster.roimask.lib.impl;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Date;
+import java.util.regex.Pattern;
+
+import org.gvsig.raster.roimask.lib.ROIMaskManager;
+import org.gvsig.raster.roimask.lib.ROIMaskMessageException;
+import org.gvsig.raster.roimask.lib.ROIMaskService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Default {@link ROIMaskService} implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultROIMaskService implements ROIMaskService {
+
+    private static final Logger LOG =
+        LoggerFactory.getLogger(DefaultROIMaskService.class);
+
+    private static final String DEFAULT_FORTUNE_COOKIE_URL =
+        "http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx/GetFortuneCookie";
+
+    private String message = null;
+    private ROIMaskManager manager;
+    private Date date = null;
+    private String url;
+
+    /**
+     * {@link DefaultROIMaskService} constructor with a
+     * {@link ROIMaskManager}.
+     * 
+     * @param manager
+     *            to use in the service
+     */
+    public DefaultROIMaskService(ROIMaskManager manager) {
+        this(manager, DEFAULT_FORTUNE_COOKIE_URL);
+    }
+
+    /**
+     * {@link DefaultROIMaskService} constructor with a
+     * {@link ROIMaskManager}.
+     * 
+     * @param manager
+     *            to use in the service
+     */
+    public DefaultROIMaskService(ROIMaskManager manager, String url) {
+        this.manager = manager;
+        this.url = url;
+    }
+
+    public String getMessage() throws ROIMaskMessageException {
+        if (this.message == null) {
+            try {
+                this.message = getMessageFromUrl();
+            } catch (IOException e) {
+                throw new ROIMaskMessageException(e);
+            }
+            this.date = new Date();
+        }
+        return this.message;
+    }
+
+    /**
+     * Gets a Raster message from an external service through a URL.
+     * 
+     * @return the message
+     */
+    private String getMessageFromUrl() throws IOException {
+        LOG.debug("Getting the Raster message from the url: {}",
+            this.url);
+
+        URL url = new URL(this.url);
+        StringBuffer message = new StringBuffer();
+        BufferedReader in =
+            new BufferedReader(new InputStreamReader(url.openStream()));
+        String str;
+        // Create a pattern to match breaks
+        Pattern p = Pattern.compile("\\<[^\\>]+\\>");
+
+        StringBuffer data = null;
+
+        if (LOG.isDebugEnabled()) {
+            data = new StringBuffer();
+        }
+
+        while ((str = in.readLine()) != null) {
+            if (LOG.isDebugEnabled()) {
+                data.append(str).append('\n');
+            }
+            message.append(p.matcher(str).replaceAll("\n"));
+        }
+        in.close();
+
+        LOG.debug("Raster message response:\n{}", data);
+
+        return message.toString();
+    }
+
+    public ROIMaskManager getManager() {
+        return this.manager;
+    }
+
+    public Date getDate() {
+        return this.date;
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl/DefaultROIMaskService.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask/lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org/gvsig/raster/roimask/lib/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org/gvsig/raster/roimask/lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/pom.xml	(revision 15576)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.lib.impl</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.lib.impl</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask.lib</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.impl</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib/org.gvsig.raster.roimask.lib.impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.lib
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.swing.ROIMaskSwingLibrary
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskData.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskData.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskData.java	(revision 15576)
@@ -0,0 +1,23 @@
+package org.gvsig.raster.roimask.swing;
+
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+
+public interface ROIMaskData {
+	public Object getInputLayer();
+	
+	public void setInputLayer(Object obj);
+	
+	public boolean[] getROIsSelected();
+	
+	public void setValueNoData(double value);
+	
+	public double getValueNoData();
+	
+	public void clearROIs() throws NotInitializeException;
+	
+	public void addROI(Object[] roi) throws NotInitializeException;
+	
+	public int getAlpha();
+	
+	public boolean isInverse();
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskData.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLocator.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLocator.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLocator.java	(revision 15576)
@@ -0,0 +1,71 @@
+package org.gvsig.raster.roimask.swing;
+
+import org.gvsig.tools.locator.BaseLocator;
+
+/**
+ * This locator is the entry point for the Raster library, providing
+ * access to all Raster services through the {@link ROIMaskManager}
+ * .
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskSwingLocator extends BaseLocator {
+    /**
+     * Validation swing manager name.
+     */
+    public static final String SWING_MANAGER_NAME =
+        "ROIMask.swing.manager";
+
+    /**
+     * Validation swing manager description.
+     */
+    public static final String SWING_MANAGER_DESCRIPTION =
+        "ROIMask UIManager";
+
+    private static final String LOCATOR_NAME = "ROIMask.swing.locator";
+
+    /**
+     * Unique instance.
+     */
+    private static final ROIMaskSwingLocator INSTANCE =
+        new ROIMaskSwingLocator();
+
+    /**
+     * Return the singleton instance.
+     * 
+     * @return the singleton instance
+     */
+    public static ROIMaskSwingLocator getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Return the Locator's name
+     * 
+     * @return a String with the Locator's name
+     */
+    public final String getLocatorName() {
+        return LOCATOR_NAME;
+    }
+
+    /**
+     * Registers the Class implementing the PersistenceManager interface.
+     * 
+     * @param clazz
+     *            implementing the PersistenceManager interface
+     */
+    public static void registerSwingManager(
+        Class<? extends ROIMaskSwingManager> clazz) {
+        getInstance().register(SWING_MANAGER_NAME, SWING_MANAGER_DESCRIPTION, clazz);
+    }
+
+    /**
+     * Gets the instance of the {@link ScriptingUIManager} registered.
+     * 
+     * @return {@link ScriptingUIManager}
+     */
+    public static ROIMaskSwingManager getSwingManager() {
+        return (ROIMaskSwingManager) getInstance().get(SWING_MANAGER_NAME);
+    }
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLibrary.java	(revision 15576)
@@ -0,0 +1,30 @@
+package org.gvsig.raster.roimask.swing;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * Library for API initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskSwingLibrary extends AbstractLibrary {
+	
+    @Override
+    protected void doInitialize() throws LibraryException {
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        // Validate there is any implementation registered.
+    	ROIMaskSwingManager manager = ROIMaskSwingLocator.getSwingManager();
+        if (manager == null) {
+            throw new ReferenceNotRegisteredException(
+            		ROIMaskSwingLocator.SWING_MANAGER_NAME, 
+            		ROIMaskSwingLocator.getInstance());
+        }
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskPanel.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskPanel.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskPanel.java	(revision 15576)
@@ -0,0 +1,18 @@
+package org.gvsig.raster.roimask.swing;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.JComponent;
+
+public interface ROIMaskPanel {
+	
+	public ROIMaskData getDataModel();
+	
+	public JComponent getComponent();
+	
+	public void activeSlider(boolean active);
+	
+	public void showWarning(boolean show);
+	
+	public void addListener(ActionListener listener);
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingManager.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingManager.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingManager.java	(revision 15576)
@@ -0,0 +1,14 @@
+package org.gvsig.raster.roimask.swing;
+
+/**
+ * This class is responsible of the management of the library's business logic.
+ * It is the library's main entry point, and provides all the services to manage
+ * {@link ROIMaskService}s.
+ * 
+ * @see ROIMaskService
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface ROIMaskSwingManager {
+	public ROIMaskPanel createROIMaskPanel();
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing/ROIMaskSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/pom.xml	(revision 15576)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.swing.api</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.swing.api</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask.swing</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>      
+            <scope>compile</scope>
+        </dependency> 
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.api
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/pom.xml	(revision 15576)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.swing</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.raster.roimask.swing</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+		</dependency>
+	</dependencies>
+	<modules>
+		<module>org.gvsig.raster.roimask.swing.api</module>
+		<module>org.gvsig.raster.roimask.swing.impl</module>
+	</modules>
+</project>
+

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/pom.xml	(revision 15576)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.swing.impl</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.swing.impl</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask.swing</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.roimask.swing.api</artifactId>           
+            <scope>compile</scope>
+        </dependency> 
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>           
+            <scope>compile</scope>
+        </dependency> 
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.swing.api</artifactId>           
+            <scope>compile</scope>
+        </dependency> 
+       <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.swing.impl</artifactId>           
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org/gvsig/raster/roimask/swing/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskPanelImpl.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskPanelImpl.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskPanelImpl.java	(revision 15576)
@@ -0,0 +1,198 @@
+package org.gvsig.raster.roimask.swing.impl;
+
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.EventObject;
+
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+
+import org.gvsig.gui.beans.datainput.DataInputContainer;
+import org.gvsig.gui.beans.datainput.DataInputContainerListener;
+import org.gvsig.gui.beans.slidertext.listeners.SliderEvent;
+import org.gvsig.gui.beans.slidertext.listeners.SliderListener;
+import org.gvsig.gui.beans.table.TableContainer;
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.roimask.swing.ROIMaskData;
+import org.gvsig.raster.roimask.swing.ROIMaskPanel;
+import org.gvsig.raster.swing.RasterSwingLocator;
+import org.gvsig.raster.swing.slider.SliderText;
+
+public class ROIMaskPanelImpl extends JPanel implements ROIMaskPanel,
+	TableModelListener, ChangeListener, DataInputContainerListener, ActionListener, SliderListener  {
+	private static final long               serialVersionUID     = 1L;
+	private ROIMaskDataImpl                 data                 = null;
+	private TableContainer                  tableContainer       = null;
+	private JCheckBox                       negative             = null;
+	private JLabel                          warning              = null;
+	private DataInputContainer              valueNoData          = null;
+	private SliderText                      slider               = null;
+	private ActionListener                  listener             = null;
+	
+	public ROIMaskPanelImpl() {
+		init();
+	}
+	
+	private void init() {
+		this.setLayout(new GridBagLayout());
+		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+		gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
+		gridBagConstraints1.weightx = 1;
+		gridBagConstraints1.weighty = 1;
+		
+		gridBagConstraints1.gridy = 1;
+		this.add(getTableContainer(), gridBagConstraints1);
+
+		gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints1.weighty = 0;
+		gridBagConstraints1.gridy = 0;
+		this.add(getWarning(), gridBagConstraints1);
+		
+		gridBagConstraints1.insets = new java.awt.Insets(0, 0, 4, 0);
+		gridBagConstraints1.gridy = 2;
+		this.add(getInverse(), gridBagConstraints1);
+		
+		gridBagConstraints1.gridy = 3;
+		this.add(getValueNoData(), gridBagConstraints1);
+		
+		gridBagConstraints1.gridy = 4;
+		this.add(getSlider().getComponent(), gridBagConstraints1);
+	}
+	
+	public JComponent getComponent() {
+		return this;
+	}
+
+	public ROIMaskData getDataModel() {
+		if(data == null)
+			data = new ROIMaskDataImpl(this);
+		return data;
+	}
+	
+	public TableContainer getTableContainer() {
+		if (tableContainer == null) {
+			String[] columnNames = {" ", "Nombre", ""};
+			int[] columnWidths = {22, 334, 0};
+			tableContainer = new TableContainer(columnNames, columnWidths);
+			tableContainer.setPreferredSize(new Dimension(0, 130));
+			tableContainer.setModel("CheckBoxModel");
+			tableContainer.initialize();
+			tableContainer.setControlVisible(false);
+			tableContainer.setMoveRowsButtonsVisible(false);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMinWidth(22);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(0).setMaxWidth(22);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMinWidth(0);
+			tableContainer.getTable().getJTable().getColumnModel().getColumn(2).setMaxWidth(0);
+			tableContainer.getModel().addTableModelListener(this);
+		}
+		return tableContainer;
+	}
+	
+	public JCheckBox getInverse() {
+		if (negative == null) {
+			negative = new JCheckBox();
+			negative.setText(Messages.getText("inversa"));
+			negative.addChangeListener(this);
+			negative.addActionListener(this);
+		}
+		return negative;
+	}
+	
+	public JLabel getWarning() {
+		if(warning == null) {
+			warning = new JLabel(Messages.getText("rois_needed"));
+			warning.setVisible(false);
+		}
+		return warning;
+	}
+	
+	public DataInputContainer getValueNoData() {
+		if(valueNoData == null) {
+			valueNoData = new DataInputContainer();
+			valueNoData.setLabelText(Messages.getText("value"));
+			valueNoData.setValue(-99999 + "");
+			valueNoData.getDataInputField().addValueChangedListener(this);
+			valueNoData.addValueChangedListener(this);
+		}
+		return valueNoData;
+	}
+	
+	public SliderText getSlider() {
+		if (slider == null) {
+			slider = RasterSwingLocator.getSwingManager().createSliderText(0, 100, 0, false);
+			slider.setDecimal(true);
+			slider.setBorder("");
+			slider.addValueChangedListener(this);
+		}
+		return slider;
+	}
+	
+	public void activeSlider(boolean b) {
+		if(b) {
+			getSlider().setControlEnabled(true);
+			getValueNoData().setControlEnabled(false);
+		} else {
+			getSlider().setControlEnabled(false);
+			getValueNoData().setControlEnabled(true);
+		}
+	}
+	
+	public void addRow(Object[] row) throws NotInitializeException {
+		getTableContainer().addRow(row);
+	}
+
+	public void clearTable() throws NotInitializeException {
+		getTableContainer().removeAllRows();
+	}
+	
+	public void setValueNoData(double value) {
+		getValueNoData().setValue(value + "");
+	}
+	
+	public void showWarning(boolean show) {
+		getWarning().setVisible(show);
+	}
+	
+	public void addListener(ActionListener listener) {
+		this.listener = listener;
+	}
+
+	public void tableChanged(TableModelEvent e) {
+		if(listener != null)
+			listener.actionPerformed(new ActionEvent(getTableContainer(), 0, "UPDATE"));
+	}
+
+	public void stateChanged(ChangeEvent e) {
+		if(listener != null)
+			listener.actionPerformed(new ActionEvent(getValueNoData(), 0, "UPDATE"));
+	}
+
+	public void actionValueChanged(EventObject e) {
+		if(listener != null)
+			listener.actionPerformed(new ActionEvent(getSlider(), 0, "UPDATE"));
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if(listener != null)
+			listener.actionPerformed(e);
+	}
+
+	public void actionValueChanged(SliderEvent e) {
+		if(listener != null)
+			listener.actionPerformed(new ActionEvent(getSlider(), 0, "UPDATE"));
+	}
+
+	public void actionValueDragged(SliderEvent e) {
+		
+	}
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskPanelImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDefaultSwingImplLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDefaultSwingImplLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDefaultSwingImplLibrary.java	(revision 15576)
@@ -0,0 +1,46 @@
+package org.gvsig.raster.roimask.swing.impl;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.roimask.swing.ROIMaskSwingLocator;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library for default implementation initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class ROIMaskDefaultSwingImplLibrary extends AbstractLibrary {
+	
+	public ROIMaskDefaultSwingImplLibrary() {
+		registerAsImplementationOf(ROIMaskDefaultSwingImplLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+        //Register the default GeometryManager
+		ROIMaskSwingLocator.registerSwingManager(DefaultROIMaskSwingManager.class);
+		
+		if (!Messages.hasLocales()) {
+            Messages.addLocale(Locale.getDefault());
+        }
+        
+        Messages.addResourceFamily("org.gvsig.raster.roimask.swing.impl.i18n.text",
+        		ROIMaskDefaultSwingImplLibrary.class.getClassLoader(),
+        		ROIMaskDefaultSwingImplLibrary.class.getClass().getName()); 
+        
+        registerIcons();
+	}
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+    	
+    }
+    
+    private void registerIcons() {
+		//IconThemeHelper.registerIcon(null, "...", this);
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDefaultSwingImplLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/DefaultROIMaskSwingManager.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/DefaultROIMaskSwingManager.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/DefaultROIMaskSwingManager.java	(revision 15576)
@@ -0,0 +1,27 @@
+package org.gvsig.raster.roimask.swing.impl;
+
+import org.gvsig.raster.roimask.swing.ROIMaskPanel;
+import org.gvsig.raster.roimask.swing.ROIMaskSwingManager;
+
+/**
+ * Default {@link ROIMaskManager} implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultROIMaskSwingManager implements ROIMaskSwingManager {
+	private static DefaultROIMaskSwingManager   internalInstance  = new DefaultROIMaskSwingManager();
+	//private static final Logger                       logger            = LoggerFactory.getLogger(DefaultROIMaskSwingManager.class);
+	
+	/**
+	 * Gets an instance of this object for internal use.
+	 * @return DefaultROIMaskManager
+	 */
+	public static DefaultROIMaskSwingManager getInstance() {
+		return internalInstance;
+	}
+
+	public ROIMaskPanel createROIMaskPanel() {
+		return new ROIMaskPanelImpl();
+	}
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/DefaultROIMaskSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDataImpl.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDataImpl.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDataImpl.java	(revision 15576)
@@ -0,0 +1,64 @@
+package org.gvsig.raster.roimask.swing.impl;
+
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.gvsig.raster.roimask.swing.ROIMaskData;
+
+public class ROIMaskDataImpl implements ROIMaskData {
+	private ROIMaskPanelImpl         panel      = null;
+	private Object                   inputLyr   = null;
+	
+	public ROIMaskDataImpl(ROIMaskPanelImpl panel) {
+		this.panel = panel;
+	}
+	
+	public Object getInputLayer() {
+		return inputLyr;
+	}
+
+	public void setInputLayer(Object obj) {
+		this.inputLyr = obj;
+	}
+	
+	public int getAlpha() {
+		double controlValue = panel.getSlider().getValue();
+		return(int)(controlValue * 255 / 100);
+	}
+	
+	public boolean isInverse() {
+		return panel.getInverse().isSelected();
+	}
+	
+	public void setValueNoData(double value) {
+		panel.setValueNoData(value);
+	}
+	
+	public void clearROIs() throws NotInitializeException {
+		panel.clearTable();
+	}
+	
+	public void addROI(Object[] roi) throws NotInitializeException {
+		panel.addRow(roi);	
+	}
+	
+	public double getValueNoData() {
+		try {
+			return new Double(panel.getValueNoData().getValue());
+		} catch (NumberFormatException e) {
+			return 0;
+		}
+	}
+	
+	public boolean[] getROIsSelected() {
+		try {
+			boolean[] result = new boolean[panel.getTableContainer().getRowCount()];
+			for (int i = 0; i < panel.getTableContainer().getRowCount(); i++) {
+				result[i] = (Boolean)panel.getTableContainer().getModel().getValueAt(i, 0);
+			}
+			return result;
+		} catch (NotInitializeException e) {
+			return null;
+		}
+		
+	}
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl/ROIMaskDataImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_zh.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_gl.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_ca.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_pt.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_cs.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_fr.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_de.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_eu.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_it.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources-plugin
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text.properties	(revision 15576)
@@ -0,0 +1,2 @@
+applying_mask=Aplicando máscara
+mask_process=Proceso de máscara

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties	(revision 15576)
@@ -0,0 +1,2 @@
+applying_mask=Applying mask
+mask_process=Mask process
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing/impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask/swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.swing.impl.ROIMaskDefaultSwingImplLibrary
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing/org.gvsig.raster.roimask.swing.impl
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.swing
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskToolboxLibrary.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskToolboxLibrary.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskToolboxLibrary.java	(revision 15576)
@@ -0,0 +1,31 @@
+package org.gvsig.raster.roimask;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Initialization of <code>ROIMaskToolboxLibrary</code> library.
+ */
+public class ROIMaskToolboxLibrary extends AbstractLibrary {
+
+    @Override
+    protected void doInitialize() throws LibraryException {
+        // Nothing to do
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        Messages.addResourceFamily(
+            "org.gvsig.raster.roimask.roimask", ROIMaskToolboxLibrary.class
+                .getClassLoader(), ROIMaskToolboxLibrary.class.getClass().getName());
+        try {
+        	org.gvsig.geoprocess.lib.api.GeoProcessLocator.getGeoProcessManager().registerGeoProcess(
+        			new ROIMaskSextanteAlgorithm());
+        } catch (NoClassDefFoundError e) {
+    		LoggerFactory.getLogger(ROIMaskToolboxLibrary.class).debug("", e);
+    	}
+    }
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskToolboxLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskSextanteAlgorithm.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskSextanteAlgorithm.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskSextanteAlgorithm.java	(revision 15576)
@@ -0,0 +1,113 @@
+package org.gvsig.raster.roimask;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.ROIException;
+import org.gvsig.geoprocess.lib.sextante.AbstractSextanteGeoProcess;
+import org.gvsig.geoprocess.lib.sextante.dataObjects.FLyrRasterIRasterLayer;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.roi.ROI;
+import org.gvsig.raster.roimask.algorithm.ROIMaskProcess;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+/**
+ * ...
+ */
+public class ROIMaskSextanteAlgorithm extends AbstractSextanteGeoProcess {
+
+    public static final String RESULT            = "RESULT";
+    public static final String LAYER             = ROIMaskProcess.RASTER_STORE1;
+    public static final String ALPHA             = ROIMaskProcess.ALPHA;
+    public static final String INVERSE           = ROIMaskProcess.INVERSE;
+    public static final String NODATA            = ROIMaskProcess.NODATA;
+
+
+    public void defineCharacteristics() {
+        setName(getTranslation("mask"));
+        setGroup(getTranslation("basic_raster_algorithms"));
+        // setGeneratesUserDefinedRasterOutput(false);
+
+        try {
+            m_Parameters.addInputRasterLayer(LAYER, getTranslation("Input_layer"), true);
+            m_Parameters.addNumericalValue(ALPHA, getTranslation("alpha"), 0,
+                AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER);
+            m_Parameters.addBoolean(INVERSE, getTranslation("Inverse"), false);
+        } catch (RepeatedParameterNameException e) {
+            Sextante.addErrorToLog(e);
+        }
+        addOutputRasterLayer(RESULT, getTranslation("mask"));
+    }
+
+    public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+    	if(existsOutPutFile(ROIMaskSextanteAlgorithm.RESULT, 0)) {
+    		throw new GeoAlgorithmExecutionException(getTranslation("file_exists"));
+    	}
+
+    	IRasterLayer input = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+    	int alpha = m_Parameters.getParameterValueAsInt(ALPHA);
+    	boolean inverse = m_Parameters.getParameterValueAsBoolean(INVERSE);
+    	FLyrRaster lyrRaster = ((FLyrRaster)input.getBaseDataObject());
+    	ROI[] rois = null;
+    	IRasterLayer output = null;
+    	DataProcess task = null;
+    	AnalysisExtent ext = getAnalysisExtent();
+    	Extent bbox = RasterLocator.getManager().getDataStructFactory().createExtent(
+    			ext.getXMin(), ext.getYMax(), ext.getXMax(), ext.getYMin());
+		try {
+			output = getNewRORasterLayer(
+					RESULT,
+					Sextante.getText("Mask_image"),
+					input.getDataType(),
+					input.getBandsCount());
+			rois = lyrRaster.getRois().toArray(new ROI[lyrRaster.getRois().size()]);
+			task = RasterBaseAlgorithmLibrary.getManager().createRasterTask("ROIMaskProcess");
+		} catch (ProcessException e1) {
+			 Sextante.addErrorToLog(e1);
+		} catch (ROIException e1) {
+			 Sextante.addErrorToLog(e1);
+		}
+
+    	String fileName = ((FLyrRasterIRasterLayer)output).getName();
+    	task.addParam(ROIMaskProcess.PATH, fileName);
+		task.addParam(ROIMaskProcess.RASTER_STORE1, lyrRaster.getDataStore());
+		task.addParam(ROIMaskProcess.ROIS, rois);
+		task.addParam(ROIMaskProcess.ALPHA, alpha);
+		task.addParam(ROIMaskProcess.INVERSE, inverse);
+		task.addParam(ROIMaskProcess.NODATA, lyrRaster.getNoDataValue());
+		task.addParam(ROIMaskProcess.WINDOW, bbox);
+		task.addParam(ROIMaskProcess.OUTPUT_WIDTH, ext.getNX());
+		task.addParam(ROIMaskProcess.OUTPUT_HEIGHT, ext.getNY());
+
+		try {
+			task.execute();
+			((FLyrRasterIRasterLayer)output).setBaseDataObject(fileName);
+		} catch (ProcessInterruptedException e) {
+			Sextante.addErrorToLog(e);
+		} catch (ProcessException e) {
+			Sextante.addErrorToLog(e);
+		}
+
+		if(getTaskMonitor().isCanceled())
+			return false;
+
+        return true;
+    }
+
+    /*
+     * TODO: Customized panels
+    @Override
+    public Class<? extends GeoAlgorithmParametersPanel> getCustomParametersPanelClass() {
+        return BufferParametersPanel.class;
+    }*/
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask/ROIMaskSextanteAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text.properties	(revision 15576)
@@ -0,0 +1,2 @@
+basic_raster_algorithms=Capas raster
+mask=Máscara por ROI
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_zh.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_en.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_en.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_en.properties	(revision 15576)
@@ -0,0 +1,2 @@
+basic_raster_algorithms=Raster layers
+mask=ROI mask
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_gl.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_ca.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_pt.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_cs.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_fr.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_de.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_eu.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_it.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask/sextante
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin/images
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources-plugin
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask.properties	(revision 15576)
@@ -0,0 +1,6 @@
+applying_mask=Aplicando máscara
+mask_process=Proceso de máscara
+mask=Máscara por ROI
+basic_raster_algorithms=Capas ráster
+alpha=Transparencia
+inverse=Inversa
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask_en.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask_en.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask_en.properties	(revision 15576)
@@ -0,0 +1,6 @@
+applying_mask=Applying mask
+mask_process=Mask process
+mask=ROI mask
+basic_raster_algorithms=Raster layers
+alpha=Alpha
+inverse=Inverse
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask/roimask_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm.xml	(revision 15576)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
+<help>
+	<element name="DESCRIPTION"
+		text=""
+		description="Descripci&#243;n" type="0">
+		<!-- <image description="" file="">
+		</image> -->
+	</element>
+	<element name="ADDITIONAL_INFO" text=""
+		description="Informaci&#243;n adicional" type="0">
+	</element>
+	<element name="EXTENSION_AUTHOR" text=""
+		description="Algoritmo creado por" type="0">
+	</element>
+	<element name="HELP_AUTHOR" text="" description="Ayuda creada por"
+		type="0">
+	</element>
+	<element name="USER_NOTES" text="" description="Notas de usuario"
+		type="0">
+	</element>
+</help>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm_en.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm_en.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm_en.xml	(revision 15576)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
+<help>
+	<element name="DESCRIPTION"
+		text=""
+		description="Descripci&#243;n" type="0">
+		<!-- <image description="" file="">
+		</image> -->
+	</element>
+	<element name="ADDITIONAL_INFO" text=""
+		description="Informaci&#243;n adicional" type="0">
+	</element>
+	<element name="EXTENSION_AUTHOR" text=""
+		description="Algoritmo creado por" type="0">
+	</element>
+	<element name="HELP_AUTHOR" text="" description="Ayuda creada por"
+		type="0">
+	</element>
+	<element name="USER_NOTES" text="" description="Notas de usuario"
+		type="0">
+	</element>
+</help>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help/ROIMaskSextanteAlgorithm_en.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/help
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 15576)
@@ -0,0 +1 @@
+org.gvsig.raster.roimask.ROIMaskToolboxLibrary
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/META-INF/services
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources/META-INF
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/pom.xml	(revision 15576)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.toolbox.algorithm</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.roimask.toolbox.algorithm</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+		    <groupId>org.gvsig</groupId>
+   			<artifactId>org.gvsig.geoprocess.algorithm.base</artifactId>
+            <scope>compile</scope>
+   		</dependency>
+   		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.algorithm</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.algorithm</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.geoprocess.lib.sextante</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.lib</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.ui</artifactId>
+			<scope>compile</scope>
+		</dependency>
+	    <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.i18n</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+   		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.toolbox.algorithm
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/pom.xml	(revision 15576)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.raster.roimask.app</artifactId>
+    <packaging>pom</packaging>
+    <name>org.gvsig.raster.roimask.app</name>
+    <description />
+    
+    <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.raster.roimask</artifactId>
+      <version>2.2.155</version>
+    </parent>
+
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app</url>
+    </scm>
+    
+    <developers>
+        <developer>
+            <id>nbrodin</id>
+            <name>Nacho Brodin</name>
+            <email>nachobrodin@gmail.com</email>
+            <roles>
+                <role>Architect</role>
+                <role>Developer</role>
+            </roles>
+        </developer>
+    </developers>
+    <repositories>
+        <repository>
+            <id>gvsig-public-http-repository</id>
+            <name>gvSIG maven public HTTP repository</name>
+            <url>http://devel.gvsig.org/m2repo/j2se</url>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>warn</checksumPolicy>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>warn</checksumPolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+    <modules>
+        <module>org.gvsig.raster.roimask.app.client</module>
+    </modules>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java/org/gvsig/raster/roimask/app
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/test
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/assembly/gvsig-plugin-package.xml	(revision 15576)
@@ -0,0 +1,54 @@
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>.</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>${project.artifactId}/lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+      <outputDirectory>${project.artifactId}</outputDirectory>
+    </file>
+  </files>
+  
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>${project.artifactId}</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+	  <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>${project.artifactId}/lib</outputDirectory>
+      <includes> 
+			<include>org.gvsig:org.gvsig.raster.roimask.app.client:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.lib.api:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.lib.impl:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.swing.api:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.swing.impl:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.algorithm:jar</include>
+			<include>org.gvsig:org.gvsig.raster.roimask.toolbox.algorithm:jar</include>
+	  </includes>
+	</dependencySet>
+	
+	<!-- Copia el algoritmo de toolbox a install/files cuando se empaqueta para que el script de ant lo meta donde toca al instalar 
+	
+	<dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+	  <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>${project.artifactId}/install/files</outputDirectory>
+      <includes> 
+			<include>org.gvsig:org.gvsig.raster.roimask.toolbox.algorithm:jar</include>
+	  </includes>
+	</dependencySet>-->
+  </dependencySets>
+</assembly>
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/assembly/gvsig-plugin-package.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/assembly
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskWindow.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskWindow.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskWindow.java	(revision 15576)
@@ -0,0 +1,141 @@
+package org.gvsig.raster.roimask.app;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+import javax.swing.border.Border;
+import javax.swing.plaf.basic.BasicSplitPaneDivider;
+import javax.swing.plaf.basic.BasicSplitPaneUI;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel;
+
+public class ROIMaskWindow extends DefaultButtonsPanel implements IWindow, ActionListener {
+    
+    private static final long  serialVersionUID = -4401123724140025094L;
+    private ActionListener     listener         = null;
+    private WindowInfo         info             = null;
+
+    private Object             profile = WindowInfo.EDITOR_PROFILE;
+
+    public ROIMaskWindow(JComponent panel, 
+    		JComponent preview, 
+    		String title, 
+    		int w, 
+    		int h,
+    		boolean fixedPreview,
+    		ActionListener actionListener) {
+    	this.listener = actionListener;
+    	
+    	if(fixedPreview)
+    		fixedPreview(panel, preview);
+    	else
+    		redimPreview(panel, preview);
+
+        getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT).addActionListener(this);
+        //Se elimina el botón aplicar pq la ventana es modal. Lo que ocurre es que al terminar el proceso se
+        //lanza el dialogo de cargar la capa en el TOC que también es modal. Esto provoca una excepción. El botón
+        //de aceptar no da problemas pq este cierra antes la ventana inferior.
+        getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY).setVisible(false);
+        //getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY).addActionListener(this);
+        getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL).addActionListener(this);
+        
+        info = new WindowInfo(WindowInfo.PALETTE | WindowInfo.RESIZABLE);
+        info.setTitle(title);
+        info.setWidth(w);
+        info.setHeight(h);
+    }
+    
+    private void fixedPreview(JComponent panel, JComponent preview) {
+    	setLayout(new GridBagLayout());
+		GridBagConstraints gbc = new GridBagConstraints();
+		gbc.fill = GridBagConstraints.BOTH;
+		gbc.weightx = 1;
+		gbc.weighty = 1;
+		add(panel, gbc);
+		
+		if(preview != null) {
+			gbc.anchor = GridBagConstraints.NORTH;
+			gbc.fill = GridBagConstraints.NONE;
+			gbc.weightx = 0;
+			gbc.weighty = 0;
+			gbc.gridx = 1;
+			add(preview, gbc);
+		}
+    }
+    
+    private void redimPreview(JComponent panel, JComponent preview) {
+    	setLayout(new BorderLayout());
+		JSplitPane splitPane = new JSplitPane();
+		splitPane.setLeftComponent(panel);
+		splitPane.setRightComponent(getPreviewForRedimPreviewPanel(preview));
+		splitPane.setResizeWeight(1.0);
+		splitPane.setContinuousLayout(true);
+		splitPane.setOneTouchExpandable(true);
+		splitPane.setUI(new BasicSplitPaneUI() {
+			public BasicSplitPaneDivider createDefaultDivider() {
+				return new BasicSplitPaneDivider(this) {
+					private static final long serialVersionUID = 1L;
+
+					public void setBorder(Border b) {
+					}
+				};
+			}
+		});
+		splitPane.setBorder(null);
+		add(splitPane, BorderLayout.CENTER);
+    }
+    
+    private JSplitPane getPreviewForRedimPreviewPanel(JComponent preview) {
+    	JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
+    	splitPane.setTopComponent(preview);
+		splitPane.setBottomComponent(new JPanel());
+		splitPane.setResizeWeight(0);
+		splitPane.setContinuousLayout(true);
+		splitPane.setOneTouchExpandable(true);
+		splitPane.setUI(new BasicSplitPaneUI() {
+			public BasicSplitPaneDivider createDefaultDivider() {
+				return new BasicSplitPaneDivider(this) {
+					private static final long serialVersionUID = 1L;
+
+					public void setBorder(Border b) {
+					}
+				};
+			}
+		});
+		splitPane.setBorder(null);
+		return splitPane;
+    }
+
+    public WindowInfo getWindowInfo() {
+        return info;
+    }
+
+    public Object getWindowProfile() {
+        return profile;
+    }
+
+    public void actionPerformed(ActionEvent e) {
+    	if(e.getSource() == getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT)) {
+    		listener.actionPerformed(e);
+    		PluginServices.getMDIManager().closeWindow(this);
+    	}
+    	
+    	if(e.getSource() == getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY)) {
+    		listener.actionPerformed(e);
+    	}
+    	
+    	if(e.getSource() == getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL)) {
+    		PluginServices.getMDIManager().closeWindow(this);
+    	}
+    }
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskWindow.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskExtension.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskExtension.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskExtension.java	(revision 15576)
@@ -0,0 +1,433 @@
+package org.gvsig.raster.roimask.app;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.exception.ROIException;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.process.IProcessActions;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.fmap.layers.IRasterLayerActions;
+import org.gvsig.raster.mainplugin.RasterMainPluginUtils;
+import org.gvsig.raster.roi.ROI;
+import org.gvsig.raster.roimask.algorithm.ROIMaskProcess;
+import org.gvsig.raster.roimask.app.toolbox.ToolboxROIMaskLoader;
+import org.gvsig.raster.roimask.swing.ROIMaskPanel;
+import org.gvsig.raster.roimask.swing.ROIMaskSwingLocator;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+import org.gvsig.raster.swing.RasterSwingLocator;
+import org.gvsig.raster.swing.newlayer.CreateNewLayerPanel;
+import org.gvsig.raster.swing.preview.PreviewPanel;
+import org.gvsig.raster.util.RasterNotLoadException;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ROIMaskExtension extends Extension implements ActionListener,
+    IProcessActions {
+
+  private int windowWidth = 600;
+
+  private int windowHeight = 370;
+
+  private IWindow window = null;
+
+  private PreviewPanel previewPanel = null;
+
+  private ROIMaskPreview processPreview = null;
+
+  private ROIMaskPanel panel = null;
+
+  private CreateNewLayerPanel newLayerPanel = null;
+
+  private static final Logger logger = LoggerFactory
+      .getLogger(ROIMaskExtension.class);
+
+  public void initialize() {
+
+    // Adds an entry to the TOC's floating menu to those layers defined in this
+    // extension
+
+    // ExtensionPoint exPoint =
+    // ToolsLocator.getExtensionPointManager().add("My_TocActions");
+    // exPoint.append("MyMenuEntry", "", new ROIMaskTocMenuEntry());
+
+    // Adds a new tab to the "add layer" dialog
+
+    // AddLayer.addWizard(ROIMaskWizard.class);
+
+    // Adds a new button in the raster bar
+
+    ExtensionPointManager extensionPoints = ToolsLocator
+        .getExtensionPointManager();
+    ExtensionPoint point = extensionPoints.add("GenericToolBarMenu");
+    point.append("ROIMask", "", ROIMaskTocMenuEntry.getSingleton());
+    ROIMaskTocMenuEntry.setExtension(this);
+
+    Messages.addResourceFamily("org.gvsig.raster.roimask.app.i18n.text",
+        ROIMaskExtension.class.getClassLoader(), ROIMaskExtension.class
+            .getClass().getName());
+
+    initilizeIcons();
+  }
+
+  public void postInitialize() {
+    new ToolboxROIMaskLoader().registerTool();
+  }
+
+  public void execute(String actionCommand) {
+    if (actionCommand.compareTo("ROIMask") == 0) {
+      if (getSelectedLayer() == null) {
+        RasterSwingLibrary.messageBoxError("layer_not_selected", null);
+        return;
+      }
+      try {
+        initializeMainPanel();
+      }
+      catch (ReadException e) {
+        logger.error("Error initializing the main panel", e);
+      }
+      catch (ROIException e) {
+        logger.error("Error getting ROI", e);
+      }
+    }
+  }
+
+  /**
+   * Creates and initializes the main panel
+   *
+   * @throws ReadException
+   * @throws ROIException
+   */
+  private void initializeMainPanel() throws ReadException, ROIException {
+    try {
+      loadROIMaskPanel();
+    }
+    catch (NotInitializeException e) {
+      throw new ReadException("Error loading the table", e);
+    }
+
+    MainPanel mainPanel = new MainPanel(getROIMaskPanel().getComponent(),
+        (JComponent) getNewLayerPanel());
+
+    window = new ROIMaskWindow(mainPanel, (JPanel) getPreviewPanel(),
+        Messages.getText("roimask"), windowWidth, windowHeight, false, this);
+
+    PluginServices.getMDIManager().addWindow(window);
+    getPreviewPanel().previewInitializeSizes();
+    getPreviewPanel().refreshPreview();
+  }
+
+  /**
+   * Loads the main panel with the data
+   *
+   * @throws NotInitializeException
+   * @throws ROIException
+   */
+  private void loadROIMaskPanel() throws NotInitializeException, ROIException {
+    FLyrRaster lyr = getSelectedLayer();
+    LayerElement element = new LayerElement(lyr);
+    getROIMaskPanel().getDataModel().setInputLayer(element);
+    ColorInterpretation ci = lyr.getDataStore().getColorInterpretation();
+
+    if (ci.isRGB() || ci.isRGBA()) {
+      getROIMaskPanel().activeSlider(true);
+    }
+    else
+      getROIMaskPanel().activeSlider(false);
+
+    if (lyr.getRois() == null || lyr.getRois().size() == 0)
+      getROIMaskPanel().showWarning(true);
+    else
+      getROIMaskPanel().showWarning(false);
+
+    getROIMaskPanel().getDataModel().clearROIs();
+
+    List<ROI> roisArray = lyr.getRois();
+    if (roisArray != null) {
+      for (int i = 0; i < roisArray.size(); i++) {
+        ROI roi = (ROI) roisArray.get(i);
+
+        Object row[] = { "", "", "" };
+
+        boolean active = false;
+
+        row[0] = new Boolean(active);
+        row[1] = roi.getName();
+        row[2] = new Integer(i);
+        getROIMaskPanel().getDataModel().addROI(row);
+      }
+    }
+
+    if (lyr != null) {
+      switch (lyr.getDataStore().getDataType()[0]) {
+        case Buffer.TYPE_BYTE:
+          getROIMaskPanel().getDataModel().setValueNoData(
+              RasterLibrary.defaultByteNoDataValue);
+          break;
+        case Buffer.TYPE_SHORT:
+          getROIMaskPanel().getDataModel().setValueNoData(
+              RasterLibrary.defaultShortNoDataValue);
+          break;
+        case Buffer.TYPE_INT:
+          getROIMaskPanel().getDataModel().setValueNoData(
+              RasterLibrary.defaultIntegerNoDataValue);
+          break;
+        case Buffer.TYPE_FLOAT:
+          getROIMaskPanel().getDataModel().setValueNoData(
+              RasterLibrary.defaultFloatNoDataValue);
+          break;
+        case Buffer.TYPE_DOUBLE:
+          getROIMaskPanel().getDataModel().setValueNoData(
+              RasterLibrary.defaultDoubleNoDataValue);
+          break;
+      }
+    }
+  }
+
+  /**
+   * Gets the list of layers from the gvSIG view
+   *
+   * @return
+   */
+  private FLayers getLayers() {
+    MapControl mapControl = null;
+    IWindow[] windowList = PluginServices.getMDIManager().getOrderedWindows();
+    for (int i = 0; i < windowList.length; i++) {
+      if (windowList[i] instanceof AbstractViewPanel) {
+        mapControl = ((AbstractViewPanel) windowList[i]).getMapControl();
+        break;
+      }
+    }
+    if (mapControl != null) return mapControl.getMapContext().getLayers();
+    return null;
+  }
+
+  /**
+   * Gets the selected layer
+   *
+   * @return
+   */
+    private FLyrRaster getSelectedLayer() {
+        FLayers lyrs = getLayers();
+        if (lyrs != null) {
+            for (int i = 0; i < lyrs.getLayersCount(); i++) {
+                FLayer lyr = lyrs.getLayer(i);
+                if (lyr.isActive() && lyr instanceof FLyrRaster)
+                    return (FLyrRaster) lyr;
+            }
+        }
+        return null;
+    }
+
+  public boolean isEnabled() {
+    FLyrRaster selectedLayer = getSelectedLayer();
+    if (selectedLayer == null) return false;
+
+    if (selectedLayer != null && selectedLayer.isActive()
+        && selectedLayer instanceof FLyrRaster) {
+      return true;
+    }
+    return false;
+  }
+
+  public boolean isVisible() {
+    FLyrRaster selectedLayer = getSelectedLayer();
+    if (selectedLayer == null)
+      return false;
+
+    if (!(selectedLayer instanceof IRasterLayerActions))
+      return false;
+
+    return ((IRasterLayerActions) selectedLayer).isActionEnabled(IRasterLayerActions.ENHANCED);
+  }
+
+  void initilizeIcons() {
+    IconThemeHelper.registerIcon(null, "gvsig-icon", this);
+    IconThemeHelper.registerIcon(null, "mask-icon", this);
+    IconThemeHelper.registerIcon(null, "gvsig-icon16x16", this);
+  }
+
+  /**
+   * Gets the {@link ROIMaskPanel}
+   *
+   * @return {@link ROIMaskPanel}
+   */
+  private CreateNewLayerPanel getNewLayerPanel() {
+    if (newLayerPanel == null)
+      newLayerPanel = RasterSwingLocator.getSwingManager().createNewLayerPanel(
+          Messages.getText("create_output_layer"));
+    return newLayerPanel;
+  }
+
+  /**
+   * Gets the {@link PreviewPanel}
+   *
+   * @return {@link PreviewPanel}
+   */
+  private PreviewPanel getPreviewPanel() {
+    if (previewPanel == null)
+      previewPanel = RasterSwingLocator.getSwingManager()
+          .createSinglePreviewPanel(null, getDataSourcePreview());
+    return previewPanel;
+  }
+
+  /**
+   * Gets the {@link ROIMaskPreview}
+   *
+   * @return {@link ROIMaskPreview}
+   */
+  private ROIMaskPreview getDataSourcePreview() {
+    if (processPreview == null) {
+      processPreview = new ROIMaskPreview();
+    }
+    processPreview.setData(getROIMaskPanel().getDataModel());
+    return processPreview;
+  }
+
+  /**
+   * Gets the {@link ROIMaskPanel}
+   *
+   * @return {@link ROIMaskPanel}
+   */
+  private ROIMaskPanel getROIMaskPanel() {
+    if (panel == null) {
+      panel = ROIMaskSwingLocator.getSwingManager().createROIMaskPanel();
+      panel.addListener(this);
+    }
+    return panel;
+  }
+
+  public void actionPerformed(ActionEvent e) {
+    if (window != null
+        && (e.getSource() == ((ROIMaskWindow) window).getButtonsPanel()
+            .getButton(ButtonsPanel.BUTTON_ACCEPT) || e.getSource() == ((ROIMaskWindow) window)
+            .getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY))) {
+      DataProcess task = null;
+      try {
+        task = RasterBaseAlgorithmLibrary.getManager().createRasterTask(
+            "ROIMaskProcess");
+      }
+      catch (ProcessException e1) {
+        RasterSwingLibrary.messageBoxError("error_processing_layer", null, e1);
+      }
+      task.setActions(this);
+      try {
+        getDataSourcePreview().addParams(task,
+            getNewLayerPanel().getDirectorySelected(),
+            getNewLayerPanel().getFileSelected());
+      }
+      catch (ROIException e1) {
+        RasterSwingLibrary.messageBoxError("error_processing_layer", null, e1);
+      }
+      task.start();
+      return;
+    }
+
+    getPreviewPanel().refreshPreview();
+  }
+
+  @SuppressWarnings("unchecked")
+  public void end(Object params) {
+    if (params instanceof HashMap<?, ?>) {
+      HashMap<String, Object> map = (HashMap<String, Object>) params;
+      String fName = (String) map.get(ROIMaskProcess.FILENAME);
+      long milis = (Long) map.get(ROIMaskProcess.TIME);
+      processFinalize(fName, milis);
+      RasterSwingLocator.getSwingManager().showSummaryProcessDialog(fName,
+          milis);
+    }
+  }
+
+  private void processFinalize(String fileName, long milis) {
+    if (!new File(fileName).exists()) return;
+
+    String viewName = getViewName();
+    if (viewName != null) {
+      if (RasterSwingLibrary.messageBoxYesOrNot("cargar_toc", this)) {
+        try {
+          RasterMainPluginUtils.loadLayer(viewName, fileName, null);
+        }
+        catch (RasterNotLoadException e) {
+          RasterSwingLibrary.messageBoxError("error_load_layer", null, e);
+        }
+      }
+    }
+  }
+
+  private String getViewName() {
+    FLyrRaster lyrRaster = getSelectedLayer();
+    IWindow[] w = PluginServices.getMDIManager().getAllWindows();
+    for (int i = 0; i < w.length; i++) {
+      if (w[i] instanceof AbstractViewPanel) {
+        FLayers lyrs = ((AbstractViewPanel) w[i]).getMapControl()
+            .getMapContext().getLayers();
+        for (int j = 0; j < lyrs.getLayersCount(); j++) {
+          FLayer lyr = lyrs.getLayer(j);
+          if (lyrRaster == lyr) {
+            return PluginServices.getMDIManager()
+                .getWindowInfo((AbstractViewPanel) w[i]).getTitle();
+          }
+        }
+      }
+    }
+    return null;
+  }
+
+  public void interrupted() {
+
+  }
+
+  public class LayerElement {
+
+    private FLayer lyr = null;
+
+    public LayerElement(FLayer lyr) {
+      this.lyr = lyr;
+    }
+
+    public FLayer getLayer() {
+      return lyr;
+    }
+
+    public String toString() {
+      return lyr.getName();
+    }
+
+    public int getNumOfElements() {
+      if (lyr instanceof FLyrRaster)
+        return ((FLyrRaster) lyr).getDataStore().getBandCount();
+      return 0;
+    }
+  }
+
+  public void updateProgress(int current, int total) {
+    // TODO Auto-generated method stub
+
+  }
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskTocMenuEntry.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskTocMenuEntry.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskTocMenuEntry.java	(revision 15576)
@@ -0,0 +1,77 @@
+package org.gvsig.raster.roimask.app;
+
+import javax.swing.Icon;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
+import org.gvsig.app.project.documents.view.toc.ITocItem;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.fmap.layers.IRasterLayerActions;
+import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem;
+
+public class ROIMaskTocMenuEntry extends AbstractTocContextMenuAction implements IGenericToolBarMenuItem {
+	static private ROIMaskTocMenuEntry singleton  = null;
+	private static Extension                     extension  = null;
+	
+	
+	public static void setExtension(Extension ext) {
+		extension = ext;
+	}
+
+	private ROIMaskTocMenuEntry() {}
+
+	static public ROIMaskTocMenuEntry getSingleton() {
+		if (singleton == null)
+			singleton = new ROIMaskTocMenuEntry();
+		return singleton;
+	}
+	
+	public String getGroup() {
+		return "Enhanced";
+	}
+
+	public int getGroupOrder() {
+		return 55;
+	}
+
+	public int getOrder() {
+		return 0;
+	}
+
+	public String getText() {
+		return Messages.getText("roimask");
+	}
+
+	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
+		if(selectedItems == null || selectedItems.length == 0)
+			return false;
+		for (int i = 0; i < selectedItems.length; i++) {
+			if(selectedItems[i] != null && 
+				selectedItems[i].isActive() && 
+				selectedItems[i] instanceof FLyrRaster)
+				return true;
+		}
+		return false;
+	}
+
+	public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
+    if ((selectedItems == null) || (selectedItems.length != 1))
+      return false;
+
+    if (!(selectedItems[0] instanceof IRasterLayerActions))
+      return false;
+
+    return ((IRasterLayerActions) selectedItems[0]).isActionEnabled(IRasterLayerActions.ENHANCED);
+  }
+
+	public void execute(ITocItem item, FLayer[] selectedItems) {
+		extension.execute("ROIMask");
+	}
+	
+	public Icon getIcon() {
+		return IconThemeHelper.getImageIcon("mask-icon");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskTocMenuEntry.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/MainPanel.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/MainPanel.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/MainPanel.java	(revision 15576)
@@ -0,0 +1,29 @@
+package org.gvsig.raster.roimask.app;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+public class MainPanel extends JPanel {
+	private static final long serialVersionUID = 1L;
+
+	public MainPanel(JComponent panel, JComponent createLayer) {
+		setLayout(new GridBagLayout());
+		GridBagConstraints gbc = new GridBagConstraints();
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.fill = GridBagConstraints.BOTH;
+		gbc.weightx = 1;
+		gbc.weighty = 1;
+		gbc.gridy = 0;
+		add(panel, gbc);
+		
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.weightx = 1;
+		gbc.weighty = 0;
+		gbc.gridy = 1;
+		
+		add(createLayer, gbc);
+	}
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/MainPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ROIMaskToolboxAction.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ROIMaskToolboxAction.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ROIMaskToolboxAction.java	(revision 15576)
@@ -0,0 +1,76 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2012 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+
+package org.gvsig.raster.roimask.app.toolbox;
+
+import javax.swing.ImageIcon;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.geoprocess.sextante.gui.core.GUIFactory;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.roimask.app.ROIMaskTocMenuEntry;
+
+/**
+ * Input in Sextante framework for clip tool
+ * 
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public class ROIMaskToolboxAction extends AbstractToolboxAction {
+	
+	public ROIMaskToolboxAction() {
+		ImageIcon ico = IconThemeHelper.getImageIcon("gvsig-icon16x16");
+		GUIFactory.registerExternalTool(Messages.getText("gv_tools"), ico, this);
+	}
+	
+	@Override
+	public void execute() {
+		if(!super.loadLayer())
+			return;
+		
+		ROIMaskTocMenuEntry.getSingleton().execute(null, new FLayer[]{lyr}); 
+	}
+
+	@Override
+	public String getName() {
+		return Messages.getText("roimask");
+	}
+
+	public ImageIcon getIcon() {
+		return (ImageIcon)ROIMaskTocMenuEntry.getSingleton().getIcon();
+	}
+	
+	public boolean isPluginInstalled() {
+		try {
+			ROIMaskTocMenuEntry.getSingleton();
+		} catch(Exception e) {
+			return false;
+		} catch(Error e) {
+			return false;
+		}
+		return true;
+	}
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ROIMaskToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ToolboxROIMaskLoader.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ToolboxROIMaskLoader.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ToolboxROIMaskLoader.java	(revision 15576)
@@ -0,0 +1,42 @@
+package org.gvsig.raster.roimask.app.toolbox;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Loader for this tool in the toolbox dialog
+ * 
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public class ToolboxROIMaskLoader {
+	private Logger log      = LoggerFactory.getLogger(ToolboxROIMaskLoader.class); 
+	private String errorMsg = "The tool ROIMask are not been added in the toolbox";
+
+	public void registerTool() {
+		try {
+			Class<?> c = Class.forName("org.gvsig.raster.roimask.app.toolbox.ROIMaskToolboxAction");
+			Constructor<?> constructor = c.getConstructor();
+			constructor.newInstance();
+		} catch (ClassNotFoundException e) {
+			log.info(errorMsg, e);
+		} catch (SecurityException e) {
+			log.info(errorMsg, e);
+		} catch (NoSuchMethodException e) {
+			log.info(errorMsg, e);
+		} catch (IllegalArgumentException e) {
+			log.info(errorMsg, e);
+		} catch (InstantiationException e) {
+			log.info(errorMsg, e);
+		} catch (IllegalAccessException e) {
+			log.info(errorMsg, e);
+		} catch (InvocationTargetException e) {
+			log.info(errorMsg, e);
+		} catch (NoClassDefFoundError e) {
+			log.info("Geoprocess are not installed." + errorMsg, e);
+		}
+	}
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/ToolboxROIMaskLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/AbstractToolboxAction.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/AbstractToolboxAction.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/AbstractToolboxAction.java	(revision 15576)
@@ -0,0 +1,122 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2012 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.raster.roimask.app.toolbox;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.geoprocess.lib.sextante.dataObjects.FLyrRasterIRasterLayer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+/**
+ * Base class for toolBox actions
+ *
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public abstract class AbstractToolboxAction extends ToolboxAction {
+	protected FLyrRaster             lyr = null;
+
+	@Override
+	public String getGroup() {
+		return Messages.getText("group_tools");
+	}
+
+
+	@Override
+	public boolean isActive() {
+		IWindow[] windows = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < windows.length; i++) {
+			if(windows[i] instanceof AbstractViewPanel) {
+				FLayers lyrs = ((AbstractViewPanel)windows[i]).getMapControl().getMapContext().getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					if(lyrs.getLayer(j) instanceof FLyrRaster)
+						return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Returns true if the plugin which gives the functionality is installed
+	 * in gvSIG
+	 * @return
+	 */
+	public abstract boolean isPluginInstalled();
+
+	/**
+	 * Loads the raster layer for the tool
+	 * @return
+	 */
+	public boolean loadLayer() {
+		if(!isPluginInstalled()) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("plugin_not_installed"), null);
+			return false;
+		}
+
+		if(!isActive()) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("layer_not_valid"), null);
+			return false;
+		}
+
+		boolean existsRasterButNotActive = false;
+		lyr = null;
+		IWindow[] windows = PluginServices.getMDIManager().getOrderedWindows();
+		MapContext mapCtx = null;
+		for (int i = 0; i < windows.length; i++) {
+			if(windows[i] instanceof AbstractViewPanel) {
+				mapCtx = ((AbstractViewPanel)windows[i]).getMapControl().getMapContext();
+				break;
+			}
+		}
+
+		IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+		for (int i = 0; i < layers.length; i++) {
+			FLyrRaster l = (FLyrRaster)((FLyrRasterIRasterLayer)layers[i]).getBaseDataObject();
+			existsRasterButNotActive = true;
+			if(l.isActive() && mapCtx == l.getMapContext()) {
+				existsRasterButNotActive = false;
+				lyr = l;
+				break;
+			}
+		}
+
+		if(existsRasterButNotActive) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("raster_layer_not_active"), null);
+			return false;
+		}
+
+		return true;
+	}
+
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox/AbstractToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/toolbox
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskPreview.java
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskPreview.java	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskPreview.java	(revision 15576)
@@ -0,0 +1,255 @@
+package org.gvsig.raster.roimask.app;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.datastruct.NoData;
+import org.gvsig.fmap.dal.coverage.exception.FilterTypeException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.ROIException;
+import org.gvsig.fmap.dal.coverage.grid.RasterFilter;
+import org.gvsig.fmap.dal.coverage.grid.RasterFilterList;
+import org.gvsig.fmap.dal.coverage.grid.render.ImageDrawer;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.fmap.dal.coverage.store.props.Transparency;
+import org.gvsig.gui.beans.imagenavigator.ImageUnavailableException;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.algorithm.process.ProcessParamsManagement;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.roi.ROI;
+import org.gvsig.raster.roimask.algorithm.ROIMaskProcess;
+import org.gvsig.raster.roimask.app.ROIMaskExtension.LayerElement;
+import org.gvsig.raster.roimask.swing.ROIMaskData;
+import org.gvsig.raster.swing.preview.DataSourcePreview;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("deprecation")
+public class ROIMaskPreview implements DataSourcePreview {
+	private FLyrRaster              inputLyr          = null;
+	private Extent                  bbox              = null;
+	private ROIMaskData             data              = null;
+	private static final Logger     logger            = LoggerFactory.getLogger(ROIMaskPreview.class);
+	
+	
+	public void setData(ROIMaskData data) {
+		this.data = data;
+		loadLayers();
+	}
+	
+	private void loadLayers() {
+		if(data == null)
+			return;
+		Object obj = data.getInputLayer();
+		if(obj != null)
+			inputLyr = (FLyrRaster)((LayerElement)data.getInputLayer()).getLayer();
+		if(inputLyr != null)
+			bbox = inputLyr.getFullRasterExtent();		
+	}
+	
+	public void closePreviewLayer() {
+		
+	}
+
+	public double getCellSize() {
+		if(inputLyr != null)
+			return inputLyr.getDataStore().getCellSize();
+		return 1;
+	}
+	
+	public DataSourcePreview cloneDataSourcePreview() {
+		return this;
+	}
+
+	public void popStatus() {
+	}
+
+	public void pushStatus() {
+	}
+	
+	public void draw(BufferedImage image, Graphics2D g, double[] coords, int w, int h, Cancellable cancel, double scale) throws ImageUnavailableException {
+		//Posición de inicio dibujado dentro del Graphics
+		int x = 0;
+		int y = 0;
+		//Coordenadas de la petición
+		double iniX = coords[0];
+		double iniY = coords[1];
+		double endX = coords[2];
+		double endY = coords[3];
+		
+		//Se ajustan las coordenadas de petición, ancho y alto en coordenadas píxel, 
+		//así como la coordenada de inicio de dibujado 
+		if(bbox.getULX() > coords[0]) {
+			iniX = bbox.getULX();
+			x = (int)(((iniX - coords[0]) * w) / Math.abs(coords[2] - coords[0]));
+		}
+				
+		if(bbox.getULY() < coords[1]) {
+			iniY = bbox.getULY();
+			y = (int)(((coords[1] - iniY) * h) / Math.abs(coords[3] - coords[1]));
+		}
+		
+		if(bbox.getLRX() < coords[2]) 
+			endX = bbox.getLRX();
+		
+		if(bbox.getLRY() > coords[3]) 
+			endY = bbox.getLRY();
+		
+		if(iniX != coords[0] || endX != coords[2]) {
+			w = (int)((Math.abs(endX - iniX) * w) / Math.abs(coords[2] - coords[0]));
+		}
+		
+		if(iniY != coords[1] || endY != coords[3]) {
+			h = (int)((Math.abs(iniY - endY) * h) / Math.abs(coords[3] - coords[1]));
+		}
+		
+		Extent ext = RasterLocator.getManager().getDataStructFactory().createExtent(iniX, iniY, endX, endY);
+		BufferedImage img = throwProcess(ext, w, h);
+		g.drawImage(img, x, y, null);
+	}
+	
+	/**
+	 * Throws the process sequentially. Since the preview is small,
+	 * it should not taken a lot of time
+	 * is small
+	 * @param ext
+	 * @param w
+	 * @param h
+	 * @return
+	 */
+	private BufferedImage throwProcess(Extent ext, int w, int h) {
+		loadLayers();
+		
+		DataProcess task;
+		try {
+			task = RasterBaseAlgorithmLibrary.getManager().createRasterTask("ROIMaskProcess");
+			task.addParam(ROIMaskProcess.RASTER_STORE1, inputLyr.getDataStore());
+			
+			task.addParam(ProcessParamsManagement.PREVIEW, true);
+			task.addParam(ProcessParamsManagement.WINDOW, ext);
+			task.addParam(ProcessParamsManagement.OUTPUT_WIDTH, w);
+			task.addParam(ProcessParamsManagement.OUTPUT_HEIGHT, h);
+			
+			task.addParam(ROIMaskProcess.ROIS, getROIsSelected());
+			task.addParam(ROIMaskProcess.ALPHA, data.getAlpha());
+			task.addParam(ROIMaskProcess.INVERSE, data.isInverse());
+			task.addParam(ROIMaskProcess.NODATA, getNoDataSelected());
+		} catch (ProcessException e1) {
+			logger.debug("Error creating task", e1);
+			return null;
+		} catch (ROIException e) {
+			logger.debug("Error creating task", e);
+			return null;
+		}
+		
+		task.init();
+		try {
+			task.process();
+		} catch (ProcessInterruptedException e1) {
+			return null;
+		} catch (ProcessException e) {
+			logger.debug("Error in process");
+			return null;
+		}
+		
+		HashMap<String, Object> map = (HashMap<String, Object>)task.getResult();
+		Buffer buf = (Buffer)map.get(ROIMaskProcess.BUFFER);
+		buf.setDataExtent(ext.toRectangle2D());
+		
+		ColorInterpretation ci = inputLyr.getDataStore().getColorInterpretation();
+		Transparency transparency = null;
+		if(ci.isRGB() || ci.isRGBA()) {
+			Integer alphaBandNumber = (Integer)map.get(ROIMaskProcess.ALPHA_BAND);
+			transparency = RasterLocator.getManager().getDataStructFactory().createTransparency(buf.getBandCount());
+			transparency.setTransparencyBand(alphaBandNumber);
+			transparency.activeTransparency();
+		}
+		
+		ImageDrawer drawer = RasterLocator.getManager().createImageDrawerService();
+		drawer.setBuffer(buf);
+		drawer.setLastTransparency(transparency);
+		try {
+			applyFiltersToPreview(drawer);
+			
+			return (BufferedImage)drawer.drawBufferOverImageObject();
+		} catch (ProcessInterruptedException e) {
+			return null;
+		} 
+    }
+	
+	/**
+	 * Adds filters to the preview. If the original render has a color table
+	 * , a generic enhanced will be added.
+	 * @param drawer
+	 */
+	private void applyFiltersToPreview(ImageDrawer drawer) {
+		RasterFilterList filterList = inputLyr.getRender().getFilterList();
+		List<RasterFilter> list = new ArrayList<RasterFilter>();
+		if(filterList.lenght() > 0) {
+			for (int i = 0; i < filterList.lenght(); i++) {
+				RasterFilter rf = filterList.get(i);
+				if(rf.getName().equals("colortable")) {
+					drawer.addEnhanced(inputLyr.getDataStore().getStatistics(), true, 0.2);
+					return;
+				}
+				list.add(rf);
+			}
+		}
+		try {
+			drawer.addFilters(inputLyr.getDataStore().getStatistics(), list);
+		} catch (FilterTypeException e) {
+			logger.debug("Tirando sin filtros", e);
+		}
+	}
+	
+	private NoData getNoDataSelected() {
+		NoData nodata = RasterLocator.getManager().getDataStructFactory().createDefaultNoData(
+				inputLyr.getDataStore().getBandCount(), inputLyr.getDataStore().getDataType()[0]);
+		nodata.setValue(data.getValueNoData());
+		return nodata;
+	}
+	
+	private ROI[] getROIsSelected() throws ROIException {
+		List<ROI> roi = inputLyr.getRois();
+		boolean[] roisSelected = data.getROIsSelected();
+		List<ROI> roisToDraw = new ArrayList<ROI>(); 
+		for (int i = 0; i < roisSelected.length; i++) {
+			if(roisSelected[i])
+				roisToDraw.add(roi.get(i));
+		}
+		return roisToDraw.toArray(new ROI[0]);
+	}
+	
+	public Object getSource() {
+		return null;
+	}
+
+	public Rectangle2D getBBoxRectangle() {
+		if(inputLyr != null)
+			return inputLyr.getFullRasterExtent().toRectangle2D();
+		return new Rectangle2D.Double();
+	}
+
+	public void addParams(DataProcess task, String path, String fileName) throws ROIException {
+		if(!fileName.matches("([*]\\.[???])")) {
+			fileName += ".tif";
+		}
+		task.addParam(ROIMaskProcess.PATH, path + File.separator + fileName);
+		task.addParam(ROIMaskProcess.RASTER_STORE1, inputLyr.getDataStore());
+		task.addParam(ROIMaskProcess.ROIS, getROIsSelected());
+		task.addParam(ROIMaskProcess.ALPHA, data.getAlpha());
+		task.addParam(ROIMaskProcess.INVERSE, data.isInverse());
+		task.addParam(ROIMaskProcess.NODATA, getNoDataSelected());
+	}
+}

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskPreview.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/config.xml	(revision 15576)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.raster.mainplugin" />
+	
+	<depends plugin-name="org.gvsig.geoprocess.app.mainplugin" optional="true" />
+	<depends plugin-name="org.gvsig.geoprocess.app.algorithm" optional="true" />
+	
+	<resourceBundle name="text"/>
+	<libraries library-dir="lib"/>
+	<extensions>
+		<extension class-name="org.gvsig.raster.roimask.app.ROIMaskExtension"
+			description="" 
+			active="true" 
+			priority="1">
+			
+			<menu text="Layer/enhanced/roimask"
+				name="ROIMask"/>
+				
+			<action 
+        		name="ROIMask"
+        		label="roimask"
+        		action-command="ROIMask" 
+        		icon="mask-icon"
+        		position="000601720"
+        		accelerator=""
+        	/>        	
+		</extension>	
+	</extensions>
+</plugin-config>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/gvsig-icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/gvsig-icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/action
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/cursor
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/gvsig-icon16x16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/gvsig-icon16x16.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/mask-icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images/mask-icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/images
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/install/files
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/install
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_eu.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_it.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text.properties	(revision 15576)
@@ -0,0 +1,7 @@
+roimask=M\u00e1scara por regi\u00f3n de inter\u00e9s
+applying_mask=Aplicando m\u00e1scara
+mask_process=Proceso de m\u00e1scara
+gv_tools=gvSIG Herramientas
+group_tools=Capas raster
+raster_layer_not_active=Esta herramienta necesita una capa raster seleccionada en la vista
+create_output_layer=Crear capa de salida
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_zh.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_en.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_en.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_en.properties	(revision 15576)
@@ -0,0 +1,7 @@
+roimask=Mask by region of interest
+applying_mask=Applying mask
+mask_process=Mask process
+gv_tools=gvSIG Tools
+group_tools=Tools for raster layers
+raster_layer_not_active=This tool needs a raster layer selected in the view
+create_output_layer=Create output layer
\ No newline at end of file

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_gl.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_ca.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_pt.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_cs.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_fr.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_de.properties
===================================================================

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app/i18n
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask/app
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster/roimask
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig/raster
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org/gvsig
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin/org
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/resources-plugin
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/pom.xml	(revision 15576)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask.app.client</artifactId>
+	<packaging>jar</packaging>
+	<name>Raster mask by ROI</name>
+	<description>Raster mask by ROI</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.roimask.app</artifactId>
+		<version>2.2.155</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.lib.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.lib.impl</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.swing.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.swing.impl</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.algorithm</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.roimask.toolbox.algorithm</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.app.mainplugin</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.app.common</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.impl</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.fmap</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.control</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.utils</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.ui</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.symbology.lib.impl</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    <!--
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    -->
+        <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.geoprocess.lib.sextante</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.geoprocess.app.mainplugin</artifactId>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+	
+	<properties>
+    	<gvsig.package.info.state>final</gvsig.package.info.state>
+    	<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool</gvsig.package.info.poolURL>
+        <gvsig.package.info.dependencies>required: org.gvsig.raster.mainplugin -ge 2</gvsig.package.info.dependencies>
+        <gvsig.package.info.categories>Raster</gvsig.package.info.categories>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+    </properties>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/buildNumber.properties
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/buildNumber.properties	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/buildNumber.properties	(revision 15576)
@@ -0,0 +1,2 @@
+#Fri Nov 26 01:19:27 CET 2021
+buildNumber=162

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/buildNumber.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
target



Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/org.gvsig.raster.roimask.app
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath


Index: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/pom.xml
===================================================================
--- org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/pom.xml	(revision 0)
+++ org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/pom.xml	(revision 15576)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.roimask</artifactId>
+	<packaging>pom</packaging>
+	<version>2.2.155</version>
+	<name>${project.artifactId}</name>
+	<description />
+	<inceptionYear>2011</inceptionYear>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.343</version>
+  </parent>
+
+
+        <properties>
+            <!-- El plugin versions:use-latest-versions falla con scope import -->
+            <!-- asi que toca usar el versions:update-properties que si que funciona -->
+            <org.gvsig.raster.version>2.2.174</org.gvsig.raster.version>
+            <org.gvsig.geoprocess.version>2.2.183</org.gvsig.geoprocess.version>
+        </properties>
+
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155</url>
+    </scm>
+
+    <repositories>
+      <repository>
+        <id>gvsig-public-http-repository</id>
+        <name>gvSIG maven public HTTP repository</name>
+        <url>http://devel.gvsig.org/m2repo/j2se</url>
+        <releases>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </snapshots>
+      </repository>
+    </repositories>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.roimask/tags/</tagBase>
+                    <goals>deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+	<dependencyManagement>
+		<dependencies>
+                        <dependency>
+                                <groupId>org.gvsig</groupId>
+                                <artifactId>org.gvsig.raster</artifactId>
+                                <version>${org.gvsig.raster.version}</version>
+                                <type>pom</type>
+                                <scope>import</scope>
+                        </dependency>
+
+                        <dependency>
+                                <groupId>org.gvsig</groupId>
+                                <artifactId>org.gvsig.geoprocess</artifactId>
+                                <version>${org.gvsig.geoprocess.version}</version>
+                                <type>pom</type>
+                                <scope>import</scope>
+                        </dependency>
+
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.lib.api</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.lib.impl</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.swing.api</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.swing.impl</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.algorithm</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.toolbox.algorithm</artifactId>
+				<version>2.2.155</version>
+			</dependency>
+			<!--
+ 			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.roimask.toolbox</artifactId>
+				<version>2.2.3-SNAPSHOT</version>
+			</dependency>
+			-->
+
+		</dependencies>
+	</dependencyManagement>
+	<modules>
+		<module>org.gvsig.raster.roimask.algorithm</module>
+		<module>org.gvsig.raster.roimask.toolbox.algorithm</module>
+		<module>org.gvsig.raster.roimask.lib</module>
+		<module>org.gvsig.raster.roimask.swing</module>
+		<module>org.gvsig.raster.roimask.app</module>
+	</modules>
+</project>

Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.roimask/tags/org.gvsig.raster.roimask-2.2.155
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.classpath
.pom.xml.swp


