Revision 43862 branches/org.gvsig.desktop-2018a/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/java/org/gvsig/raster/lib/legend/impl/operations/colorbalancehsl/ColorBalanceHSLOperation.java
ColorBalanceHSLOperation.java | ||
---|---|---|
27 | 27 |
import org.gvsig.raster.lib.buffer.api.exceptions.BufferOperationException; |
28 | 28 |
import org.gvsig.raster.lib.buffer.api.operations.OperationFactory; |
29 | 29 |
import org.gvsig.raster.lib.legend.api.RasterLegendLocator; |
30 |
import org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation; |
|
31 | 30 |
import org.gvsig.raster.lib.legend.impl.ColorManager; |
32 | 31 |
import org.gvsig.raster.lib.legend.impl.RasterLegendManagerServices; |
33 | 32 |
import org.gvsig.raster.lib.legend.impl.operations.colorbalancergb.AbstractColorBalanceOperation; |
... | ... | |
39 | 38 |
*/ |
40 | 39 |
public class ColorBalanceHSLOperation extends AbstractColorBalanceOperation { |
41 | 40 |
|
42 |
static public String COLOR_INTERPRETATION_PARAM = "color_interpretation"; |
|
43 | 41 |
static public String HUE_PARAM = "hue"; |
44 | 42 |
static public String LIGHTNESS_PARAM = "lightness"; |
45 | 43 |
static public String SATURATION_PARAM = "saturation"; |
46 |
static public String COPY_UNPROCESSED_BANDS_PARAM = "copy_unprocessed_bands"; |
|
47 | 44 |
|
48 |
private ColorInterpretation colorInterpretation; |
|
49 | 45 |
private double hue = 0; |
50 | 46 |
private double lightness = 0; |
51 | 47 |
private double saturation = 0; |
52 |
private boolean copyUnprocessedBands; |
|
53 | 48 |
|
54 | 49 |
|
55 | 50 |
/** |
... | ... | |
57 | 52 |
* |
58 | 53 |
*/ |
59 | 54 |
public ColorBalanceHSLOperation(OperationFactory factory) { |
60 |
this.factory = factory;
|
|
55 |
super(factory);
|
|
61 | 56 |
} |
62 | 57 |
|
63 | 58 |
@Override |
64 | 59 |
protected void initialiceParams() { |
65 |
hue = (Double) this.parameters.getDynValue(HUE_PARAM);
|
|
66 |
lightness = (Double) this.parameters.getDynValue(LIGHTNESS_PARAM);
|
|
67 |
saturation = (Double) this.parameters.getDynValue(SATURATION_PARAM);
|
|
60 |
hue = (Double) this.getParameter(HUE_PARAM,0);
|
|
61 |
lightness = (Double) this.getParameter(LIGHTNESS_PARAM,0);
|
|
62 |
saturation = (Double) this.getParameter(SATURATION_PARAM,0);
|
|
68 | 63 |
} |
69 | 64 |
|
70 | 65 |
@Override |
... | ... | |
72 | 67 |
super.postProcess(); |
73 | 68 |
} |
74 | 69 |
|
70 |
@Override |
|
75 | 71 |
protected void processRow(Object[] inputRows, List outputRows) { |
76 | 72 |
ColorManager colorManager = ((RasterLegendManagerServices)RasterLegendLocator.getRasterLegendManager()).getColorManager(); |
77 | 73 |
byte[][] inputByteRows = new byte[inputRows.length][((byte[]) inputRows[0]).length]; |
Also available in: Unified diff