gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster_dataaccess_refactoring / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / store / props / ColorInterpretation.java @ 2305
History | View | Annotate | Download (3.64 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.store.props; |
23 |
|
24 |
|
25 |
|
26 |
/**
|
27 |
* Interfaz que representa una interpretaci?n de color.
|
28 |
*
|
29 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
30 |
*/
|
31 |
public interface ColorInterpretation { |
32 |
// Identificadores de color interpretation
|
33 |
public static final String RED_BAND = "Red"; |
34 |
public static final String GREEN_BAND = "Green"; |
35 |
public static final String BLUE_BAND = "Blue"; |
36 |
public static final String ALPHA_BAND = "Alpha"; |
37 |
public static final String GRAY_BAND = "Gray"; |
38 |
public static final String PAL_BAND = "Palette"; |
39 |
public static final String UNDEF_BAND = "Undefined"; |
40 |
|
41 |
/**
|
42 |
* Asigna un valor para la interpretaci?n de color de una banda
|
43 |
* @param band Banda
|
44 |
* @param value valor
|
45 |
*/
|
46 |
public void setColorInterpValue(int band, String value); |
47 |
|
48 |
/**
|
49 |
* Obtiene el n?mero de entradas de interpretaci?n de color por
|
50 |
* banda en la lista.
|
51 |
* @return
|
52 |
*/
|
53 |
public int length(); |
54 |
|
55 |
/**
|
56 |
* Returns true if the color interpretation is BGR
|
57 |
* @return
|
58 |
*/
|
59 |
public boolean isBGR(); |
60 |
|
61 |
/**
|
62 |
* Returns true if the color interpretation is RGB
|
63 |
* @return
|
64 |
*/
|
65 |
public boolean isRGB(); |
66 |
|
67 |
/**
|
68 |
* Returns true if the color interpretation is ARGB
|
69 |
* @return
|
70 |
*/
|
71 |
public boolean isARGB(); |
72 |
|
73 |
/**
|
74 |
* Obtiene el valor de interpretaci?n de color de la entrada i.
|
75 |
* @param i N?mero de entrada
|
76 |
* @return interpretaci?n de color para la entrada solicitada
|
77 |
*/
|
78 |
public String get(int i); |
79 |
|
80 |
/**
|
81 |
* Obtiene la posici?n de la banda que contiene el identificador pasado por par?metro
|
82 |
* o -1 si no tiene dicho identificador.
|
83 |
* @return Posici?n de la banda que contiene el identificador o -1 si no lo tiene.
|
84 |
*/
|
85 |
public int getBand(String id); |
86 |
|
87 |
/**
|
88 |
* Consulta si la interpretaci?n de color est? por definir en la imagen.
|
89 |
* @return true si no hay interpretaci?n de color definida y false si la hay
|
90 |
*/
|
91 |
public boolean isUndefined(); |
92 |
|
93 |
/**
|
94 |
* Inicializa el vector de cadenas que contendr?n el nombre de la interpretaci?n
|
95 |
* de color asignada a cada banda. Este valor es el devuelto por la imagen.
|
96 |
* @param values N?mero de valores
|
97 |
*/
|
98 |
public void initColorInterpretation(int values); |
99 |
|
100 |
/**
|
101 |
* Obtiene los valores de la interpretaci?n de color
|
102 |
* @return String[]
|
103 |
*/
|
104 |
public String[] getValues(); |
105 |
|
106 |
/**
|
107 |
* Returns true if one band has the "Alpha" label
|
108 |
* @return
|
109 |
*/
|
110 |
public boolean hasAlphaBand(); |
111 |
|
112 |
/**
|
113 |
* Returns the number of band with the label "Alpha"
|
114 |
* @return
|
115 |
*/
|
116 |
public int getAlphaBand(); |
117 |
|
118 |
/**
|
119 |
* A?ade un objeto DatasetColorInterpretation al actual. El resultado es la suma
|
120 |
* de ambos.
|
121 |
* @param ci
|
122 |
*/
|
123 |
public void addColorInterpretation(ColorInterpretation ci); |
124 |
|
125 |
/**
|
126 |
* Clones this object
|
127 |
* @return
|
128 |
*/
|
129 |
public ColorInterpretation cloneColorInterpretation();
|
130 |
} |