public class RasterImage
extends java.lang.Object
Constructor and Description |
---|
RasterImage(java.sql.Blob blob,
long height,
long width,
long nbands,
java.lang.String cellDepth,
java.lang.String interleaving)
Constructs a RasterImage object with image information and image data
in Blob.
|
RasterImage(byte[] data,
long height,
long width,
long nbands,
java.lang.String cellDepth,
java.lang.String interleaving)
Constructs a RasterImage object with image information and image data
in byte[].
|
Modifier and Type | Method and Description |
---|---|
GeorColormap |
getColormap()
Get Colormap
|
GeorGrayscale |
getGrayScale()
Get Grayscale
|
java.util.Vector<GeoRasterImage.NodataMapping> |
getNodataMappings()
Get nodatamapping.
|
java.awt.image.RenderedImage |
getRenderedImage(boolean isExport)
Create a RenderedImage object from the image.
|
boolean |
hasAlpha()
Check if this image has alpha channel
|
void |
setBandStatistics(java.lang.String bandName,
double min,
double max,
double std,
double mean,
GeorHistogram histogram)
Set band statistics for certain bands.
|
void |
setColormap(GeorColormap colormap)
Set Colormap
|
void |
setGrayscale(GeorGrayscale grayscale)
Set Grayscale
|
void |
setImageProcessing(int method)
Set the image processing operator.
|
void |
setNodataMappings(java.util.Vector<GeoRasterImage.NodataMapping> nodataMapping)
Set nodatamapping.
|
public RasterImage(byte[] data, long height, long width, long nbands, java.lang.String cellDepth, java.lang.String interleaving) throws GeoRasterException
data
- The raw image data in a byte array.height
- The height of the image.width
- The width of the image.cellDepth
- The cell depth of the image pixel, which is defined
in RasterInfo class.interleaving
- The interleaving of the image, which is defined
in RasterInfo class.GeoRasterException
public RasterImage(java.sql.Blob blob, long height, long width, long nbands, java.lang.String cellDepth, java.lang.String interleaving) throws GeoRasterException, java.io.IOException, java.sql.SQLException
data
- The raw image data in a byte array.height
- The height of the image.width
- The width of the image.cellDepth
- The cell depth of the image pixel, which is defined
in RasterInfo class.interleaving
- The interleaving of the image, which is defined
in RasterInfo class.GeoRasterException
java.io.IOException
java.sql.SQLException
public void setColormap(GeorColormap colormap)
colormap
- The colormap to be associated the imagepublic GeorColormap getColormap()
public void setGrayscale(GeorGrayscale grayscale)
grayscale
- The grayscale to be associated the imagepublic GeorGrayscale getGrayScale()
public boolean hasAlpha()
public void setNodataMappings(java.util.Vector<GeoRasterImage.NodataMapping> nodataMapping) throws GeoRasterException
nodataMapping
- The nodata mappings of the image.GeoRasterException
public java.util.Vector<GeoRasterImage.NodataMapping> getNodataMappings()
public void setImageProcessing(int method) throws GeoRasterException
method
- The method of the image processing defined in
GeoRasterImage class.GeoRasterException
public void setBandStatistics(java.lang.String bandName, double min, double max, double std, double mean, GeorHistogram histogram)
bandName
- The name of the band, one of "red", "green" and "blue"min
- The minimum value of the pixel in the band.max
- The maximum value of the pixel in the band.std
- The standard deviation value of the pixel in the band.mean
- The mean value of the pixel in the band.histogram
- The histogram of the band.public java.awt.image.RenderedImage getRenderedImage(boolean isExport) throws GeoRasterException, java.io.IOException
GeoRasterException
java.io.IOException