javax.imageio
public abstract class IIOParam extends Object
Field Summary | |
---|---|
protected IIOParamController | controller
The controller called by this IIOParam to retrieve parameters. |
protected IIOParamController | defaultController
The default controller called by this IIOParam to retrieve
parameters. |
protected Point | destinationOffset
The offset in the destination where the upper-left
decoded/encoded pixel should be located. |
protected ImageTypeSpecifier | destinationType
Sets the output colour type when writing or the destination image
type when reading. |
protected int[] | sourceBands
An array indicating which source bands will be used or null. |
protected Rectangle | sourceRegion
The source pixel region or null. |
protected int | sourceXSubsampling
Sample every sourceXSubsampling'th pixel in the source image when
pixelating the destination image in the horizontal direction. |
protected int | sourceYSubsampling
Sample every sourceYSubsampling'th pixel in the source image when
pixelating the destination image in the vertical direction. |
protected int | subsamplingXOffset
Start sampling at this horizontal offset within the source region
when pixelating the destination image in the horizontal
direction. |
protected int | subsamplingYOffset
Start sampling at this vertical offset within the source region
when pixelating the destination image in the vertical direction. |
Constructor Summary | |
---|---|
protected | IIOParam()
Constructs an IIOParam object. |
Method Summary | |
---|---|
boolean | activateController()
Activates the parameter controller by calling its activate method
and passing it this IIOParam. |
IIOParamController | getController()
Retrieve the currently set controller if one has been set, or the
default controller, or null if the controller has been explicitly
set to null.
|
IIOParamController | getDefaultController()
Retrieve the default controller regardless of whether or not a
non-default controller has been set. |
Point | getDestinationOffset()
Retrieve the offset in the destination where the upper-left
decoded/encoded pixel should be located. |
ImageTypeSpecifier | getDestinationType()
Retrieve the currently set image-type specifier or null if none
has been set.
|
int[] | getSourceBands()
Retrieve the current source band values or null if source band
values have not been set.
|
Rectangle | getSourceRegion()
Retrieve the source rectangle from which pixels should be read or
null if no source region has been set.
|
int | getSourceXSubsampling()
Retrieve the number of pixel columns to advance before taking a
pixel sample.
|
int | getSourceYSubsampling()
Retrieve the number of pixel rows to advance before taking a
pixel sample.
|
int | getSubsamplingXOffset()
Retrieve the number of pixel columns to advance before taking any
pixel samples.
|
int | getSubsamplingYOffset()
Retrieve the number of pixel rows to advance before taking any
pixel samples.
|
boolean | hasController()
Check if a non-null controller is currently available.
|
void | setController(IIOParamController controller)
Sets the controller for this IIOParam. |
void | setDestinationOffset(Point destinationOffset)
Specify the destination pixel offset. |
void | setDestinationType(ImageTypeSpecifier destinationType)
Set the destination image type.
|
void | setSourceBands(int[] sourceBands)
Set the indices of the source bands to be used. |
void | setSourceRegion(Rectangle sourceRegion)
Set the source region from which to read. |
void | setSourceSubsampling(int sourceXSubsampling, int sourceYSubsampling, int subsamplingXOffset, int subsamplingYOffset)
Set the source sampling intervals and offsets. |
Returns: true if parameters were successfully set, false if parameters were not changed
Returns: the currently used controller or null
Returns: the default controller or null
Returns: the destination offset
Returns: the current image-type specifier or null
Returns: the current set of source band values or null
Returns: the current source region or null
Returns: the horizontal sub-sampling interval
Returns: the vertical sub-sampling interval
Returns: the horizontal sub-sampling offset
Returns: the vertical sub-sampling offset
Returns: true if getController returns a non-null value, false if getController returns null
Parameters: controller the controller to set or null
Parameters: destinationOffset the offset where pixel writing should begin
Parameters: destinationType the sample and colour models of the destination image
Parameters: sourceBands the array of source bands to use
Parameters: sourceRegion the rectangular source region
Throws: IllegalArgumentException if sourceRegion has width or height <= 0 or x or y < 0 IllegalStateException if the given sourceRegion and the current sampling settings would produce zero samples
Parameters: sourceXSubsampling the horizontal sampling interval sourceYSubsampling the vertical sampling interval subsamplingXOffset the horizontal offset of the initial sample subsamplingYOffset the vertical offset of the initial sample
Throws: IllegalArgumentException if either subsamplingXOffset or subsamplingYOffset is < 0 IllegalStateException if the current source region combined with the given sub-sampling parameters would produce zero pixel samples