public class DataStoreColorInterpretation extends Object implements ColorInterpretation
ALPHA_BAND, ARGB, BGR, BLUE_BAND, GRAY_BAND, GRAYSCALE, GREEN_BAND, GREEN_BLUE_BAND, PAL_BAND, PALETTE, RED_BAND, RED_BLUE_BAND, RED_GREEN_BAND, RGB, UNDEF_BAND
Constructor and Description |
---|
DataStoreColorInterpretation()
Constructor vacio.
|
DataStoreColorInterpretation(int bandCount)
Constructor que inicializa el número de valores de la interpretación de
color.
|
DataStoreColorInterpretation(String colorInterpretationConstant) |
DataStoreColorInterpretation(String[] colorInterp)
Constructor que asigna los valores de interpretación de color
|
Modifier and Type | Method and Description |
---|---|
void |
addColorInterpretation(ColorInterpretation ci)
Añade un objeto DatasetColorInterpretation al actual.
|
int[] |
buildRenderBands()
Returns an array with bands to render reading values of this color
interpretation object.
|
ColorInterpretation |
cloneColorInterpretation()
Clones this object
|
static DataStoreColorInterpretation |
createDefaultInterpretation(int nBands) |
static DataStoreColorInterpretation |
createGrayInterpretation()
Obtiene una interpretación de color GRAY
|
static DataStoreColorInterpretation |
createPaletteInterpretation() |
static DataStoreColorInterpretation |
createRGBAInterpretation()
Obtiene una interpretación de color ARGB
|
static DataStoreColorInterpretation |
createRGBInterpretation()
Obtiene una interpretación de color RGB
|
String |
get(int i)
Obtiene el valor de interpretación de color de la entrada i.
|
int |
getAlphaBand()
Returns the number of band with the label "Alpha"
|
int |
getBand(String id)
Obtiene la posición de la banda que contiene el identificador pasado por parámetro
o -1 si no tiene dicho identificador.
|
int[] |
getBands(String id)
Obtiene la posición de las bandas que contienen el identificador pasado por parámetro
o null si no tiene dicho identificador.
|
String[] |
getValues()
Obtiene los valores de la interpretación de color
|
boolean |
hasAlphaBand()
Returns true if one band has the "Alpha" label
|
boolean |
hasInterpretation()
Returns true if the values Red, Green and Blue are
assigned to any band of the image or the values Gray or Palette are
assigned.
|
void |
initColorInterpretation(int values)
Inicializa el vector de cadenas que contendrán el nombre de la interpretación
de color asignada a cada banda.
|
boolean |
isAlphaInterpretation(int band)
Returns true if the selected band has alpha interpretation and false otherwise
|
boolean |
isBGR()
Returns true if the color interpretation is BGR, that is, the
three first bands of the image are Blue, Green and Red.
|
boolean |
isColorInterpretation(int band)
Returns true if the selected band has red, green or blue interpretation and false otherwise
|
boolean |
isGrayInterpretation(int band)
Returns true if the selected band has gray interpretation and false otherwise
|
boolean |
isPalette()
Returns true if the color interpretation is Palette
|
boolean |
isRGB()
Returns true if the color interpretation is RGB, that is, the
three first bands of the image are Red, Green and Blue.
|
boolean |
isRGBA()
Returns true if the color interpretation is ARGB, that is, the
four first bands of the image are Red, Green, Blue and Alpha.
|
boolean |
isUndefined()
Consulta si la interpretación de color está por definir en la imagen.
|
int |
length()
Obtiene el número de entradas de interpretación de color por
banda en la lista.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static DynStruct |
registerDynClass() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setColorInterpValue(int band,
String value)
Asigna un valor para la interpretación de color de una banda
|
void |
setValues(String[] colorInterp)
Asigna los valores de la interpretación de color
|
public DataStoreColorInterpretation()
public DataStoreColorInterpretation(String[] colorInterp)
public DataStoreColorInterpretation(int bandCount)
public DataStoreColorInterpretation(String colorInterpretationConstant)
public static DataStoreColorInterpretation createDefaultInterpretation(int nBands)
public static DataStoreColorInterpretation createPaletteInterpretation()
public static DataStoreColorInterpretation createGrayInterpretation()
public static DataStoreColorInterpretation createRGBAInterpretation()
public static DataStoreColorInterpretation createRGBInterpretation()
public void initColorInterpretation(int values)
initColorInterpretation
in interface ColorInterpretation
values
- Número de valorespublic boolean hasInterpretation()
ColorInterpretation
hasInterpretation
in interface ColorInterpretation
public boolean isBGR()
ColorInterpretation
isBGR
in interface ColorInterpretation
public boolean isRGB()
ColorInterpretation
isRGB
in interface ColorInterpretation
public boolean isRGBA()
ColorInterpretation
isRGBA
in interface ColorInterpretation
public boolean isPalette()
ColorInterpretation
isPalette
in interface ColorInterpretation
public boolean isGrayInterpretation(int band)
ColorInterpretation
isGrayInterpretation
in interface ColorInterpretation
public boolean isColorInterpretation(int band)
ColorInterpretation
isColorInterpretation
in interface ColorInterpretation
public boolean isAlphaInterpretation(int band)
ColorInterpretation
isAlphaInterpretation
in interface ColorInterpretation
public int getAlphaBand()
ColorInterpretation
getAlphaBand
in interface ColorInterpretation
public String[] getValues()
ColorInterpretation
getValues
in interface ColorInterpretation
public void setValues(String[] colorInterp)
public void setColorInterpValue(int band, String value)
ColorInterpretation
setColorInterpValue
in interface ColorInterpretation
band
- Bandavalue
- valorpublic int getBand(String id)
ColorInterpretation
getBand
in interface ColorInterpretation
public int[] getBands(String id)
public boolean hasAlphaBand()
ColorInterpretation
hasAlphaBand
in interface ColorInterpretation
public int length()
ColorInterpretation
length
in interface ColorInterpretation
public String get(int i)
ColorInterpretation
get
in interface ColorInterpretation
i
- Número de entradapublic void addColorInterpretation(ColorInterpretation ci)
ColorInterpretation
addColorInterpretation
in interface ColorInterpretation
public boolean isUndefined()
ColorInterpretation
isUndefined
in interface ColorInterpretation
public int[] buildRenderBands()
ColorInterpretation
buildRenderBands
in interface ColorInterpretation
public ColorInterpretation cloneColorInterpretation()
ColorInterpretation
cloneColorInterpretation
in interface ColorInterpretation
public static DynStruct registerDynClass()
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException