public interface Buffer extends Histogramable
Modifier and Type | Field and Description |
---|---|
static double |
defaultNoDataValue |
static boolean |
noDataValueEnable |
static int |
READ_ONLY |
static int |
READ_WRITE |
static int |
READ_WRITE_CVERT |
static int |
TYPE_BYTE |
static int |
TYPE_DOUBLE |
static int |
TYPE_FLOAT |
static int |
TYPE_INT |
static int |
TYPE_SHORT |
static int |
TYPE_UNDEFINED |
static int |
TYPE_USHORT |
Modifier and Type | Method and Description |
---|---|
Band |
addBand(int pos)
Makes an empty band without initial value in the selected position
|
void |
addDrawableBands(int[] bands)
Selects bands for read-only buffers which referencing a image in disk
|
void |
assign(int band,
byte value) |
void |
assign(int band,
double value) |
void |
assign(int band,
float value) |
void |
assign(int band,
int value) |
void |
assign(int band,
short value) |
void |
assignBand(int nBand,
Band band)
Creates a new band assigning other by reference.
|
void |
assignBandToNotValid(int iBand)
Asigna una banda al valor especificado como no valido.
|
Buffer |
cloneBuffer()
Clona el buffer actual y devuelve el clone
|
void |
copyBand(int nBand,
Band band)
Sustituye una banda completa copiando los datos de la que se pasa por parámetro
|
Band |
createBand(double defaultValue)
This method create a new band with the value in selected in
the parameter.
|
void |
free()
Libera el buffer de memoria
|
Buffer |
getAdjustedWindow(int w,
int h,
int interpolationMethod)
Ajusta el área del grid a un ancho y un alto dado en pixeles.
|
Band |
getBand(int nBand)
Gets a band from raster by reference.
|
Band |
getBandCopy(int nBand)
Gets a copy of one band from ra.
|
int |
getBandCount()
Número de bandas
|
java.util.ArrayList<Band> |
getBandList()
Gets all bands in an IRasterBand array by reference.
|
Band[] |
getBands()
Gets all bands in an IRasterBand array by reference.
|
Buffer |
getBufferWithOneBand(int nBand)
Gets a buffer with only one band.
|
java.awt.geom.Rectangle2D |
getDataExtent()
Gets a bouding box of this buffer
|
int |
getDataType()
Obtiene el tipo de dato.
|
void |
getElemByte(int line,
int col,
byte[] data)
Gets one element of each band from the array if this is byte datatype
|
byte |
getElemByte(int line,
int col,
int band)
Gets one element from the array if this is byte datatype
|
void |
getElemDouble(int line,
int col,
double[] data)
Gets one element of each band from the array if this is double datatype
|
double |
getElemDouble(int line,
int col,
int band)
Gets one element from the array if this is double datatype
|
void |
getElemFloat(int line,
int col,
float[] data)
Gets one element of each band from the array if this is float datatype
|
float |
getElemFloat(int line,
int col,
int band)
Gets one element from the array if this is float datatype
|
int |
getElemInt(int line,
int col,
int band)
Gets one element from the array if this is int datatype
|
void |
getElemInt(int line,
int col,
int[] data)
Gets one element of each band from the array if this is int datatype
|
short |
getElemShort(int line,
int col,
int band)
Gets one element from the array if this is short datatype
|
void |
getElemShort(int line,
int col,
short[] data)
Gets one element of each band from the array if this is short datatype
|
int |
getHeight()
Alto del raster
|
byte[][] |
getLineByte(int line)
Obtiene una línea de datos con todas las bandas para buffers con tipo
de dato byte.
|
double[][] |
getLineDouble(int line)
Obtiene una línea de datos con todas las bandas para buffers con tipo
de dato double.
|
float[][] |
getLineFloat(int line)
Obtiene una línea de datos con todas las bandas para buffers con tipo
de dato float.
|
byte[] |
getLineFromBandByte(int line,
int band)
Obtiene una línea de datos de la banda solicitada para buffers con tipo
de dato byte.
|
double[] |
getLineFromBandDouble(int line,
int band)
Obtiene una línea de datos de la banda solicitada para buffers con tipo
de dato double.
|
float[] |
getLineFromBandFloat(int line,
int band)
Obtiene una línea de datos de la banda solicitada para buffers con tipo
de dato float.
|
int[] |
getLineFromBandInt(int line,
int band)
Obtiene una línea de datos de la banda solicitada para buffers con tipo
de dato int.
|
short[] |
getLineFromBandShort(int line,
int band)
Obtiene una línea de datos de la banda solicitada para buffers con tipo
de dato short.
|
int[][] |
getLineInt(int line)
Obtiene una línea de datos con todas las bandas para buffers con tipo
de dato int.
|
short[][] |
getLineShort(int line)
Obtiene una línea de datos con todas las bandas para buffers con tipo
de dato short.
|
BufferNoData |
getNoDataValue()
Get no data value
|
double |
getNotValidValue()
Obtiene el valor de no valido.
|
BufferStats |
getStatistics()
Gets the statistics object
|
java.lang.Object |
getStore()
Gets the RasterDataStore reference
|
int |
getWidth()
Ancho del raster
|
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.
|
boolean |
isWritable()
Get true if current buffer is writable and false if is not.
|
void |
removeBand(int pos)
Removes a band from memory buffer
|
void |
replicateBand(int orig,
int dest)
Replica la banda de una posición sobre otra.
|
void |
setDataExtent(java.awt.geom.Rectangle2D extent)
Sets the bounding box of this buffer
|
void |
setDataType(int dataType)
Asigna el tipo de dato.
|
void |
setElem(int line,
int col,
int band,
byte data) |
void |
setElem(int line,
int col,
int band,
double data) |
void |
setElem(int line,
int col,
int band,
float data) |
void |
setElem(int line,
int col,
int band,
int data) |
void |
setElem(int line,
int col,
int band,
short data) |
void |
setElemByte(int line,
int col,
byte[] data) |
void |
setElemDouble(int line,
int col,
double[] data) |
void |
setElemFloat(int line,
int col,
float[] data) |
void |
setElemInt(int line,
int col,
int[] data) |
void |
setElemShort(int line,
int col,
short[] data) |
void |
setLineByte(byte[][] data,
int line) |
void |
setLineDouble(double[][] data,
int line) |
void |
setLineFloat(float[][] data,
int line) |
void |
setLineInBandByte(byte[] data,
int line,
int band)
Sets a line of byte data
|
void |
setLineInBandDouble(double[] data,
int line,
int band)
Sets a line of double data
|
void |
setLineInBandFloat(float[] data,
int line,
int band)
Sets a line of float data
|
void |
setLineInBandInt(int[] data,
int line,
int band)
Sets a line of int data
|
void |
setLineInBandShort(short[] data,
int line,
int band)
Sets a line of short data
|
void |
setLineInt(int[][] data,
int line) |
void |
setLineShort(short[][] data,
int line) |
void |
setNoDataValue(BufferNoData noDataValue)
Sets no data value
|
void |
setNotValidValue(double value)
Asigna el valor de no valido.
|
void |
setStore(java.lang.Object store)
Sets the RasterDataStore reference
|
void |
swapBands(int[] bands)
Intercambia la posición de las bandas.
|
void |
swapBands(int band1,
int band2)
Swap two bands.
|
getHistogramComputer
static final boolean noDataValueEnable
static final double defaultNoDataValue
static final int TYPE_UNDEFINED
static final int TYPE_BYTE
static final int TYPE_SHORT
static final int TYPE_USHORT
static final int TYPE_INT
static final int TYPE_FLOAT
static final int TYPE_DOUBLE
static final int READ_ONLY
static final int READ_WRITE
static final int READ_WRITE_CVERT
int getWidth()
int getHeight()
int getBandCount()
int getDataType()
void setDataType(int dataType)
dataType
- Tipo de dato del bufferBufferNoData getNoDataValue()
void setNoDataValue(BufferNoData noDataValue)
boolean isWritable()
boolean isInside(int x, int y)
x
- Posición X del pixel a averiguary
- Posición Y del pixel a averiguarjava.awt.geom.Rectangle2D getDataExtent()
void setDataExtent(java.awt.geom.Rectangle2D extent)
extent
- void free() throws java.io.IOException
java.io.IOException
void setStore(java.lang.Object store)
store
- java.lang.Object getStore()
byte[][] getLineByte(int line) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarOperationNotSupportedException
short[][] getLineShort(int line) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarOperationNotSupportedException
int[][] getLineInt(int line) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarOperationNotSupportedException
float[][] getLineFloat(int line) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarOperationNotSupportedException
double[][] getLineDouble(int line) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarOperationNotSupportedException
byte[] getLineFromBandByte(int line, int band) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarband
- Número de banda a recuperarOperationNotSupportedException
short[] getLineFromBandShort(int line, int band) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarband
- Número de banda a recuperarOperationNotSupportedException
int[] getLineFromBandInt(int line, int band) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarband
- Número de banda a recuperarOperationNotSupportedException
float[] getLineFromBandFloat(int line, int band) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarband
- Número de banda a recuperarOperationNotSupportedException
double[] getLineFromBandDouble(int line, int band) throws OperationNotSupportedException
line
- Número de línea del buffer a recuperarband
- Número de banda a recuperarOperationNotSupportedException
byte getElemByte(int line, int col, int band)
line
- Y positioncol
- X positionband
- Number of band to readshort getElemShort(int line, int col, int band)
line
- Y positioncol
- X positionband
- Number of band to readint getElemInt(int line, int col, int band)
line
- Y positioncol
- X positionband
- Number of band to readfloat getElemFloat(int line, int col, int band)
line
- Y positioncol
- X positionband
- Number of band to readdouble getElemDouble(int line, int col, int band)
line
- Y positioncol
- X positionband
- Number of band to readvoid getElemByte(int line, int col, byte[] data)
line
- Y positioncol
- X positiondata
- Each element of this array is a diferent band of the position line, colvoid getElemShort(int line, int col, short[] data)
line
- Y positioncol
- X positiondata
- Each element of this array is a diferent band of the position line, colvoid getElemInt(int line, int col, int[] data)
line
- Y positioncol
- X positiondata
- Each element of this array is a diferent band of the position line, colvoid getElemFloat(int line, int col, float[] data)
line
- Y positioncol
- X positiondata
- Each element of this array is a diferent band of the position line, colvoid getElemDouble(int line, int col, double[] data)
line
- Y positioncol
- X positiondata
- Each element of this array is a diferent band of the position line, colvoid setLineInBandByte(byte[] data, int line, int band) throws OperationNotSupportedException
data
- Array of dataline
- Y positionband
- Númber of bandOperationNotSupportedException
void setLineInBandShort(short[] data, int line, int band) throws OperationNotSupportedException
data
- Array of dataline
- Y positionband
- Númber of bandOperationNotSupportedException
void setLineInBandInt(int[] data, int line, int band) throws OperationNotSupportedException
data
- Array of dataline
- Y positionband
- Númber of bandOperationNotSupportedException
void setLineInBandFloat(float[] data, int line, int band) throws OperationNotSupportedException
data
- Array of dataline
- Y positionband
- Númber of bandOperationNotSupportedException
void setLineInBandDouble(double[] data, int line, int band) throws OperationNotSupportedException
data
- Array of dataline
- Y positionband
- Númber of bandOperationNotSupportedException
void setLineByte(byte[][] data, int line) throws OperationNotSupportedException
OperationNotSupportedException
void setLineShort(short[][] data, int line) throws OperationNotSupportedException
OperationNotSupportedException
void setLineInt(int[][] data, int line) throws OperationNotSupportedException
OperationNotSupportedException
void setLineFloat(float[][] data, int line) throws OperationNotSupportedException
OperationNotSupportedException
void setLineDouble(double[][] data, int line) throws OperationNotSupportedException
OperationNotSupportedException
void setElem(int line, int col, int band, byte data) throws OperationNotSupportedException
OperationNotSupportedException
void setElem(int line, int col, int band, short data) throws OperationNotSupportedException
OperationNotSupportedException
void setElem(int line, int col, int band, int data) throws OperationNotSupportedException
OperationNotSupportedException
void setElem(int line, int col, int band, float data) throws OperationNotSupportedException
OperationNotSupportedException
void setElem(int line, int col, int band, double data) throws OperationNotSupportedException
OperationNotSupportedException
void setElemByte(int line, int col, byte[] data) throws OperationNotSupportedException
OperationNotSupportedException
void setElemShort(int line, int col, short[] data) throws OperationNotSupportedException
OperationNotSupportedException
void setElemInt(int line, int col, int[] data) throws OperationNotSupportedException
OperationNotSupportedException
void setElemFloat(int line, int col, float[] data) throws OperationNotSupportedException
OperationNotSupportedException
void setElemDouble(int line, int col, double[] data) throws OperationNotSupportedException
OperationNotSupportedException
void assign(int band, byte value) throws OperationNotSupportedException
OperationNotSupportedException
void assign(int band, short value) throws OperationNotSupportedException
OperationNotSupportedException
void assign(int band, int value) throws OperationNotSupportedException
OperationNotSupportedException
void assign(int band, float value) throws OperationNotSupportedException
OperationNotSupportedException
void assign(int band, double value) throws OperationNotSupportedException
OperationNotSupportedException
void removeBand(int pos) throws java.io.IOException
band
- Number of bandjava.io.IOException
Band addBand(int pos) throws java.io.IOException
java.io.IOException
void copyBand(int nBand, Band band) throws BandNotCompatibleException, OperationNotSupportedException
nBand
- Número de banda a sustituirbanda
- a copiarOperationNotSupportedException
BandNotCompatibleException
void assignBand(int nBand, Band band) throws java.io.IOException, BandNotCompatibleException
nBand
- band number to be assignedbanda
- Assigned bandjava.io.IOException
BandNotCompatibleException
Band getBand(int nBand)
nBand
- Band numberBand getBandCopy(int nBand)
nBand
- Band numberBand[] getBands()
java.util.ArrayList<Band> getBandList()
Buffer getBufferWithOneBand(int nBand) throws java.io.IOException, OperationNotSupportedException
nBand
- Band numberjava.io.IOException
OperationNotSupportedException
Band createBand(double defaultValue) throws OperationNotSupportedException
defaultValue
- Default value in new bandOperationNotSupportedException
void replicateBand(int orig, int dest) throws java.io.IOException
orig.
- Posición de la banda de origen.dest.
- Posición de la banda destinojava.io.IOException
Buffer cloneBuffer()
void swapBands(int band1, int band2) throws WrongParameterException, java.io.IOException
band1
- band to swap with band2band2
- band to swap with band1java.io.IOException
WrongParameterException
void swapBands(int[] bands) throws WrongParameterException, java.io.IOException
Por ejemplo un array con los valores: [2, 0, 1] significa que la banda que ocupa ahora la posición 2 pasará a ocupar la 0, la que tiene la posición 0 pasa a ocupar la 1 y la que tiene la posición 1 pasa a ocupar la 2.
bands
- Array con la nueva distribución de bandasWrongParameterException
java.io.IOException
void setNotValidValue(double value)
value
- double getNotValidValue()
void assignBandToNotValid(int iBand) throws OperationNotSupportedException
iBand
- Número de bandaOperationNotSupportedException
BufferStats getStatistics()
Buffer getAdjustedWindow(int w, int h, int interpolationMethod) throws ProcessInterruptedException
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
void addDrawableBands(int[] bands)
bands
-