|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.AffineDescriptor
An OperationDescriptor describing the "Affine" operation.
The Affine operation performs (possibly filtered) affine mapping on a rendered or renderable source image.
The relationship between the source and the destination pixels is defined as follows. For each pixel (x, y) of the destination, the source value at the fractional subpixel position (x', y') is constructed by means of an Interpolation object and written to the destination. The mapping between the destination pixel (x, y) and the source position (x', y') is given by:
x' = m[0][0] * x + m[0][1] * y + m[0][2]
y' = m[1][0] * x + m[1][1] * y + m[1][2]
where m is a 3x2 transform matrix that inverts the matrix supplied
as the "transform" argument.
When interpolations which require padding the source such as Bilinear
or Bicubic interpolation are specified, the source needs to be extended
such that it has the extra pixels needed to compute all the destination
pixels. This extension is performed via the BorderExtender
class. The type of Border Extension can be specified as a
RenderingHint to the JAI.create method.
If no BorderExtender is specified (is null), the source will not be extended. The transformed image size is still the same as if the source had been extended. However, since there is insufficient source to compute all the destination pixels, only that subset of the destination image's pixels which can be computed will be written in the destination. The rest of the destination will be set to zeros.
It may be noted that the minX, minY, width and height hints as
specified through the JAI.KEY_IMAGE_LAYOUT hint in the
RenderingHints object are not honored, as this operator
calculates the destination image bounds itself. The other
ImageLayout hints, like tileWidth and tileHeight,
however are honored.
"Affine" defines a PropertyGenerator that performs an identical
transformation on the "ROI" property of the source image, which can
be retrieved by calling the getProperty method with
"ROI" as the property name.
| Name | Value |
|---|---|
| GlobalName | Affine |
| LocalName | Affine |
| Vendor | com.sun.media.jai |
| Description | Performs interpolated affine transform on an image. |
| DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/AffineDescriptor.html |
| Version | 1.0 |
| arg0Desc | The affine transform matrix. |
| arg1Desc | The interpolation method. |
| Name | Class Type | Default Value |
|---|---|---|
| transform | java.awt.geom.AffineTransform | NO_PARAMETER_DEFAULT |
| interpolation | javax.media.jai.Interpolation | InterpolationNearest |
AffineTransform,
Interpolation,
OperationDescriptor, Serialized Form| Fields inherited from class javax.media.jai.OperationDescriptorImpl |
resources,
sourceNames,
supportedModes |
| Constructor Summary | |
AffineDescriptor()
Constructor. |
|
| Method Summary | |
PropertyGenerator[] |
getPropertyGenerators()
Returns an array of PropertyGenerators implementing
property inheritance for the "Affine" operation. |
boolean |
isRenderableSupported()
Returns true since renderable operation is supported. |
protected boolean |
validateParameters(ParameterBlock args,
StringBuffer message)
Validates the input parameters. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public AffineDescriptor()
| Method Detail |
public boolean isRenderableSupported()
true since renderable operation is supported.OperationDescriptorImpl.isModeSupported(java.lang.String)public PropertyGenerator[] getPropertyGenerators()
PropertyGenerators implementing
property inheritance for the "Affine" operation.
protected boolean validateParameters(ParameterBlock args,
StringBuffer message)
In addition to the standard checks performed by the superclass method, this method checks that "transform" is invertible.
args is null.msg is null
and the validation fails.OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||