org.deegree.coverage.raster.data.info
Enum BandType

java.lang.Object
  extended by java.lang.Enum<BandType>
      extended by org.deegree.coverage.raster.data.info.BandType
All Implemented Interfaces:
Serializable, Comparable<BandType>

public enum BandType
extends Enum<BandType>

The BandType defines band information of a rasterdata object

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Enum Constant Summary
ALPHA
           
BAND_0
           
BAND_1
           
BAND_2
           
BAND_3
           
BAND_4
           
BAND_5
           
BAND_6
           
BAND_7
           
BAND_8
           
BAND_9
           
BLUE
           
GREEN
           
RED
           
UNDEFINED
           
 
Field Summary
static BandType[] RGB
          A standard RGB band type array
static BandType[] RGBA
          A standard RGBA band type array
 
Method Summary
static BandType[] fromBufferedImageType(int type, int expectedSize, SampleModel sampleModel)
          Convert from BufferedImage-Types to BandTypes.
static BandType fromString(String band)
          Get Bandtype for the given string.
 String getInfo()
           
 String toString()
           
static BandType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BandType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BAND_0

public static final BandType BAND_0

BAND_1

public static final BandType BAND_1

BAND_2

public static final BandType BAND_2

BAND_3

public static final BandType BAND_3

BAND_4

public static final BandType BAND_4

BAND_5

public static final BandType BAND_5

BAND_6

public static final BandType BAND_6

BAND_7

public static final BandType BAND_7

BAND_8

public static final BandType BAND_8

BAND_9

public static final BandType BAND_9

RED

public static final BandType RED

GREEN

public static final BandType GREEN

BLUE

public static final BandType BLUE

ALPHA

public static final BandType ALPHA

UNDEFINED

public static final BandType UNDEFINED
Field Detail

RGB

public static final BandType[] RGB
A standard RGB band type array


RGBA

public static final BandType[] RGBA
A standard RGBA band type array

Method Detail

values

public static BandType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BandType c : BandType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BandType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getInfo

public final String getInfo()
Returns:
a short description of the band.

fromBufferedImageType

public static BandType[] fromBufferedImageType(int type,
                                               int expectedSize,
                                               SampleModel sampleModel)
Convert from BufferedImage-Types to BandTypes. The size of the types are irrelevant. (INT_ARGB==3BYTE_ARGB)

Parameters:
type - The DataBuffer-Type (eg. TYPE_BYTE, etc.)
expectedSize - if the type is unknown an array of expectedSize with BAND_0[9] will be returned.
sampleModel -
Returns:
The according BandType

fromString

public static BandType fromString(String band)
Get Bandtype for the given string. This method is case insensitive, words can be separated with a whitespace, minus or underscore.

Parameters:
band -
Returns:
the given BandType or null if the band type was not known.

toString

public String toString()
Overrides:
toString in class Enum<BandType>


Copyright © 2011. All Rights Reserved.