public abstract class IIOParam extends Object
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
IIOParam()
Constructs an IIOParam object.
|
Modifier and Type | Method and Description |
---|---|
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. (0, 0) by default.
|
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.
|
protected IIOParamController controller
protected IIOParamController defaultController
protected Point destinationOffset
protected ImageTypeSpecifier destinationType
protected int[] sourceBands
protected Rectangle sourceRegion
protected int sourceXSubsampling
protected int sourceYSubsampling
protected int subsamplingXOffset
protected int subsamplingYOffset
protected IIOParam()
public boolean activateController()
public IIOParamController getController()
public IIOParamController getDefaultController()
public Point getDestinationOffset()
public ImageTypeSpecifier getDestinationType()
public int[] getSourceBands()
public Rectangle getSourceRegion()
public int getSourceXSubsampling()
public int getSourceYSubsampling()
public int getSubsamplingXOffset()
public int getSubsamplingYOffset()
public boolean hasController()
public void setController(IIOParamController controller)
controller
- the controller to set or nullpublic void setDestinationType(ImageTypeSpecifier destinationType)
destinationType
- the sample and colour models of the
destination imagepublic void setDestinationOffset(Point destinationOffset)
destinationOffset
- the offset where pixel writing should
beginpublic void setSourceBands(int[] sourceBands)
sourceBands
- the array of source bands to usepublic void setSourceRegion(Rectangle sourceRegion)
sourceRegion
- the rectangular source regionIllegalArgumentException
- if sourceRegion has width or
height <= 0 or x or y < 0IllegalStateException
- if the given sourceRegion and
the current sampling settings would produce zero samplespublic void setSourceSubsampling(int sourceXSubsampling, int sourceYSubsampling, int subsamplingXOffset, int subsamplingYOffset)
sourceXSubsampling
- the horizontal sampling intervalsourceYSubsampling
- the vertical sampling intervalsubsamplingXOffset
- the horizontal offset of the initial
samplesubsamplingYOffset
- the vertical offset of the initial
sampleIllegalArgumentException
- if either subsamplingXOffset
or subsamplingYOffset is < 0IllegalStateException
- if the current source region
combined with the given sub-sampling parameters would produce
zero pixel samples