| javax.imageio.ImageReadParam org.geotools.image.io.RawBinaryImageReadParam
RawBinaryImageReadParam | public class RawBinaryImageReadParam extends ImageReadParam (Code) | | A class describing how a raw binary stream is to be decoded. In the context of
RawBinaryImageReader , the stream may not contains enough information
for an optimal decoding. For example the stream may not contains image's
width and height. The
RawBinaryImageReadParam gives a chance
to specify those missing informations.
since: 2.0 version: $Id: RawBinaryImageReadParam.java 26708 2007-08-27 19:42:59Z desruisseaux $ author: Martin Desruisseaux |
Constructor Summary | |
public | RawBinaryImageReadParam() Constructs a new
RawBinaryImageReadParam with default parameters. |
Method Summary | |
final ImageTypeSpecifier | getDestinationType(int numBands) Creates a destination type with the specified number of bands. | public double | getPadValue() | public int | getStreamDataType() Returns the data type in input stream, or
DataBuffer.TYPE_UNDEFINED if unknow. | public Dimension | getStreamImageSize() Returns the image size in the input stream, or
null if unknow. | public SampleModel | getStreamSampleModel() Returns a sample model indicating the data layout in the input stream. | final SampleModel | getStreamSampleModel(SampleModel defaultSampleModel) Returns a sample model indicating the data layout in the input stream.
The
SampleModel 's width and height should matches the image
size in the input stream.
Parameters: defaultSampleModel - A default sample model, or null if there is no default. | public void | setDestinationType(int destType) Sets the desired image type for the destination image, using one of
DataBuffer enumeration constant. | public void | setPadValue(double padValue) Set the pad value. | public void | setStreamDataType(int dataType) Specifies the data type in input stream. | public void | setStreamImageSize(Dimension size) Specifies the image size in the input stream. | public void | setStreamSampleModel(SampleModel model) Set a sample model indicating the data layout in the input stream.
Indications comprise image size and data type, i.e. |
RawBinaryImageReadParam | public RawBinaryImageReadParam()(Code) | | Constructs a new
RawBinaryImageReadParam with default parameters.
|
getDestinationType | final ImageTypeSpecifier getDestinationType(int numBands)(Code) | | Creates a destination type with the specified number of bands.
If no such destination type is available, returns
null .
|
getPadValue | public double getPadValue()(Code) | | Returns the pad value, or
Double.NaN if there is none
|
getStreamSampleModel | public SampleModel getStreamSampleModel()(Code) | | Returns a sample model indicating the data layout in the input stream.
The
SampleModel 's width and height should matches the image
size in the input stream.
A sample model indicating the data layout in the input stream,or null if unknow. |
getStreamSampleModel | final SampleModel getStreamSampleModel(SampleModel defaultSampleModel)(Code) | | Returns a sample model indicating the data layout in the input stream.
The
SampleModel 's width and height should matches the image
size in the input stream.
Parameters: defaultSampleModel - A default sample model, or null if there is no default. If this RawBinaryImageReadParam contains unspecified sample model, image size or data type, valuesfrom defaultSampleModel will be used. A sample model indicating the data layout in the input stream,or null if unknow. |
setDestinationType | public void setDestinationType(int destType)(Code) | | Sets the desired image type for the destination image, using one of
DataBuffer enumeration constant. This setting will override
any previous setting made with
RawBinaryImageReadParam.setDestinationType(ImageTypeSpecifier) or this
setDestinationType(int) method.
Parameters: destType - The data type. This should be a constant from DataBuffer.Common types are DataBuffer.TYPE_INT, DataBuffer.TYPE_FLOATand DataBuffer.TYPE_DOUBLE. |
setPadValue | public void setPadValue(double padValue)(Code) | | Set the pad value.
Parameters: padValue - The pad value, or Double.NaN if there is none. |
setStreamDataType | public void setStreamDataType(int dataType)(Code) | | Specifies the data type in input stream. Setting data type to
DataBuffer.TYPE_UNDEFINED reset the default value, which
is reader dependent.
Parameters: dataType - The data type, or DataBuffer.TYPE_UNDEFINED if unknow.Know data type should be a constant from DataBuffer. Commontypes are DataBuffer.TYPE_INT, DataBuffer.TYPE_FLOATand DataBuffer.TYPE_DOUBLE. |
setStreamImageSize | public void setStreamImageSize(Dimension size)(Code) | | Specifies the image size in the input stream. Setting the size to
null reset the default size, which is reader dependent. Most readers will thrown an
exception at reading time if the image size is unspecified.
Parameters: size - The expected image size, or null if unknow. |
setStreamSampleModel | public void setStreamSampleModel(SampleModel model)(Code) | | Set a sample model indicating the data layout in the input stream.
Indications comprise image size and data type, i.e. calling this
method with a non-null value is equivalent to calling also the
following methods:
setStreamImageSize(model.getWidth(), model.getHeight());
setStreamDataType(model.getDataType());
Setting the sample model to
null reset
the default model, which is reader dependent.
|
|
|