| java.lang.Object javax.media.jai.BorderExtender javax.media.jai.BorderExtenderConstant
BorderExtenderConstant | final public class BorderExtenderConstant extends BorderExtender (Code) | | A subclass of BorderExtender that implements
border extension by filling all pixels outside of the image
bounds with constant values. For example, the image:
if extended by adding two extra rows to the top and bottom and
two extra columns on the left and right sides, would become:
X | X | X | X | X | X | X |
X | X | X | X | X | X | X |
X | X | A | B | C | X | X |
X | X | D | E | F | X | X |
X | X | G | H | I | X | X |
X | X | X | X | X | X | X |
X | X | X | X | X | X | X |
where X is the constant fill value. The set of constants is clamped to
the range and precision of the data type of the WritableRaster
being filled. The number of constants used is given by the number of bands
of the WritableRaster . If the WritableRaster has
b bands, and there are c constants, constants
0 through b - 1 are used when
b <= c . If there is only a single constant, then it is used
for all bands. If b > c , an
UnsupportedOperationException is thrown.
See Also: BorderExtender |
Constructor Summary | |
public | BorderExtenderConstant(double[] constants) Constructs an instance of BorderExtenderConstant
with a given set of constants. |
Method Summary | |
final public void | extend(WritableRaster raster, PlanarImage im) Fills in the portions of a given Raster that lie
outside the bounds of a given PlanarImage with
constant values.
The portion of raster that lies within
im.getBounds() is not altered.
Parameters: raster - The WritableRaster the border area ofwhich is to be filled with constants. Parameters: im - The PlanarImage which determines theportion of the WritableRaster notto be filled. | final public double[] | getConstants() Returns a clone of the constants array originally
supplied to the constructor. |
BorderExtenderConstant | public BorderExtenderConstant(double[] constants)(Code) | | Constructs an instance of BorderExtenderConstant
with a given set of constants. The constants are specified
as an array of double s.
|
extend | final public void extend(WritableRaster raster, PlanarImage im)(Code) | | Fills in the portions of a given Raster that lie
outside the bounds of a given PlanarImage with
constant values.
The portion of raster that lies within
im.getBounds() is not altered.
Parameters: raster - The WritableRaster the border area ofwhich is to be filled with constants. Parameters: im - The PlanarImage which determines theportion of the WritableRaster notto be filled. IllegalArgumentException if either parameter isnull . UnsupportedOperationException if the numberof image bands exceeds the number of constants and thelatter is not unity. |
getConstants | final public double[] getConstants()(Code) | | Returns a clone of the constants array originally
supplied to the constructor.
since: JAI 1.1.2 |
|
|