| java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.IIPDescriptor
IIPDescriptor | public class IIPDescriptor extends OperationDescriptorImpl (Code) | | An OperationDescriptor describing the "IIP" operation.
This operation provides client-side support of the Internet Imaging
Protocol (IIP) in both the rendered and renderable modes. It creates
a java.awt.image.RenderedImage or a
java.awt.image.renderable.RenderableImage based on the
data received from the IIP server, and optionally applies a sequence
of operations to the created image.
The operations that may be applied and the order in which they are
applied are defined in section 2.2.1.1 of the Internet Imaging Protocol
Specification version 1.0.5. Some or all of the requested operations
may be executed on the IIP server if it is determined that the server
supports such operations. Any of the requested operations not supported
by the server will be executed on the host on which the operation chain
is rendered.
The processing sequence for the supplied operations is as follows:
- filtering (blur or sharpen);
- tone and color correction ("color twist");
- contrast adjustment;
- selection of source rectangle of interest;
- spatial orientation (rendering-independent affine transformation);
- selection of destination rectangle of interest;
- rendering transformation (renderable mode only);
- transposition (rotation and/or mirroring).
As indicated, the rendering transformation is performed only in
renderable mode processing. This transformation is derived from the
AffineTransform supplied in the RenderContext
when rendering actually occurs. Rendered mode processing creates
a RenderedImage which is the default rendering of the
RenderableImage created in renderable mode processing.
The "URL" parameter specifies the URL of the IIP image as a
java.lang.String . It must represent a valid URL, and
include any required FIF or SDS commands. It cannot be null .
The "subImages" parameter optionally indicates the sub-images to
be used by the server to get the images at each resolution level. The
values in this int array cannot be negative. If this
parameter is not specified, or if the array is too short (length is 0),
or if a negative value is specified, then this operation will use the
zeroth sub-image of the resolution level actually processed.
The "filter" parameter specifies a blur or sharpen operation: a
positive value indicates sharpen and a negative value blur. A unit
step should produce a perceptible change in the image. The default
value is 0 which signifies that no filtering will occur.
The "colorTwist" parameter represents a 4x4 matrix stored in row-major
order and should have an array length of at least 16. If an array of
length greater than 16 is specified, all elements from index 16 and beyond
are ignored. Elements 12, 13 and 14 must be 0. This matrix will be
applied to the (possibly padded) data in an intermediate normalized
PhotoYCC color space with a premultiplied alpha channel. This operation
will force an alpha channel to be added to the image if the last column
of the last row of the color twist matrix is not 1.0F. Also, if the image
originally has a grayscale color space it will be cast up to RGB if
casting the data back to grayscale after applying the color twist matrix
would result in any loss of data.
The "contrast" parameter specifies a contrast enhancement operation
with increasing contrast for larger value. It must be greater than or equal
to 1.0F. A value of 1.0F indicates no contrast adjustment.
The "sourceROI" parameter specifies the rectangle of interest in the
source image in rendering-independent coordinates. The intersection of
this rectangle with the rendering-independent bounds of the source image
must equal itself. The rendering-independent bounds of the source image
are defined to be (0.0F, 0.0F, r, 1.0F) where r is the aspect ratio
(width/height) of the source image. Note that the source image will not
in fact be cropped to these limits but values outside of this rectangle
will be suppressed.
The "transform" parameter represents an affine backward mapping to be
applied in rendering-independent coordinates. Note that the direction
of transformation is opposite to that of the AffineTransform
supplied in the RenderContext which is a forward mapping. The
default value of this transform is the identity mapping. The supplied
AffineTransform must be invertible.
The "aspectRatio" parameter specifies the rendering-independent width
of the destination image and must be positive. The rendering-independent
bounds of the destination image are (0.0F, 0.0F, aspectRatio, 1.0F). If
this parameter is not provided the destination aspect ratio defaults to
that of the source.
The "destROI" parameter specifies the rectangle of interest in the
destination image in rendering-independent coordinates. This rectangle must
have a non-empty intersection with the rendering-independent bounds of the
destination image but is not constrained to the destination image bounds.
A counterclockwise rotation may be applied to the destination image.
However, the angle is limited to 0, 90, 180, or 270 degrees. By default,
the destination image is not rotated.
The "mirrorAxis" parameter may be null , in which case
no flipping is applied, or a String of "x", "X", "y", or
"Y".
The "ICCProfile" parameter may only be used with client-side processing
or with server-side processing if the connection protocol supports the
ability to transfer a profile.
The "JPEGQuality" and "JPEGTable" parameters are only used with
server-side processing. If provided, JPEGQuality must be in the range
[0,100] and JPEGTable in [1,255].
There is no source image associated with this operation.
Resource List
Name | Value |
GlobalName | IIP |
LocalName | IIP |
Vendor | com.sun.media.jai |
Description | Provides client support of the Internet
Imaging Protocol in the rendered and
renderable modes. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/IIPDescriptor.html |
Version | 1.0 |
arg0Desc | The URL of the IIP image. |
arg1Desc | The sub-images to be used by the server
for images at each resolution level. |
arg2Desc | The filtering value. |
arg3Desc | The color twist matrix. |
arg4Desc | The contrast value. |
arg5Desc | The source rectangle of interest in
rendering-independent coordinates. |
arg6Desc | The rendering-independent spatial orientation
transform. |
arg7Desc | The aspect ratio of the destination
image. |
arg8Desc | The destination rectangle of interest in
rendering-independent coordinates. |
arg9Desc | The counterclockwise rotation angle to be
applied to the destination. |
arg10Desc | The mirror axis. |
arg11Desc | The ICC profile used to represent the color
space of the source image. |
arg12Desc | The JPEG quality factor. |
arg13Desc | The JPEG compression group index
number. |
Parameter List
Name | Class Type |
Default Value |
URL | java.lang.String |
NO_PARAMETER_DEFAULT |
subImages | int[] |
{ 0 } |
filter | java.lang.Float |
0.0F |
colorTwist | float[] |
null |
contrast | java.lang.Float |
1.0F |
sourceROI | java.awt.geom.Rectangle2D.Float |
null |
transform | java.awt.geom.AffineTransform |
identity transform |
aspectRatio | java.lang.Float |
null |
destROI | java.awt.geom.Rectangle2D.Float |
null |
rotation | java.lang.Integer |
0 |
mirrorAxis | java.lang.String |
null |
ICCProfile | java.awt.color.ICC_Profile |
null |
JPEGQuality | java.lang.Integer |
null |
JPEGTable | java.lang.Integer |
null |
See Also: Digital Imaging Group See Also: java.awt.image.RenderedImage See Also: java.awt.image.renderable.RenderableImage See Also: IIPResolutionDescriptor |
Method Summary | |
public static RenderedOp | create(String URL, int[] subImages, Float filter, float[] colorTwist, Float contrast, Rectangle2D.Float sourceROI, AffineTransform transform, Float aspectRatio, Rectangle2D.Float destROI, Integer rotation, String mirrorAxis, ICC_Profile ICCProfile, Integer JPEGQuality, Integer JPEGTable, RenderingHints hints) Provides client support of the Internet Imaging Protocol in the rendered and renderable mode.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderedOp Parameters: URL - The URL of the IIP image. Parameters: subImages - The sub-images to be used by the server for images at each resolution level.May be null . Parameters: filter - The filtering value.May be null . Parameters: colorTwist - The color twist matrix.May be null . Parameters: contrast - The contrast value.May be null . Parameters: sourceROI - The source rectangle of interest in rendering-independent coordinates.May be null . Parameters: transform - The rendering-independent spatial orientation transform.May be null . Parameters: aspectRatio - The aspect ratio of the destination image.May be null . Parameters: destROI - The destination rectangle of interest in rendering-independent coordinates.May be null . Parameters: rotation - The counterclockwise rotation angle to be applied to the destination.May be null . Parameters: mirrorAxis - The mirror axis.May be null . Parameters: ICCProfile - The ICC profile used to represent the color space of the source image.May be null . Parameters: JPEGQuality - The JPEG quality factor.May be null . Parameters: JPEGTable - The JPEG compression group index number.May be null . Parameters: hints - The RenderingHints to use.May be null . | public static RenderableOp | createRenderable(String URL, int[] subImages, Float filter, float[] colorTwist, Float contrast, Rectangle2D.Float sourceROI, AffineTransform transform, Float aspectRatio, Rectangle2D.Float destROI, Integer rotation, String mirrorAxis, ICC_Profile ICCProfile, Integer JPEGQuality, Integer JPEGTable, RenderingHints hints) Provides client support of the Internet Imaging Protocol in the rendered and renderable mode.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.createRenderable(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderableOp Parameters: URL - The URL of the IIP image. Parameters: subImages - The sub-images to be used by the server for images at each resolution level.May be null . Parameters: filter - The filtering value.May be null . Parameters: colorTwist - The color twist matrix.May be null . Parameters: contrast - The contrast value.May be null . Parameters: sourceROI - The source rectangle of interest in rendering-independent coordinates.May be null . Parameters: transform - The rendering-independent spatial orientation transform.May be null . Parameters: aspectRatio - The aspect ratio of the destination image.May be null . Parameters: destROI - The destination rectangle of interest in rendering-independent coordinates.May be null . Parameters: rotation - The counterclockwise rotation angle to be applied to the destination.May be null . Parameters: mirrorAxis - The mirror axis.May be null . Parameters: ICCProfile - The ICC profile used to represent the color space of the source image.May be null . Parameters: JPEGQuality - The JPEG quality factor.May be null . Parameters: JPEGTable - The JPEG compression group index number.May be null . Parameters: hints - The RenderingHints to use.May be null . | public Number | getParamMaxValue(int index) Returns the maximum legal value of a specified numeric parameter
for this operation. | public Number | getParamMinValue(int index) Returns the minimum legal value of a specified numeric parameter
for this operation. | public boolean | isRenderableSupported() Overrides super class's default implementation to return
true because this operation supports renderable mode. | protected boolean | validateParameters(ParameterBlock args, StringBuffer msg) Validates the input parameters.
In addition to the standard checks performed by the
superclass method, this method checks that:
- the supplied URL string specifies a valid protocol;
- the color twist, if not
null , has an array
length of at least 16 (all elements from index 16 and beyond are
ignored and elements 12, 13, and 14 are set to 0);
- both the source and dest ROI, if not
null , has
a width and height greater than 0;
- the mirror axis, if not
null , has a
String of "x", "X", "y", or "Y";
- the destination rotation is one of the valid degrees
(0, 90.
|
IIPDescriptor | public IIPDescriptor()(Code) | | Constructor.
|
create | public static RenderedOp create(String URL, int[] subImages, Float filter, float[] colorTwist, Float contrast, Rectangle2D.Float sourceROI, AffineTransform transform, Float aspectRatio, Rectangle2D.Float destROI, Integer rotation, String mirrorAxis, ICC_Profile ICCProfile, Integer JPEGQuality, Integer JPEGTable, RenderingHints hints)(Code) | | Provides client support of the Internet Imaging Protocol in the rendered and renderable mode.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderedOp Parameters: URL - The URL of the IIP image. Parameters: subImages - The sub-images to be used by the server for images at each resolution level.May be null . Parameters: filter - The filtering value.May be null . Parameters: colorTwist - The color twist matrix.May be null . Parameters: contrast - The contrast value.May be null . Parameters: sourceROI - The source rectangle of interest in rendering-independent coordinates.May be null . Parameters: transform - The rendering-independent spatial orientation transform.May be null . Parameters: aspectRatio - The aspect ratio of the destination image.May be null . Parameters: destROI - The destination rectangle of interest in rendering-independent coordinates.May be null . Parameters: rotation - The counterclockwise rotation angle to be applied to the destination.May be null . Parameters: mirrorAxis - The mirror axis.May be null . Parameters: ICCProfile - The ICC profile used to represent the color space of the source image.May be null . Parameters: JPEGQuality - The JPEG quality factor.May be null . Parameters: JPEGTable - The JPEG compression group index number.May be null . Parameters: hints - The RenderingHints to use.May be null . The RenderedOp destination. throws: IllegalArgumentException - if URL is null . |
createRenderable | public static RenderableOp createRenderable(String URL, int[] subImages, Float filter, float[] colorTwist, Float contrast, Rectangle2D.Float sourceROI, AffineTransform transform, Float aspectRatio, Rectangle2D.Float destROI, Integer rotation, String mirrorAxis, ICC_Profile ICCProfile, Integer JPEGQuality, Integer JPEGTable, RenderingHints hints)(Code) | | Provides client support of the Internet Imaging Protocol in the rendered and renderable mode.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.createRenderable(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderableOp Parameters: URL - The URL of the IIP image. Parameters: subImages - The sub-images to be used by the server for images at each resolution level.May be null . Parameters: filter - The filtering value.May be null . Parameters: colorTwist - The color twist matrix.May be null . Parameters: contrast - The contrast value.May be null . Parameters: sourceROI - The source rectangle of interest in rendering-independent coordinates.May be null . Parameters: transform - The rendering-independent spatial orientation transform.May be null . Parameters: aspectRatio - The aspect ratio of the destination image.May be null . Parameters: destROI - The destination rectangle of interest in rendering-independent coordinates.May be null . Parameters: rotation - The counterclockwise rotation angle to be applied to the destination.May be null . Parameters: mirrorAxis - The mirror axis.May be null . Parameters: ICCProfile - The ICC profile used to represent the color space of the source image.May be null . Parameters: JPEGQuality - The JPEG quality factor.May be null . Parameters: JPEGTable - The JPEG compression group index number.May be null . Parameters: hints - The RenderingHints to use.May be null . The RenderableOp destination. throws: IllegalArgumentException - if URL is null . |
getParamMaxValue | public Number getParamMaxValue(int index)(Code) | | Returns the maximum legal value of a specified numeric parameter
for this operation. If the supplied index does not
correspond to a numeric parameter, this method returns
null .
throws: ArrayIndexOutOfBoundsException - if index is lessthan 0 or greater than 13. |
getParamMinValue | public Number getParamMinValue(int index)(Code) | | Returns the minimum legal value of a specified numeric parameter
for this operation. If the supplied index does not
correspond to a numeric parameter, this method returns
null .
throws: ArrayIndexOutOfBoundsException - if index is lessthan 0 or greater than 13. |
isRenderableSupported | public boolean isRenderableSupported()(Code) | | Overrides super class's default implementation to return
true because this operation supports renderable mode.
|
validateParameters | protected boolean validateParameters(ParameterBlock args, StringBuffer msg)(Code) | | Validates the input parameters.
In addition to the standard checks performed by the
superclass method, this method checks that:
- the supplied URL string specifies a valid protocol;
- the color twist, if not
null , has an array
length of at least 16 (all elements from index 16 and beyond are
ignored and elements 12, 13, and 14 are set to 0);
- both the source and dest ROI, if not
null , has
a width and height greater than 0;
- the mirror axis, if not
null , has a
String of "x", "X", "y", or "Y";
- the destination rotation is one of the valid degrees
(0, 90. 180, 270).
|
Methods inherited from javax.media.jai.OperationDescriptorImpl | public boolean arePropertiesSupported()(Code)(Java Doc) protected static Class getDefaultSourceClass(String modeName)(Code)(Java Doc) public Class getDestClass(String modeName)(Code)(Java Doc) public Class getDestClass()(Code)(Java Doc) public Object getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)(Code)(Java Doc) public String getName()(Code)(Java Doc) public int getNumParameters()(Code)(Java Doc) public int getNumSources()(Code)(Java Doc) public Class[] getParamClasses()(Code)(Java Doc) public Object getParamDefaultValue(int index)(Code)(Java Doc) public Object[] getParamDefaults()(Code)(Java Doc) public Number getParamMaxValue(int index)(Code)(Java Doc) public Number getParamMinValue(int index)(Code)(Java Doc) public String[] getParamNames()(Code)(Java Doc) public ParameterListDescriptor getParameterListDescriptor(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators()(Code)(Java Doc) public Class getRenderableDestClass()(Code)(Java Doc) public Class[] getRenderableSourceClasses()(Code)(Java Doc) public ResourceBundle getResourceBundle(Locale locale)(Code)(Java Doc) public String[][] getResources(Locale locale)(Code)(Java Doc) public Class[] getSourceClasses(String modeName)(Code)(Java Doc) public Class[] getSourceClasses()(Code)(Java Doc) public String[] getSourceNames()(Code)(Java Doc) public String[] getSupportedModes()(Code)(Java Doc) public boolean isImmediate()(Code)(Java Doc) public boolean isModeSupported(String modeName)(Code)(Java Doc) public boolean isRenderableSupported()(Code)(Java Doc) public boolean isRenderedSupported()(Code)(Java Doc) protected static Class[][] makeDefaultSourceClassList(String[] supportedModes, int numSources)(Code)(Java Doc) public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateRenderableArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateRenderableSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc)
|
|
|