Index: FirstDerivativeOperation.java
===================================================================
--- FirstDerivativeOperation.java	(revision 43863)
+++ FirstDerivativeOperation.java	(revision 43864)
@@ -89,7 +89,7 @@
      *
      */
     public FirstDerivativeOperation(OperationFactory factory) {
-        this.factory = factory;
+        super(factory);
     }
 
     @Override
@@ -97,12 +97,8 @@
         super.preProcess();
         BufferManager manager = BufferLocator.getBufferManager();
 
-        if(this.parameters.getDynClass().getDynField(OPERATOR_PARAM)!=null) {
-            operator = (String)this.parameters.getDynValue(OPERATOR_PARAM);
-        } else {
-            operator = SOBEL_OPERATOR_STRING;
-        };
-
+        operator = (String) this.getParameter(OPERATOR_PARAM, SOBEL_OPERATOR_STRING);
+        
         switch (operator) {
         case SOBEL_OPERATOR_STRING:
             operatorH = manager.createKernel(sobelH);
@@ -122,50 +118,34 @@
             break;
         }
 
-        if(this.parameters.getDynClass().getDynField(COMPARE_PARAM)!=null) {
-            compare = (Boolean)this.parameters.getDynValue(COMPARE_PARAM);
-        } else {
-            compare = false;
-        };
-        if(this.parameters.getDynClass().getDynField(UMBRAL_PARAM)!=null) {
-            umbral = (Integer)this.parameters.getDynValue(UMBRAL_PARAM);
-        } else {
-            umbral = 0;
-        };
+        compare = (boolean) this.getParameter(COMPARE_PARAM, false);
+        umbral = (int) this.getParameter(UMBRAL_PARAM, 0);
 
-        int bands = this.buffer.getBandCount();
-        NoData[] noData = this.buffer.getBandNoData();
-        if (copyUnprocessedBands) {
+        int bands = this.getInputBuffer().getBandCount();
+        NoData[] noData = this.getInputBuffer().getBandNoData();
+        if (mustCopyUnprocessedBands()) {
             try {
-                this.outputBuffer =
-                    manager.createBuffer(this.buffer.getRows(), this.buffer.getColumns(), this.buffer.getBandTypes(),
-                        this.buffer.getBandNoData(), this.buffer.getProjection(), this.buffer.getEnvelope());
+                this.setOutputBuffer(
+                    manager.createBuffer(
+                            this.getInputBuffer().getRows(), 
+                            this.getInputBuffer().getColumns(), 
+                            this.getInputBuffer().getBandTypes(),
+                            this.getInputBuffer().getBandNoData(), 
+                            this.getInputBuffer().getProjection(), 
+                            this.getInputBuffer().getEnvelope()));
             } catch (LocatorException | BufferException | CreateEnvelopeException e) {
                 throw new ProcessingOperationException(e);
             }
         } else {
-            List<NoData> noDatas = new ArrayList<NoData>();
-            List<Integer> types = new ArrayList<Integer>();
-            for (int band = 0; band < bands; band++) {
-                if (isProcessableBand(band)) {
-                    if(this.buffer.getBandNoData()[band].isDefined()){
-                        noDatas.add(manager.createNoData(0, 0));
-                    } else {
-                        noDatas.add(null);
-                    }
-                    types.add(BufferManager.TYPE_BYTE);
-                }
-            }
-            int[] typesInt = new int[types.size()];
-            for (Iterator<Integer> iterator = types.iterator(); iterator.hasNext();) {
-                int i = 0;
-                Integer type = (Integer) iterator.next();
-                typesInt[i] = type.intValue();
-            }
             try {
-                this.outputBuffer =
-                    manager.createBuffer(this.buffer.getRows(), this.buffer.getColumns(), typesInt,
-                        noDatas.toArray(new NoData[0]), this.buffer.getProjection(), this.buffer.getEnvelope());
+                this.setOutputBuffer(
+                    manager.createBuffer(
+                            this.getInputBuffer().getRows(), 
+                            this.getInputBuffer().getColumns(), 
+                            this.getProcessableBandTypesAsArray(),
+                            this.getProcessableBandNoDatasAsArray(), 
+                            this.getInputBuffer().getProjection(), 
+                            this.getInputBuffer().getEnvelope()));
             } catch (LocatorException | BufferException | CreateEnvelopeException e) {
                 throw new ProcessingOperationException(e);
             }
@@ -174,7 +154,7 @@
         rowProcessors = new RowProcessor[bands];
         for (int band = 0; band < noData.length; band++) {
             if (isProcessableBand(band)) {
-                int bandType = this.buffer.getBand(band).getDataType();
+                int bandType = this.getInputBuffer().getBand(band).getDataType();
                 switch (bandType) {
                 case BufferManager.TYPE_BYTE:
                     rowProcessors[band] = new ByteRowProcessor(band);
@@ -204,19 +184,19 @@
     @Override
     public void process() throws ProcessingOperationException {
         super.process();
-        for (int band=0; band<this.buffer.getBandCount(); band++){
-            if (bandsToProcess.contains(band)) {
-                Band bufferBand = this.buffer.getBand(band);
-                Band outputBufferBand = this.outputBuffer.getBand(band);
+        for (int band=0; band<this.getInputBuffer().getBandCount(); band++){
+            if (getBandsToProcess().contains(band)) {
+                Band bufferBand = this.getInputBuffer().getBand(band);
+                Band outputBufferBand = this.getOutputBuffer().getBand(band);
 
-                for (int row = 0; row < this.buffer.getRows(); row++) {
+                for (int row = 0; row < this.getInputBuffer().getRows(); row++) {
                     Object rowBuffer = bufferBand.createRowBuffer();
                     bufferBand.fetchRow(row, rowBuffer);
-                    List<Object> bundle = new ArrayList<Object>();
+                    List<Object> bundle = new ArrayList<>();
                     //FIXME: Solo se procesan aquellas filas en las que se pueden crear kernels, el resto ¿qué hacer? (ver abajo)
-                    if ((row - HALF_SIDE_WINDOW >= 0) && (row + HALF_SIDE_WINDOW < this.buffer.getRows())) {
+                    if ((row - HALF_SIDE_WINDOW >= 0) && (row + HALF_SIDE_WINDOW < this.getInputBuffer().getRows())) {
                         for (int r = Math.max(row - HALF_SIDE_WINDOW, 0); r <= Math.min(row + HALF_SIDE_WINDOW,
-                            this.buffer.getRows()-1); r++) {
+                            this.getInputBuffer().getRows()-1); r++) {
                             Object bundleRow = bufferBand.createRowBuffer();
                             bufferBand.fetchRow(r, bundleRow);
                             bundle.add(bundleRow);
@@ -230,15 +210,15 @@
                         outputBufferBand.putRow(row, outputRowBuffer);
                     } else {
                         // FIXME: Si son de tipo BYTE, las copio, si no, no hacemos nada
-                        if(this.buffer.getBandTypes()[band]==BufferManager.TYPE_BYTE){
+                        if(this.getInputBuffer().getBandTypes()[band]==BufferManager.TYPE_BYTE){
                             outputBufferBand.putRow(row, rowBuffer);
                         }
                     }
                 }
             } else {
-                if(copyUnprocessedBands){
+                if(mustCopyUnprocessedBands()){
                     try {
-                        this.outputBuffer.getBand(band).copyFrom(this.buffer.getBand(band));
+                        this.getOutputBuffer().getBand(band).copyFrom(this.getInputBuffer().getBand(band));
                     } catch (BandException e) {
                         throw new ProcessingOperationException(e);
                     }
@@ -263,7 +243,7 @@
 
         public AbstractRowProcessor(int band) {
             this.band = band;
-            noData = buffer.getBand(band).getNoData();
+            noData = getInputBuffer().getBand(band).getNoData();
         }
 
         @Override
