public class DataStoreColorTable extends Object implements ColorTable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected List<ColorItem> |
colorItems
Lista de ColorItem donde estaran todos los valores de la paleta segun
el interfaz
|
protected String |
filePath
Ruta del fichero a la cual se asocia la paleta.
|
protected boolean |
interpolated
Booleano que define si se interpolaran los valores de la paleta.
|
protected String |
name
Nombre de la paleta
|
protected String[] |
nameClass
Nombre de la clase asociada a la entrada
|
protected byte[][] |
paletteByBand
Lista de valores RGB
|
static String |
PERSISTENT_DESCRIPTION |
static String |
PERSISTENT_NAME |
protected double[] |
range
Lista de rangos para paletas decimales
|
Constructor and Description |
---|
DataStoreColorTable()
Constructor vacío.
|
DataStoreColorTable(ColorTable fp)
Constructor de copia
|
DataStoreColorTable(List<ColorItem> colorItems,
boolean compress)
Constructor.
|
DataStoreColorTable(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this object
|
void |
compressPalette()
Comprime la actual tabla de color
|
void |
createColorTableInRange(double min,
double max,
boolean compress)
Establece la tabla de color actual en los rangos de limite especificados
por parametros, distribuyendolo proporcionalmente.
|
void |
createPaletteFromColorItems(List<ColorItem> colorItems,
boolean compress)
Crea una paleta a traves de una lista de colores y se le puede especificar
si queremos que la comprima o no.
|
boolean |
equals(Object obj) |
List<ColorItem> |
getColorItems()
Devuelve un ArrayList con cada ColorItem de la tabla de color
|
byte[][] |
getColorTableByBand()
Crea una paleta a partir de un objeto GdalColorTable.
|
String |
getFilePath()
Obtiene la ruta del fichero al que va asociada la paleta.
|
String |
getName()
Obtiene el nombre de la paleta
|
String[] |
getNameClass()
Obtiene los nombres de las clases de la paleta
|
double[] |
getRange() |
byte[] |
getRGBAByBand(double value)
Obtiene el valor RGB para un clave entera pasada por parámetro
|
boolean |
hasAlpha()
Returns true if this table contains at least one entry
with an alpha value
|
int |
hashCode() |
boolean |
isCompressible()
Informa de si una tabla de color se puede comprimir
|
boolean |
isInterpolated()
Nos indica si la paleta la ha generado con valores interpolados o no.
|
boolean |
isPaletteActive()
Obtiene el flag de paleta activa o desactivada.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistence() |
void |
removeDuplicatedValues()
Borra valores duplicados de la paleta.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setColorTable(int[] palette)
Asigna una paleta
|
void |
setFilePath(String filePath)
Asigna la ruta del fichero al que va asociada la paleta.
|
void |
setInterpolated(boolean interpolated)
Definir si la paleta tendra los valores interpolados o no
|
void |
setName(String name)
Asigna el nombre de la paleta
|
void |
setNameClass(String[] names)
Asigna los nombres de las clases de la paleta
|
void |
setPaletteActive(boolean paletteActive)
Asigna el flag de paleta activa o desactivada.
|
void |
setRange(double[] range) |
public static final String PERSISTENT_NAME
public static final String PERSISTENT_DESCRIPTION
protected List<ColorItem> colorItems
protected boolean interpolated
protected double[] range
protected byte[][] paletteByBand
protected String[] nameClass
protected String name
protected String filePath
public DataStoreColorTable()
uri
- public DataStoreColorTable(String name)
name
- public DataStoreColorTable(ColorTable fp)
fp
- public void setName(String name)
ColorTable
setName
in interface ColorTable
public String getName()
ColorTable
getName
in interface ColorTable
public void createPaletteFromColorItems(List<ColorItem> colorItems, boolean compress)
ColorTable
createPaletteFromColorItems
in interface ColorTable
public void removeDuplicatedValues()
removeDuplicatedValues
in interface ColorTable
public boolean hasAlpha()
ColorTable
hasAlpha
in interface ColorTable
public void compressPalette()
ColorTable
compressPalette
in interface ColorTable
public boolean isCompressible()
isCompressible
in interface ColorTable
public byte[][] getColorTableByBand()
getColorTableByBand
in interface ColorTable
table
- public void setColorTable(int[] palette)
palette
- Paletapublic String[] getNameClass()
public void setNameClass(String[] names)
names
- Array de cadenas. Cada una corresponde con un nombre de clase
que corresponde a cada rango de tipos.public String getFilePath()
public void setFilePath(String filePath)
Ruta
- del fichero al que va asociada la paleta.public Object clone()
ColorTable
clone
in interface ColorTable
clone
in class Object
public byte[] getRGBAByBand(double value)
ColorTable
getRGBAByBand
in interface ColorTable
value
- clave de la cual se quiere obtener el valor RGB de la paletapublic double[] getRange()
public void setRange(double[] range)
public List<ColorItem> getColorItems()
ColorTable
getColorItems
in interface ColorTable
public boolean isInterpolated()
ColorTable
isInterpolated
in interface ColorTable
public void setInterpolated(boolean interpolated)
ColorTable
setInterpolated
in interface ColorTable
public void createColorTableInRange(double min, double max, boolean compress)
createColorTableInRange
in interface ColorTable
min
- max
- compress
- public boolean isPaletteActive()
ColorTable
isPaletteActive
in interface ColorTable
public void setPaletteActive(boolean paletteActive)
ColorTable
setPaletteActive
in interface ColorTable
paletteActive
- true activa la paleta false la desactivapublic void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public static void registerPersistence()