001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/coverage/ColorInterpretation.java $
002 /*$************************************************************************************************
003 **
004 ** $Id: ColorInterpretation.java 6259 2007-03-20 09:15:15Z bezema $
005 **
006 ** $Source$
007 **
008 ** Copyright (C) 2003 Open GIS Consortium, Inc. All Rights Reserved. http://www.opengis.org/Legal/
009 **
010 *************************************************************************************************/
011 package org.deegree.model.coverage;
012
013
014 /**
015 * Specifies the mapping of a band to a color model component.
016 *
017 * @UML codelist CV_ColorInterpretation
018 * @author <A HREF="http://www.opengis.org">OpenGIS® consortium</A>
019 * @version <A HREF="http://www.opengis.org/docs/01-004.pdf">Grid Coverage specification 1.0</A>
020 *
021 * @see PaletteInterpretation
022 * @see SampleDimension
023 */
024 final class ColorInterpretation extends CodeList {
025 /**
026 * Serial number for compatibility with different versions.
027 */
028 private static final long serialVersionUID = 6947933527594223350L;
029
030 /**
031 * Band is not associated with a color model component.
032 *
033 * @UML conditional CV_Undefined
034 */
035 public static final ColorInterpretation UNDEFINED = new ColorInterpretation( "UNDEFINED", 0 );
036
037 /**
038 * Band is an index into a lookup table.
039 *
040 * @UML conditional CV_GrayIndex
041 * @see #PALETTE_INDEX
042 * @see PaletteInterpretation#GRAY
043 */
044 public static final ColorInterpretation GRAY_INDEX = new ColorInterpretation( "GRAY_INDEX", 1 );
045
046 /**
047 * Band is a color index into a color table.
048 *
049 * @UML conditional CV_PaletteIndex
050 * @see #GRAY_INDEX
051 */
052 public static final ColorInterpretation PALETTE_INDEX = new ColorInterpretation(
053 "PALETTE_INDEX",
054 2 );
055
056 /**
057 * Red Band for the {@linkplain PaletteInterpretation#RGB RGB} color model components.
058 *
059 * @UML conditional CV_RedBand
060 * @see #GREEN_BAND
061 * @see #BLUE_BAND
062 * @see #ALPHA_BAND
063 * @see PaletteInterpretation#RGB
064 */
065 public static final ColorInterpretation RED_BAND = new ColorInterpretation( "RED_BAND", 3 );
066
067 /**
068 * Greend Band for the {@linkplain PaletteInterpretation#RGB RGB} color model components.
069 *
070 * @UML conditional CV_GreenBand
071 * @see #RED_BAND
072 * @see #BLUE_BAND
073 * @see #ALPHA_BAND
074 * @see PaletteInterpretation#RGB
075 */
076 public static final ColorInterpretation GREEN_BAND = new ColorInterpretation( "GREEN_BAND", 4 );
077
078 /**
079 * Blue Band for the {@linkplain PaletteInterpretation#RGB RGB} color model components.
080 *
081 * @UML conditional CV_BlueBand
082 * @see #RED_BAND
083 * @see #GREEN_BAND
084 * @see #ALPHA_BAND
085 * @see PaletteInterpretation#RGB
086 */
087 public static final ColorInterpretation BLUE_BAND = new ColorInterpretation( "BLUE_BAND", 5 );
088
089 /**
090 * Alpha Band for the {@linkplain PaletteInterpretation#RGB RGB} color model components.
091 * Alpha band may or may not be present.
092 *
093 * @UML conditional CV_AlphaBand
094 * @see #RED_BAND
095 * @see #GREEN_BAND
096 * @see #BLUE_BAND
097 * @see PaletteInterpretation#RGB
098 */
099 public static final ColorInterpretation ALPHA_BAND = new ColorInterpretation( "ALPHA_BAND", 6 );
100
101 /**
102 * Hue Band for the {@linkplain PaletteInterpretation#HLS HLS} color model.
103 *
104 * @UML conditional CV_HueBand
105 * @see #SATURATION_BAND
106 * @see #LIGHTNESS_BAND
107 * @see PaletteInterpretation#HLS
108 */
109 public static final ColorInterpretation HUE_BAND = new ColorInterpretation( "HUE_BAND", 7 );
110
111 /**
112 * Saturation Band for the {@linkplain PaletteInterpretation#HLS HLS} color model.
113 *
114 * @UML conditional CV_SaturationBand
115 * @see #HUE_BAND
116 * @see #LIGHTNESS_BAND
117 * @see PaletteInterpretation#HLS
118 */
119 public static final ColorInterpretation SATURATION_BAND = new ColorInterpretation(
120 "SATURATION_BAND",
121 8 );
122
123 /**
124 * Lightness Band for the {@linkplain PaletteInterpretation#HLS HLS} color model.
125 *
126 * @UML conditional CV_LightnessBand
127 * @see #HUE_BAND
128 * @see #SATURATION_BAND
129 * @see PaletteInterpretation#HLS
130 */
131 public static final ColorInterpretation LIGHTNESS_BAND = new ColorInterpretation(
132 "LIGHTNESS_BAND",
133 9 );
134
135 /**
136 * Cyan Band for the {@linkplain PaletteInterpretation#CMYK CMYK} color model.
137 *
138 * @UML conditional CV_CyanBand
139 * @see #MAGENTA_BAND
140 * @see #YELLOW_BAND
141 * @see #BLACK_BAND
142 * @see PaletteInterpretation#CMYK
143 */
144 public static final ColorInterpretation CYAN_BAND = new ColorInterpretation( "CYAN_BAND", 10 );
145
146 /**
147 * Magenta Band for the {@linkplain PaletteInterpretation#CMYK CMYK} color model.
148 *
149 * @UML conditional CV_MagentaBand
150 * @see #CYAN_BAND
151 * @see #YELLOW_BAND
152 * @see #BLACK_BAND
153 * @see PaletteInterpretation#CMYK
154 */
155 public static final ColorInterpretation MAGENTA_BAND = new ColorInterpretation( "MAGENTA_BAND",
156 11 );
157
158 /**
159 * Yellow Band for the {@linkplain PaletteInterpretation#CMYK CMYK} color model.
160 *
161 * @UML conditional CV_YellowBand
162 * @see #CYAN_BAND
163 * @see #MAGENTA_BAND
164 * @see #BLACK_BAND
165 * @see PaletteInterpretation#CMYK
166 */
167 public static final ColorInterpretation YELLOW_BAND = new ColorInterpretation( "YELLOW_BAND",
168 12 );
169
170 /**
171 * Black Band for the {@linkplain PaletteInterpretation#CMYK CMYK} color model.
172 *
173 * @UML conditional CV_BlackBand
174 * @see #CYAN_BAND
175 * @see #MAGENTA_BAND
176 * @see #YELLOW_BAND
177 * @see PaletteInterpretation#CMYK
178 */
179 public static final ColorInterpretation BLACK_BAND = new ColorInterpretation( "BLACK_BAND", 13 );
180
181 /**
182 * List of all enumerations of this type.
183 */
184 private static final ColorInterpretation[] VALUES = new ColorInterpretation[] { UNDEFINED,
185 GRAY_INDEX,
186 PALETTE_INDEX,
187 RED_BAND,
188 GREEN_BAND,
189 BLUE_BAND,
190 ALPHA_BAND,
191 HUE_BAND,
192 SATURATION_BAND,
193 LIGHTNESS_BAND,
194 CYAN_BAND,
195 MAGENTA_BAND,
196 YELLOW_BAND,
197 BLACK_BAND };
198
199 /**
200 * Constructs an enum with the given name.
201 */
202 private ColorInterpretation( final String name, final int ordinal ) {
203 super( name, ordinal );
204 }
205
206 /**
207 * Returns the list of <code>ColorInterpretation</code>s.
208 */
209 public static ColorInterpretation[] values() {
210 return VALUES.clone();
211 }
212
213 /**
214 * Returns the list of enumerations of the same kind than this enum.
215 */
216 public CodeList[] family() {
217 return values();
218 }
219 }
220 /* ********************************************************************
221 Changes to this class. What the people have been up to:
222 $Log$
223 Revision 1.1 2007/02/09 17:28:00 poth
224 *** empty log message ***
225
226 Revision 1.4 2006/11/26 18:17:49 poth
227 unnecessary cast removed / code formatting
228
229 Revision 1.3 2006/08/07 09:43:13 poth
230 unneccessary type cast removed
231
232 Revision 1.2 2006/07/13 06:28:31 poth
233 comment footer added
234
235 ********************************************************************** */