Revision 2311 org.gvsig.raster/branches/org.gvsig.raster_dataaccess_refactoring/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/band/RGBToCMYKFilter.java
RGBToCMYKFilter.java | ||
---|---|---|
21 | 21 |
*/ |
22 | 22 |
package org.gvsig.raster.impl.grid.filter.band; |
23 | 23 |
|
24 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
|
25 | 24 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
26 | 25 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
27 | 26 |
import org.gvsig.fmap.dal.coverage.exception.FilterAddException; |
28 | 27 |
import org.gvsig.fmap.dal.coverage.grid.filter.BaseRasterFilter; |
29 |
import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation; |
|
30 | 28 |
import org.gvsig.raster.impl.store.ParamsImpl; |
31 | 29 |
import org.gvsig.raster.util.DefaultColorConversion; |
32 | 30 |
/** |
... | ... | |
41 | 39 |
public static String[] names = new String[] { "rgbtocmyk" }; |
42 | 40 |
protected DefaultColorConversion colorConversion = null; |
43 | 41 |
protected int out = Buffer.TYPE_BYTE; |
42 |
protected int redBandNumber = -1; |
|
43 |
protected int greenBandNumber = -1; |
|
44 |
protected int blueBandNumber = -1; |
|
44 | 45 |
|
45 | 46 |
/** |
46 | 47 |
* Constructor |
... | ... | |
53 | 54 |
public void pre() throws FilterAddException { |
54 | 55 |
super.pre(); |
55 | 56 |
out = ((Integer) params.get("outputType")).intValue(); |
56 |
checkRGBRenderBands(); |
|
57 | 57 |
|
58 |
//A este filtro ya llega una imagen RGB con el orden de las bandas correcto |
|
59 |
//ColorInterpretation colorInterpretation = getColorInterpretation(); |
|
60 |
redBandNumber = 0;//colorInterpretation.getBand(ColorInterpretation.RED_BAND); |
|
61 |
greenBandNumber = 1;//colorInterpretation.getBand(ColorInterpretation.GREEN_BAND); |
|
62 |
blueBandNumber = 2;//colorInterpretation.getBand(ColorInterpretation.BLUE_BAND); |
|
63 |
|
|
58 | 64 |
if(out == Buffer.TYPE_BYTE) |
59 | 65 |
createARGBBufferResult(); |
60 | 66 |
else { |
Also available in: Unified diff