public class IlvRasterProperties extends Object implements IlvPersistentObject
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TILE_SIZE
The default size to give to the tiles of the image to load
|
static int |
NO_PIXEL
Indicates that there are no pixels in the raster for
computePixelIndex methods. |
Constructor and Description |
---|
IlvRasterProperties(IlvAdjustableDelegateColorModel colorModel)
Constructor initializing the size of the tile to the default value (
DEFAULT_TILE_SIZE ). |
IlvRasterProperties(IlvInputStream stream)
Reads the
rasterinfo from the specified input stream. |
Modifier and Type | Method and Description |
---|---|
int |
computePixelIndex(IlvCoordinate c)
Computes the pixel value for the specified Raster coordinate.
|
int |
computePixelIndex(int srcCol,
int srcLin)
Computes the index of the pixel in the original raster, its column and
line coordinates.
|
String |
getBaseName()
Retrieves the path to the data source.
|
int |
getBitPixelValue()
Indicates the number of bits needed to code a pixel value in the original
file.
|
IlvAdjustableDelegateColorModel |
getColorModel()
Retrieves the color model to use to produce the image.
|
int |
getColumnBlockCount()
The horizontal number of blocks in the original file.
|
int |
getColumnOrder()
The order of the blocks of pixels in the original file. 0 means from left
to right, 1 means from right to left.
|
int |
getColumnPixelCount()
The number of pixels in a scan line of a block in the original file.
|
double |
getHeight()
Returns the projected vertical size of the original raster.
|
double |
getHorizontalPixelDensity()
Gets the horizontal distance (along a line of latitude) covered by a
pixel.
|
double |
getInterpolatedIntPixel(IlvCoordinate c,
IlvRasterMappedBuffer buff)
Interpolates inter pixel data instead of returning the exact pixel value.
|
int |
getLineBlockCount()
Gets the vertical number of blocks of pixels in the original data file.
|
int |
getLinePixelCount()
Gets the number of pixels in a scan line of a block in the original
file.
|
String |
getName()
Retrieves the name of the file corresponding to the base name path.
|
int |
getNumColumns()
Returns the total number of columns in the original raster.
|
int |
getNumLines()
Returns the total number of lines in the original raster.
|
int |
getPixelBitCount()
Indicates the number of bits needed to code a pixel count in the original
file.
|
int |
getPixelOrder()
The coding of the pixel index in the original file.
|
int |
getRowOrder()
The vertical order of the blocks of pixels in the original file. 0 means
bottom to top, 1 means top to bottom.
|
int |
getTileHeight()
Indicates the size in pixels to adopt for the tiles used to represent the
image.
|
int |
getTileWidth()
Indicates the size in pixels to adopt for the tiles used to represent the
image.
|
int |
getTransparentColorIndex()
Returns the index of the color that must be used to represent a
transparent color.
|
int |
getUnitFactor()
Retrieves the factor multiplying all the distance values passed to the
reader.
|
double |
getVerticalPixelDensity()
Indicates the vertical distance (along a line of longitude) covered by a
pixel.
|
double |
getWidth()
Returns the projected horizontal size of the original raster.
|
double |
getX()
Returns the projected horizontal coordinate of the top left corner of the
original raster.
|
double |
getY()
Returns the projected vertical coordinate of the top left corner of the
original raster.
|
void |
setBaseName(String baseName)
Sets the name of the path to the source of the data.
|
void |
setBitPixelValue(int b)
Sets the number of bits used to code a pixel value in the original data
file.
|
void |
setBounds(IlvRect bounds)
Utility method to set the bounds of the image (x,y,width and height).
|
void |
setColorModel(IlvAdjustableDelegateColorModel colorModel)
Sets the color model to use to produce the images.
|
void |
setColumnBlockCount(int count)
Sets the horizontal number of blocks of pixels in the original data file.
|
void |
setColumnOrder(int order)
Sets if the blocks of pixels are ordered from left to right (0) or in the
opposite direction (1).
|
void |
setColumnPixelCount(int count)
Sets the number of pixels in a scan line of a block of pixels in the
original data file.
|
void |
setHeight(double height)
Sets the projected vertical size of the original raster.
|
void |
setHorizontalPixelDensity(double factor)
Returns the horizontal distance (along a line of latitude) covered by a
pixel.
|
void |
setLineBlockCount(int count)
Sets the vertical number of blocks of pixels in the original data file.
|
void |
setLinePixelCount(int count)
Sets the number of scan lines in a block of pixels in the original data
file.
|
void |
setPixelBitCount(int count)
Sets the number of bits needed to code a pixel count.
|
void |
setPixelOrder(int order)
Sets the coding of the pixel indexes.
|
void |
setRowOrder(int order)
Sets if the blocks of pixel are ordered from top to bottom (1) or in the
opposite direction (0).
|
void |
setTileHeight(int tileHeight)
Sets the size in pixels to adopt for the tiles used to represent the
image.
|
void |
setTileWidth(int tileWidth)
Sets the size in pixels to adopt for the tiles used to represent the
image.
|
void |
setTransparentColorIndex(int index)
Sets the index of the color that must be used to represent a transparent
color.
|
void |
setUnitFactor(int factor)
Set the unit of measure factor.
|
void |
setVerticalPixelDensity(double factor)
Indicates the vertical distance (along a line of longitude) covered by a
pixel.
|
void |
setWidth(double width)
Sets the projected horizontal size of the original raster.
|
void |
setX(double x)
Sets the projected horizontal coordinate of the top left corner of the
original raster.
|
void |
setY(double y)
Sets the projected vertical coordinate of the top left corner of the
original raster.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public static final int NO_PIXEL
computePixelIndex
methods.public static final int DEFAULT_TILE_SIZE
public IlvRasterProperties(IlvAdjustableDelegateColorModel colorModel)
DEFAULT_TILE_SIZE
).colorModel
- Color model to use.public IlvRasterProperties(IlvInputStream stream) throws IlvReadFileException
rasterinfo
from the specified input stream.stream
- The input stream.IlvReadFileException
- if an error occurs while reading the data.public double getInterpolatedIntPixel(IlvCoordinate c, IlvRasterMappedBuffer buff)
c
- Coordinate in the raster system ([x,x+width][y,y+height]).buff
- Buffer containing pixel values.public String getBaseName()
public int getBitPixelValue()
public IlvAdjustableDelegateColorModel getColorModel()
IlvRasterMappedBuffer
.IlvRasterMappedBuffer.getRasterDataType()
public int getColumnBlockCount()
public int getColumnOrder()
public int getColumnPixelCount()
public double getHeight()
public double getHorizontalPixelDensity()
public int getLineBlockCount()
public int getLinePixelCount()
public String getName()
public int getNumColumns()
public int getNumLines()
public int getPixelBitCount()
public int getPixelOrder()
public int getRowOrder()
public int getTileHeight()
public int getTileWidth()
public int getTransparentColorIndex()
public int getUnitFactor()
public double getVerticalPixelDensity()
getUnitFactor()
public double getWidth()
public double getX()
public double getY()
public void setBaseName(String baseName)
baseName
- A valid file path.public void setBitPixelValue(int b)
b
- The number of bits to code a value.public void setColorModel(IlvAdjustableDelegateColorModel colorModel)
IlvRasterMappedBuffer
.colorModel
- The color model to use to produce tile images.IlvRasterMappedBuffer.getRasterDataType()
public void setColumnBlockCount(int count)
count
- The horizontal number of blocks.public void setColumnOrder(int order)
order
- The order of the columns of the tile. Valid values are 0 and
1.public void setColumnPixelCount(int count)
count
- The number of pixels in a line of a block.public void setHeight(double height)
height
- The height of the original raster.public void setHorizontalPixelDensity(double factor)
factor
- a factor indicating the geographical coverage of a pixel on
a line of latitude.public void setLineBlockCount(int count)
count
- The vertical number of blocks.public void setLinePixelCount(int count)
count
- The number of scan lines in a block.public void setPixelBitCount(int count)
count
- A number of bits.public void setPixelOrder(int order)
order
- The rule to compute a pixel index in a tile.public void setRowOrder(int order)
order
- The order of the rows in the tile. Valid values are 0 or 1.public void setTileWidth(int tileWidth)
tileWidth
- Width in pixels for the tiles of the image.public void setTileHeight(int tileHeight)
tileHeight
- Height in pixels for the tiles of the image.public void setTransparentColorIndex(int index)
index
- The transparent color index.public void setUnitFactor(int factor)
factor
- The factor to apply to all distances passed as parameter to
the reader.getWidth()
,
getHorizontalPixelDensity()
,
getHeight()
,
getVerticalPixelDensity()
public void setVerticalPixelDensity(double factor)
factor
- A factor indicating the geographical coverage of a pixel on
longitudes axis.public void setWidth(double width)
width
- The width of the original raster.public void setX(double x)
x
- The original projected horizontal coordinate.public void setY(double y)
y
- The original projected vertical coordinate.public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
public int computePixelIndex(IlvCoordinate c)
c
- Coordinate inside [x,x+width] and [y,y+height]public int computePixelIndex(int srcCol, int srcLin)
IlvRasterProperties
.srcCol
- The column of the pixel.srcLin
- The line of the pixel.public void setBounds(IlvRect bounds)
bounds
- bounds to use.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.