Revision 8682 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.legend/org.gvsig.raster.lib.legend.impl/src/main/java/org/gvsig/raster/lib/legend/impl/operations/cmyktorgb/CMYKToRGBOperation.java

View differences:

CMYKToRGBOperation.java
34 34
import org.gvsig.raster.lib.buffer.api.exceptions.BufferException;
35 35
import org.gvsig.raster.lib.buffer.api.exceptions.BufferOperationException;
36 36
import org.gvsig.raster.lib.buffer.api.operations.OperationFactory;
37
import org.gvsig.raster.lib.buffer.impl.exceptions.ProcessingOperationException;
37
import org.gvsig.raster.lib.buffer.spi.exceptions.ProcessingOperationException;
38 38
import org.gvsig.raster.lib.buffer.spi.operations.AbstractOperation;
39 39
import org.gvsig.raster.lib.legend.api.RasterLegendLocator;
40 40
import org.gvsig.raster.lib.legend.api.RasterLegendManager;
41 41
import org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation;
42 42
import org.gvsig.raster.lib.legend.impl.ColorManager;
43 43
import org.gvsig.raster.lib.legend.impl.RasterLegendManagerServices;
44
import org.gvsig.raster.lib.legend.spi.AbstractColoredOperation;
44 45
import org.gvsig.tools.locator.LocatorException;
45 46

  
46 47

  
......
48 49
 * @author fdiaz
49 50
 *
50 51
 */
51
public class CMYKToRGBOperation extends AbstractOperation {
52
public class CMYKToRGBOperation extends AbstractColoredOperation {
52 53

  
53
    static public String COLOR_INTERPRETATION_PARAM = "color_interpretation";
54
    static public String COPY_UNPROCESSED_BANDS_PARAM = "copy_unprocessed_bands";
55
    static public String OUTPUT_COLOR_INTERPRETATION_PARAM = "output_color_interpretation";
56

  
57
    private ColorInterpretation colorInterpretation;
58
    private boolean copyUnprocessedBands;
59
    private ColorInterpretation outputColorInterpretation;
60

  
61 54
    /**
62 55
     * @param factory
63 56
     *
......
68 61

  
69 62
    @Override
70 63
    public void preProcess() throws BufferOperationException {
64
        super.preProcess();
71 65
        BufferManager manager = BufferLocator.getBufferManager();
72 66
        RasterLegendManager legendManager = RasterLegendLocator.getRasterLegendManager();
73 67

  
74
        colorInterpretation = (ColorInterpretation) this.parameters.getDynValue(COLOR_INTERPRETATION_PARAM);
75
        if (this.parameters.hasDynValue(COPY_UNPROCESSED_BANDS_PARAM)) {
76
            copyUnprocessedBands = (Boolean) this.parameters.getDynValue(COPY_UNPROCESSED_BANDS_PARAM);
77
        } else {
78
            copyUnprocessedBands = true;
79
        }
80 68

  
81 69
        try {
82 70
            if (!colorInterpretation.isCMYK()) {
......
152 140
    @Override
153 141
    public void process() throws ProcessingOperationException {
154 142
        try {
155

  
143
            super.process();
156 144
            // List<Integer> bandsToProcess = new ArrayList<Integer>();
157 145

  
158 146
            if (copyUnprocessedBands) {
......
208 196

  
209 197
    @Override
210 198
    public void postProcess() throws BufferOperationException {
211
        // TODO Auto-generated method stub
199
        super.postProcess();
212 200

  
213 201
    }
214 202

  

Also available in: Unified diff