Java Doc for IIPDescriptor.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » operator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai.operator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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



Constructor Summary
public  IIPDescriptor()
     Constructor.

Method Summary
public static  RenderedOpcreate(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  RenderableOpcreateRenderable(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  NumbergetParamMaxValue(int index)
     Returns the maximum legal value of a specified numeric parameter for this operation.
public  NumbergetParamMinValue(int index)
     Returns the minimum legal value of a specified numeric parameter for this operation.
public  booleanisRenderableSupported()
     Overrides super class's default implementation to return true because this operation supports renderable mode.
protected  booleanvalidateParameters(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.


Constructor Detail
IIPDescriptor
public IIPDescriptor()(Code)
Constructor.




Method Detail
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).



Fields inherited from javax.media.jai.OperationDescriptorImpl
final protected String[][] resources(Code)(Java Doc)
final protected String[] sourceNames(Code)(Java Doc)
final protected String[] supportedModes(Code)(Java Doc)

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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.