Statistics
| Revision:

svn-gvsig-desktop / 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 / DefaultRasterLegendLibrary.java @ 43803

History | View | Annotate | Download (4.55 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
@Deprecated
35
public class DefaultRasterLegendLibrary extends AbstractLibrary {
36

    
37
    @Override
38
    public void doRegistration() {
39
        registerAsImplementationOf(RasterLegendLibrary.class);
40
    }
41

    
42
    @Override
43
    protected void doInitialize() throws LibraryException {
44
        RasterLegendLocator.registerRasterLegendManager(DefaultRasterLegendManager.class);
45
    }
46

    
47
    @Override
48
    protected void doPostInitialize() throws LibraryException {
49

    
50
        // Register persistent definition
51
        DefaultColorTableClass.registerPersistence();
52
        DefaultColorTable.registerPersistence();
53
        DefaultColorInterpretation.registerPersistence();
54
        DefaultRasterLegend.registerPersistence();
55
        DefaultTransparency.registerPersistence();
56
        DefaultTransparencyRange.registerPersistence();
57

    
58
        // Register ColorTableIO factories
59
        RasterLegendManager rasterLegendManager = RasterLegendLocator.getRasterLegendManager();
60
        rasterLegendManager.registerColorTableIOFactory(gvSIGColorTableIO.NAME,
61
            new gvSIGColorTableIOFactory());
62
        rasterLegendManager.registerColorTableIOFactory(GimpGradientColorTableIO.NAME,
63
            new GimpGradientColorTableIOFactory());
64
        rasterLegendManager.registerColorTableIOFactory(GimpPaletteColorTableIO.NAME,
65
            new GimpPaletteColorTableIOFactory());
66

    
67
        OperationManager operationManager = BufferLocator.getOperationManager();
68
        operationManager.registerOperationFactory(new BrightnessOperationFactory());
69
        operationManager.registerOperationFactory(new ContrastOperationFactory());
70
        operationManager.registerOperationFactory(new GrayScaleOperationFactory());
71

    
72
        operationManager.registerOperationFactory(new ColorBalanceRGBOperationFactory());
73
        operationManager.registerOperationFactory(new ColorBalanceCMYOperationFactory());
74
        operationManager.registerOperationFactory(new ColorBalanceHSLOperationFactory());
75

    
76
        operationManager.registerOperationFactory(new RGBToCMYKOperationFactory());
77
        operationManager.registerOperationFactory(new RGBToHSLOperationFactory());
78
        operationManager.registerOperationFactory(new HSLToRGBOperationFactory());
79
        operationManager.registerOperationFactory(new CMYKToRGBOperationFactory());
80

    
81
        operationManager.registerOperationFactory(new EqualizationOperationFactory());
82
//        BufferLocator.getBufferManager().registerOperationFactory(new PansharpeningOperationFactory());
83

    
84
        operationManager.registerOperationFactory(new ColorTableOperationFactory());
85

    
86
    }
87

    
88
}