gvsig-raster / 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 / DefaultRasterLegendLibrary.java @ 8682
History | View | Annotate | Download (4.54 KB)
1 |
package org.gvsig.raster.lib.legend.impl; |
---|---|
2 |
|
3 |
import org.gvsig.raster.lib.buffer.api.BufferLocator; |
4 |
import org.gvsig.raster.lib.buffer.api.BufferManager; |
5 |
import org.gvsig.raster.lib.buffer.api.OperationManager; |
6 |
import org.gvsig.raster.lib.legend.api.RasterLegendLibrary; |
7 |
import org.gvsig.raster.lib.legend.api.RasterLegendLocator; |
8 |
import org.gvsig.raster.lib.legend.api.RasterLegendManager; |
9 |
import org.gvsig.raster.lib.legend.impl.io.GimpGradientColorTableIO; |
10 |
import org.gvsig.raster.lib.legend.impl.io.GimpGradientColorTableIOFactory; |
11 |
import org.gvsig.raster.lib.legend.impl.io.GimpPaletteColorTableIO; |
12 |
import org.gvsig.raster.lib.legend.impl.io.GimpPaletteColorTableIOFactory; |
13 |
import org.gvsig.raster.lib.legend.impl.io.gvSIGColorTableIO; |
14 |
import org.gvsig.raster.lib.legend.impl.io.gvSIGColorTableIOFactory; |
15 |
import org.gvsig.raster.lib.legend.impl.operations.brightness.BrightnessOperationFactory; |
16 |
import org.gvsig.raster.lib.legend.impl.operations.cmyktorgb.CMYKToRGBOperationFactory; |
17 |
import org.gvsig.raster.lib.legend.impl.operations.colorbalancecmy.ColorBalanceCMYOperationFactory; |
18 |
import org.gvsig.raster.lib.legend.impl.operations.colorbalancehsl.ColorBalanceHSLOperationFactory; |
19 |
import org.gvsig.raster.lib.legend.impl.operations.colorbalancergb.ColorBalanceRGBOperationFactory; |
20 |
import org.gvsig.raster.lib.legend.impl.operations.colortable.ColorTableOperationFactory; |
21 |
import org.gvsig.raster.lib.legend.impl.operations.contrast.ContrastOperationFactory; |
22 |
import org.gvsig.raster.lib.legend.impl.operations.equalization.EqualizationOperationFactory; |
23 |
import org.gvsig.raster.lib.legend.impl.operations.grayscale.GrayScaleOperationFactory; |
24 |
import org.gvsig.raster.lib.legend.impl.operations.hsltorgb.HSLToRGBOperationFactory; |
25 |
import org.gvsig.raster.lib.legend.impl.operations.rgbtocmyk.RGBToCMYKOperationFactory; |
26 |
import org.gvsig.raster.lib.legend.impl.operations.rgbtohsl.RGBToHSLOperationFactory; |
27 |
import org.gvsig.tools.library.AbstractLibrary; |
28 |
import org.gvsig.tools.library.LibraryException; |
29 |
|
30 |
/**
|
31 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
|
32 |
*
|
33 |
*/
|
34 |
public class DefaultRasterLegendLibrary extends AbstractLibrary { |
35 |
|
36 |
@Override
|
37 |
public void doRegistration() { |
38 |
registerAsImplementationOf(RasterLegendLibrary.class); |
39 |
} |
40 |
|
41 |
@Override
|
42 |
protected void doInitialize() throws LibraryException { |
43 |
RasterLegendLocator.registerRasterLegendManager(DefaultRasterLegendManager.class); |
44 |
} |
45 |
|
46 |
@Override
|
47 |
protected void doPostInitialize() throws LibraryException { |
48 |
|
49 |
// Register persistent definition
|
50 |
DefaultColorTableClass.registerPersistence(); |
51 |
DefaultColorTable.registerPersistence(); |
52 |
DefaultColorInterpretation.registerPersistence(); |
53 |
DefaultRasterLegend.registerPersistence(); |
54 |
DefaultTransparency.registerPersistence(); |
55 |
DefaultTransparencyRange.registerPersistence(); |
56 |
|
57 |
// Register ColorTableIO factories
|
58 |
RasterLegendManager rasterLegendManager = RasterLegendLocator.getRasterLegendManager(); |
59 |
rasterLegendManager.registerColorTableIOFactory(gvSIGColorTableIO.NAME, |
60 |
new gvSIGColorTableIOFactory());
|
61 |
rasterLegendManager.registerColorTableIOFactory(GimpGradientColorTableIO.NAME, |
62 |
new GimpGradientColorTableIOFactory());
|
63 |
rasterLegendManager.registerColorTableIOFactory(GimpPaletteColorTableIO.NAME, |
64 |
new GimpPaletteColorTableIOFactory());
|
65 |
|
66 |
OperationManager operationManager = BufferLocator.getOperationManager(); |
67 |
operationManager.registerOperationFactory(new BrightnessOperationFactory());
|
68 |
operationManager.registerOperationFactory(new ContrastOperationFactory());
|
69 |
operationManager.registerOperationFactory(new GrayScaleOperationFactory());
|
70 |
|
71 |
operationManager.registerOperationFactory(new ColorBalanceRGBOperationFactory());
|
72 |
operationManager.registerOperationFactory(new ColorBalanceCMYOperationFactory());
|
73 |
operationManager.registerOperationFactory(new ColorBalanceHSLOperationFactory());
|
74 |
|
75 |
operationManager.registerOperationFactory(new RGBToCMYKOperationFactory());
|
76 |
operationManager.registerOperationFactory(new RGBToHSLOperationFactory());
|
77 |
operationManager.registerOperationFactory(new HSLToRGBOperationFactory());
|
78 |
operationManager.registerOperationFactory(new CMYKToRGBOperationFactory());
|
79 |
|
80 |
operationManager.registerOperationFactory(new EqualizationOperationFactory());
|
81 |
// BufferLocator.getBufferManager().registerOperationFactory(new PansharpeningOperationFactory());
|
82 |
|
83 |
operationManager.registerOperationFactory(new ColorTableOperationFactory());
|
84 |
|
85 |
} |
86 |
|
87 |
} |