|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.sde.sdk.client.SeRasterTile
public class SeRasterTile
A SeRasterTile
object provide client side methods for
ArcSDE raster tile data Input/Output operation.
SeRasterColumn
,
SeRaster
,
SeRasterBand
,
SeRasterAttr
Constructor Summary | |
---|---|
SeRasterTile()
Creates a new SeRasterTile instance. |
Method Summary | |
---|---|
SeObjectId |
getBandId()
Retrieves raster band ID. |
byte[] |
getBitMaskData()
Return bit mask data, if exist, else return Zero length byte[] array. |
int |
getColumnIndex()
Retrieves tile's column index number. |
int |
getLevel()
Retrieves scaling factor (ie, level of detail) info, level 0 is the base image level,
level N is the N -th reduction image. |
int |
getNumPixels()
Retrieves number of pixels. |
byte[] |
getPixelData()
Retrieves pixel data and bitmask data if exist. |
byte[] |
getPixels(byte[] bArray)
Returns a byte[] array containing all pixels for
this tile, each pixel value is represented by an unsiged-byte. |
double[] |
getPixels(double[] dArray)
Returns a double[] array containing all pixels for
this tile, each pixel value is represented by a double. |
byte[] |
getPixels(double statsMin,
double statsMax,
byte[] bArray)
Returns a byte[] array containing all pixels for
this tile, each pixel value is represented by an unsiged-byte. |
double[] |
getPixels(double statsMin,
double statsMax,
double[] dArray)
Returns a double[] array containing all pixels for
this tile, each pixel value is represented by a double. |
float[] |
getPixels(double statsMin,
double statsMax,
float[] fArray)
Returns a float[] array containing all pixels for
this tile, each pixel value is represented by a float. |
int[] |
getPixels(double statsMin,
double statsMax,
int[] iArray)
Returns an int[] array containing all pixels for
this tile, each pixel value is represented by an int. |
float[] |
getPixels(float[] fArray)
Returns a float[] array containing all pixels for
this tile, each pixel value is represented by a float. |
int[] |
getPixels(int[] iArray)
Returns an int[] array containing all pixels for
this tile, each pixel value is represented by an int. |
int |
getPixelType()
Retrieves pixel type. |
int |
getRowIndex()
Retrieves tile's row index number. |
boolean |
hasBitMask()
Return true if bit mask exist. |
void |
setBandId(SeObjectId rasBandIdObj)
Sets raster band ID. |
void |
setLevel(int level)
Sets scaling factor (ie, level of detail) info, level 0 is the base image level,
level N is the N -th reduction image. |
void |
setPixelData(byte[] pixelData)
Sets tile's pixel data. |
void |
setRowColumnIndex(int row,
int column)
Sets tile's row and column index position. |
java.lang.String |
toString()
toString () method for SeRasterTile object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SeRasterTile()
SeRasterTile
instance.
Method Detail |
---|
public boolean hasBitMask()
true
if bit mask exist.
boolean
valuepublic byte[] getBitMaskData()
byte[]
valuepublic SeObjectId getBandId()
SeObjectId
valuesetBandId(com.esri.sde.sdk.client.SeObjectId)
public int getColumnIndex()
int
valuesetRowColumnIndex(int, int)
,
getRowIndex()
public int getLevel()
0
is the base image level,
level N
is the N
-th reduction image.
int
valuesetLevel(int)
public int getNumPixels()
int
valuepublic byte[] getPixelData()
byte[]
valuesetPixelData(byte[])
,
getPixels(byte[])
,
getPixels(double, double, byte[])
,
getPixels(int[])
,
getPixels(double, double, int[])
,
getPixels(float[])
,
getPixels(double, double, float[])
,
getPixels(double[])
,
getPixels(double, double, double[])
public byte[] getPixels(byte[] bArray) throws java.lang.Exception
byte[]
array containing all pixels for
this tile, each pixel value is represented by an unsiged-byte.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated bArray[]
is too small.
Copy the pixel value as is from the source and cast it to the
output byte[]
array. But, throw an exception if
pixel_type are of the following for potentially overflow reason.
SeRaster.SE_PIXEL_TYPE: 16BIT_S, 16BIT_U, 32BIT_S, 32BIT_U,
32BIT_REAL or 64BIT_REAL.
bArray
- An optionally pre-allocated byte[]
array
byte[]
value
java.lang.Exception
- if an error occurs.getPixels(double, double, byte[])
public byte[] getPixels(double statsMin, double statsMax, byte[] bArray) throws java.lang.Exception
byte[]
array containing all pixels for
this tile, each pixel value is represented by an unsiged-byte.
This is useful in Java AWT image environment for constructing
pixel with packed RGB component represented by an int
value. An ArrayIndexOutOfBoundException may be thrown if the
optional pre-allocated bArray[]
is too small.
if (statsMin == statsMax)
, this is same as calling
. Which attempt to
just copy the pixel value from the source as is and cast it
to the output getPixels(byte[])
byte[]
array. But, throw an
exception if pixel_type are of the following for potentially
overflow reason.
SeRaster.SE_PIXEL_TYPE: 16BIT_S, 16BIT_U, 32BIT_S, 32BIT_U,
32BIT_REAL or 64BIT_REAL.
if (statsMin != statsMax)
, attempt to stretch/shrink
the source pixel value with the following formula and cast the
result to the output byte[]
array.
int UINT8_MAX_VALUE = 0xff; double f = (double) UINT8_MAX_VALUE / (statsMax - statsMin); for (int i=0; i < numOfPixels; i++) bArray[i] = (byte) (((double) srcPixelVal[i] - statsMin) * f);
statsMin
- pixels statistic min value.statsMax
- pixels statistic max value.bArray
- An optionally pre-allocated output
byte[]
array.
byte[]
value
java.lang.Exception
- if an error occurs.getPixels(byte[])
,
getPixelData()
,
setPixelData(byte[])
,
SeRasterData.decodePixelsConvertToObject(int, byte[], int, double, double, java.lang.Object, int, double, int)
public int[] getPixels(int[] iArray) throws java.lang.Exception
int[]
array containing all pixels for
this tile, each pixel value is represented by an int.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated iArray[]
is too small.
Copy the pixel value as is from the source and cast it to the
output int[]
array. But, throw an exception if
pixel_type are of the following for potentially overflow reason.
SeRaster.SE_PIXEL_TYPE: 32BIT_U, 32BIT_REAL and 64BIT_REAL.
iArray
- An optionally pre-allocated output
int[]
array.
int[]
value
java.lang.Exception
- if an error occurs.getPixels(double, double, int[])
public int[] getPixels(double statsMin, double statsMax, int[] iArray) throws java.lang.Exception
int[]
array containing all pixels for
this tile, each pixel value is represented by an int.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated iArray[]
is too small.
if
if
(statsMin == statsMax)
, this is same as calling
. Which attempt to
just copy the pixel value from the source as is and cast it
to the output getPixels(byte[])
int[] array. But, throw an exception
if pixel_type are of the following for potentially overflow
reason.
SeRaster.SE_PIXEL_TYPE: 32BIT_U, 32BIT_REAL and 64BIT_REAL
(statsMin != statsMax)
, attempt to stretch/shrink
the source pixel value with the following formula and cast the
result to the output int[]
array.
double f = (double) Integer.MAX_VALUE / (statsMax - statsMin);
for (int i=0; i < numOfPixels; i++)
iArray[i] = (int) (((double) srcPixelVal[i] - statsMin) * f);
statsMin
- pixels statistic min value.statsMax
- pixels statistic max value.iArray
- An optionally pre-allocated output
int[]
array.
int[]
value
java.lang.Exception
- if an error occurs.getPixels(int[])
,
getPixelData()
,
setPixelData(byte[])
,
SeRasterData.decodePixelsConvertToObject(int, byte[], int, double, double, java.lang.Object, int, double, int)
public float[] getPixels(float[] fArray) throws java.lang.Exception
float[]
array containing all pixels for
this tile, each pixel value is represented by a float.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated fArray[]
is too small.
Copy the pixel value as is from the source and cast it to the
output float[]
array. But, throw an exception if
pixel_type is 64BIT_REAL
for potentially overflow
reason.
fArray
- An optionally pre-allocated output
float[]
array
float[]
value
java.lang.Exception
- if an error occurs.getPixels(double, double, float[])
public float[] getPixels(double statsMin, double statsMax, float[] fArray) throws java.lang.Exception
float[]
array containing all pixels for
this tile, each pixel value is represented by a float.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated fArray
is too small.
if (statsMin == statsMax)
, this is same as calling
. Which attempt to
just copy the pixel value as is from the source and cast it
to the output getPixels(float[])
float[]
array. But, throw an
exception if pixel_type is 64BIT_REAL
for
potentially overflow reason.
if (statsMin != statsMax)
, attempt to stretch/shrink
the source pixel value with the following formula and cast
the result to the output float[]
array.
double f = (double) Float.MAX_VALUE / (statsMax - statsMin); for (int i=0; i < numOfPixels; i++) fArray[i] = (float) (((double) srcPixelVal[i] - statsMin) * f);
statsMin
- pixels statistic min value.statsMax
- pixels statistic max value.fArray
- An optionally pre-allocated output
float[]
array.
float[]
value
java.lang.Exception
- if an error occurs.getPixels(float[])
,
getPixelData()
,
setPixelData(byte[])
,
SeRasterData.decodePixelsConvertToObject(int, byte[], int, double, double, java.lang.Object, int, double, int)
public double[] getPixels(double[] dArray) throws java.lang.Exception
double[]
array containing all pixels for
this tile, each pixel value is represented by a double.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated dArray[]
is too small.
Copy the pixel value as is from the source and cast it to the
output double[]
array.
dArray
- An optionally pre-allocated outpu
double[]
array.
double[]
value
java.lang.Exception
- if an error occurs.getPixels(double, double, double[])
public double[] getPixels(double statsMin, double statsMax, double[] dArray) throws java.lang.Exception
double[]
array containing all pixels for
this tile, each pixel value is represented by a double.
An ArrayIndexOutOfBoundException may be thrown if the optional
pre-allocated dArray[]
is too small.
if (statsMin == statsMax)
, this is same as calling
. Which attempt to
just copy the pixel value from the source and cast it to
the output getPixels(double[])
double[]
array.
if (statsMin != statsMax)
, attempt to stretch the source
pixel value with the following formula and cast the result to
the output double[]
array.
double f = Double.MAX_VALUE / (statsMax - statsMin); for (int i=0; i < numOfPixels; i++) dArray[i] = (double) (((double) srcPixelVal[i] - statsMin) * f);
statsMin
- pixels statistic min value.statsMax
- pixels statistic max value.dArray
- An optionally pre-allocated output
double[]
array.
double[]
value
java.lang.Exception
- if an error occurs.getPixels(double[])
,
getPixelData()
,
setPixelData(byte[])
,
SeRasterData.decodePixelsConvertToObject(int, byte[], int, double, double, java.lang.Object, int, double, int)
public int getPixelType()
SeRasterBand.setPixelType(int)
for valid pixel_type
values.
int
valuepublic int getRowIndex()
int
valuesetRowColumnIndex(int, int)
,
getColumnIndex()
public void setBandId(SeObjectId rasBandIdObj) throws SeException
rasBandIdObj
- a SeObjectId
value
SeException
- if an error occurs.getBandId()
public void setLevel(int level) throws SeException
0
is the base image level,
level N
is the N
-th reduction image.
level
- level of detail.
SeException
- if an error occurs.getLevel()
public void setPixelData(byte[] pixelData) throws SeException
getPixelData
pixelData
- a byte[]
value
SeException
- if an error occurs.getPixelData()
public void setRowColumnIndex(int row, int column) throws SeException
row
- an int
value.column
- an int
value.
SeException
- if an error occurs.getRowIndex()
,
getColumnIndex()
public java.lang.String toString()
toString
in class java.lang.Object
String
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |