public abstract class RasterBuffer extends AbstractBuffer implements Buffer
Modifier and Type | Field and Description |
---|---|
static boolean |
cacheOn
Variable estática que si está a false desactiva el uso de caché.
|
protected boolean[] |
cancel |
protected boolean |
canceled |
protected int |
dataType |
static boolean |
forceToLoadInCache
Fuerza la carga de los datos en caché independientemente de su tamaño.
|
static boolean |
forceToLoadInReadOnlyCache
Fuerza la carga de los datos en caché de solo lectura independientemente de su tamaño.
|
protected int |
height |
static int |
INTERPOLATION_PROCESS |
protected int |
nBands |
NoData |
noDataValue |
protected double |
notValidValue
Valor con el que se rellena una banda no valida del buffer.
|
protected int |
progressInterpolation |
protected int |
width |
INCREMENTABLE_HISTOGRAM, INCREMENTABLE_INTERPOLATION, INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, INTERPOLATION_Undefined, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_IMAGE, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
Constructor and Description |
---|
RasterBuffer() |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this Store to the provided
Visitor . |
void |
addDrawableBands(int[] db)
Assigns the band list but only for a read only buffer
|
abstract Buffer |
cloneBuffer()
Clona el buffer actual y devuelve el clone
|
protected void |
finalize() |
Buffer |
getAdjustedWindow(int w,
int h,
int interpolationMethod)
Ajusta el área del grid a un ancho y un alto dado en pixeles.
|
double[][] |
getAllBandsLimits() |
int |
getBandCount()
Número de bandas
|
int |
getBlockHeight()
Gets the height of a block of data.
|
Rectangle2D |
getDataExtent()
Gets a bouding box of this buffer
|
int |
getDataSize()
Obtiene el tamaño del tipo de dato en bytes
|
int |
getDataType()
Obtiene el tipo de dato.
|
int |
getHeight()
Alto del raster
|
HistogramComputer |
getHistogramComputer()
Gets the object which computes the histogram
|
IncrementableTask |
getIncrementableTask(int type)
This call returns an incrementable task that is needed to load the buffer.
|
double[] |
getLimits()
Calcula el mínimo y el máximo del histograma previamente.
|
NoData |
getNoDataValue()
Gets the NoData value of this buffer
|
double |
getNotValidValue()
Obtiene el valor de no valido.
|
int |
getPercent() |
RasterDataStore |
getStore()
Gets the RasterDataStore reference
|
int |
getWidth()
Ancho del raster
|
boolean |
isCached()
Returns true if it is a cached buffer
|
boolean |
isFromStore(DataStore store)
Indicates whether this DataSet belongs to a specific store
|
boolean |
isInside(int x,
int y)
Obtiene true si el pixel pasado por parámetro cae dentro de los límites
del rater y false si cae fuera.
|
abstract void |
malloc(int dataType,
int width,
int height,
int bandNr)
Reserva de memoria para el rasterbuf
|
abstract void |
replicateBand(int orig,
int dest)
Replica la banda de una posición sobre otra.
|
void |
resetPercent() |
void |
setDataExtent(Rectangle2D r)
Sets a bounding box of this buffer
|
void |
setDataType(int dataType)
Asigna el tipo de dato.
|
void |
setNoDataValue(NoData nd)
Sets the NoData value
|
void |
setNotValidValue(double value)
Asigna el valor de no valido.
|
void |
setProcess(int process)
Asigna el proceso del cual se desea obtener información.
|
void |
setStore(RasterDataStore store)
Sets the RasterDataStore reference
|
long |
sizeof()
Obtiene el tamaño del buffer
|
abstract void |
switchBands(int[] bandPosition)
Cambia bandas de posición.
|
static String |
typesToString(int type)
Convierte un tipo de dato a cadena
|
project
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assign, assign, assign, assign, assign, assignBand, assignBandToNotValid, copyBand, createBand, getBand, getBandBuffer, getElemByte, getElemByte, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getElemInt, getElemInt, getElemShort, getElemShort, getLineByte, getLineDouble, getLineFloat, getLineFromBandByte, getLineFromBandDouble, getLineFromBandFloat, getLineFromBandInt, getLineFromBandShort, getLineInt, getLineShort, interchangeBands, isBandSwitchable, isReadOnlyBuffer, mallocOneBand, project, setElem, setElem, setElem, setElem, setElem, setElemByte, setElemDouble, setElemFloat, setElemInt, setElemShort, setLineByte, setLineDouble, setLineFloat, setLineInBandByte, setLineInBandDouble, setLineInBandFloat, setLineInBandInt, setLineInBandShort, setLineInt, setLineShort
dispose
public static final int INTERPOLATION_PROCESS
protected boolean[] cancel
public NoData noDataValue
protected int progressInterpolation
protected boolean canceled
protected int width
protected int height
protected int nBands
protected int dataType
public static boolean cacheOn
public static boolean forceToLoadInCache
public static boolean forceToLoadInReadOnlyCache
protected double notValidValue
public RasterDataStore getStore()
Buffer
public void setStore(RasterDataStore store)
Buffer
public abstract void malloc(int dataType, int width, int height, int bandNr)
dataType
- Tipo de datowidth
- Anchoheight
- AltobandNr
- Numero de bandasorig
- public int getWidth()
Buffer
public Rectangle2D getDataExtent()
getDataExtent
in interface Buffer
public void setDataExtent(Rectangle2D r)
setDataExtent
in interface Buffer
r
- public int getHeight()
Buffer
public int getBandCount()
Buffer
getBandCount
in interface Buffer
public int getDataType()
getDataType
in interface Buffer
public void setDataType(int dataType)
setDataType
in interface Buffer
dataType
- Tipo de dato del bufferpublic int getDataSize()
public long sizeof()
public abstract void replicateBand(int orig, int dest)
replicateBand
in interface Buffer
orig.
- Posición de la banda de origen.dest.
- Posición de la banda destinopublic abstract void switchBands(int[] bandPosition)
switchBands
in interface Buffer
bandPosition
- Array con la nueva distribución de bandaspublic static String typesToString(int type)
type
- Tipo de datopublic boolean isInside(int x, int y)
Buffer
public NoData getNoDataValue()
Buffer
getNoDataValue
in interface Buffer
public int getBlockHeight()
Buffer
getBlockHeight
in interface Buffer
public void setNoDataValue(NoData nd)
Buffer
setNoDataValue
in interface Buffer
public double getNotValidValue()
Buffer
getNotValidValue
in interface Buffer
public void setNotValidValue(double value)
Buffer
setNotValidValue
in interface Buffer
public abstract Buffer cloneBuffer()
Buffer
cloneBuffer
in interface Buffer
public Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws ProcessInterruptedException
getAdjustedWindow
in interface Buffer
w
- Ancho de la nueva imagen.h
- Alto de la nueva imagen.interpolation
- Método de interpolación que se usará en el ajuste.ProcessInterruptedException
public IncrementableTask getIncrementableTask(int type)
Buffer
getIncrementableTask
in interface Buffer
public HistogramComputer getHistogramComputer()
Histogramable
getHistogramComputer
in interface Histogramable
public double[] getLimits() throws ProcessInterruptedException
Buffer
getLimits
in interface Buffer
ProcessInterruptedException
public double[][] getAllBandsLimits() throws ProcessInterruptedException
getAllBandsLimits
in interface Buffer
ProcessInterruptedException
public void addDrawableBands(int[] db)
Buffer
addDrawableBands
in interface Buffer
public void resetPercent()
public int getPercent()
public void setProcess(int process)
process
- public boolean isCached()
Buffer
public boolean isFromStore(DataStore store)
DataSet
isFromStore
in interface DataSet
store
- a DataStorepublic void accept(Visitor visitor) throws BaseException
DataSet
Visitor
.
The values received through the Visitor.visit(Object)
method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object)
method execution, create a copy or clone
the received value in order to be stored.accept
in interface DataSet
accept
in interface Visitable
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visit