Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / grid / GridTransparency.java @ 723

History | View | Annotate | Download (2.77 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.fmap.dal.coverage.grid;
23

    
24
import org.gvsig.fmap.dal.coverage.store.props.Transparency;
25

    
26

    
27
/**
28
 * <P>
29
 * Representa el estado de transparencia de un grid. 
30
 * </P>
31
 * <P>
32
 * El estado de transparencia de un raster puede verse modificado desde los siguientes sitios:
33
 * <UL>
34
 * <LI>Color con transparencia definido en los metadatos de la imagen. Caracteristica de PNG.</LI>
35
 * <LI>Una banda del raster definida como banda de transparencia. PNGs, IMGs o TIFFs 
36
 * pueden tener bandas de transparencia</LI>
37
 * <LI>Tablas de color con valores de transparencia. GIF y PNG pueden tener tablas 
38
 * que definan entradas de color con transparencia</LI>
39
 * <LI>Informaci?n de transparencia en la cabecera raster. Tipicamente valores NO_DATA suelen 
40
 * ser interpretados como transparentes en la visualizaci?n.</LI>
41
 * <LI>Modificaci?n hecha por el usuario. En la visualizaci?n un usuario puede necesitar
42
 * asignar valores o rangos de valores como transparentes.</LI>
43
 * </UL> 
44
 * </P>
45
 * <P>
46
 * Estas transparencias quedan representadas por cinco tipo b?sicos:
47
 * <UL>
48
 * <LI><b>Transparencia por rangos. </b>Esta se aplicar? antes que ninguna y siempre sobre los valores
49
 * base del raster.</LI>
50
 * <LI><b>Banda de transparencia en un raster. </b></LI>
51
 * <LI>M?scara de transparencia</LI>
52
 * <LI>Opacidad</LI>
53
 * <LI>Zona de recorte</LI>
54
 * </UL>
55
 * </P>
56
 * @author Nacho Brodin (nachobrodin@gmail.com)
57
 *
58
 */
59
public interface GridTransparency extends Transparency {
60
        
61
        /**
62
         * Aplica las reglas de transparencia a un pixel RGB y devuelve el valor de ese
63
         * mismo pixel con la transparencia aplicada. Primero procesar? los rangos. Si
64
         * el pixel est? en alguno directamente lo pone transparente y lo devuelve, sino
65
         * comprueba si existe banda de transparencia y si es as? la aplica.
66
         * @param rgb
67
         * @param line
68
         * @param col
69
         * @return
70
         */
71
        public int processRGB(int r, int g, int b, int line, int col);
72
}