Java Doc for ImageUtil.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » jai » util » 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 » com.sun.media.jai.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.media.jai.util.ImageUtil

ImageUtil
final public class ImageUtil (Code)


Field Summary
final public static  intBYTE_MASK
     A constant used to extract a byte from a short or an int.
final public static  intUSHORT_MASK
     A constant used to extract an unsigned short from an int.


Method Summary
public  booleanareEqualSampleModels(SampleModel sm1, SampleModel sm2)
     Determines whether two SampleModels are "equal", i.e., assignment-compatible.
final public static  byteclampByte(int in)
     Clamps a number to the range supported by byte data type.
final public static  byteclampByteNegative(int in)
     Clamps a negative number to the range supported by byte data type.
final public static  byteclampBytePositive(int in)
     Clamps a positive number to the range supported by byte data type.
final public static  floatclampFloat(double in)
     Clamps a number to the range supported by float data type.
final public static  intclampInt(long in)
     Clamps a number to the range supported by integer data type.
final public static  byteclampRoundByte(float in)
     Clamps and rounds a number to the range supported by byte data type.
final public static  byteclampRoundByte(double in)
     Clamps and rounds a number to the range supported by byte data type.
final public static  intclampRoundInt(float in)
     Clamps and rounds a number to the range supported by integer data type.
final public static  intclampRoundInt(double in)
     Clamps and rounds a number to the range supported by integer data type.
final public static  shortclampRoundShort(float in)
     Clamps and rounds a number to the range supported by short data type.
final public static  shortclampRoundShort(double in)
     Clamps and rounds a number to the range supported by short data type.
final public static  shortclampRoundUShort(float in)
     Clamps and rounds a number to the range supported by unsigned short data type.
final public static  shortclampRoundUShort(double in)
     Clamps and rounds a number to the range supported by unsigned short data type.
final public static  shortclampShort(int in)
     Clamps a number to the range supported by short data type.
final public static  shortclampUShort(int in)
     Clamps a number to the range supported by unsigned short data type.
final public static  shortclampUShortNegative(int in)
    
final public static  shortclampUShortPositive(int in)
     Clamps a positive number to the range supported by unsigned short data type.
final public static  voidcopyRaster(RasterAccessor src, RasterAccessor dst)
    
public static  VectorevaluateParameters(Vector parameters)
     If any DeferredData components are detected, the argument is cloned and the DeferredData object is replaced with what its getData() returns.
public static  ParameterBlockevaluateParameters(ParameterBlock pb)
     If any DeferredData parameters are detected, a new ParameterBlock is constructed and the DeferredData object is replaced with what its getData() returns.
public static  voidfillBackground(WritableRaster raster, Rectangle rect, double[] backgroundValues)
     Fill the specified rectangle of raster with the provided background values.
public static  voidfillBordersWithBackgroundValues(Rectangle outerRect, Rectangle innerRect, WritableRaster raster, double[] backgroundValues)
     When the destination rectangle is not the same as the image bounds, should fill the border.
public static synchronized  ObjectgenerateID(Object owner)
     Generates a UID for the provided Object. The counter for the objects that request an ID, the hashcode of the class of the provided object, the hashcode of the provided object, the current time in milli seconds, and a random number are concatenated together in a BigInteger.
public static  ColorModelgetCompatibleColorModel(SampleModel sm, Map config)
     Derive a compatible ColorModel for the supplied SampleModel using the method specified via the OpImage configuration Map.
public static  ImagingListenergetImagingListener(RenderingHints hints)
    
public static  ImagingListenergetImagingListener(RenderContext context)
    
public static  byte[]getPackedBinaryData(Raster raster, Rectangle rect)
     For the case of binary data (isBinary() returns true), return the binary data as a packed byte array. The data will be packed as eight bits per byte with no bit offset, i.e., the first bit in each image line will be the left-most of the first byte of the line.
public static  StringgetStackTraceString(Exception e)
     Converts the supplied Exception's stack trace to a String.
final public static  Point[]getTileIndices(int txmin, int txmax, int tymin, int tymax)
     Retrieve the indices of a set of tiles in row-major order with the given tile index bounds in x and y.
public static  byte[]getUnpackedBinaryData(Raster raster, Rectangle rect)
     Returns the binary data unpacked into an array of bytes.
public static  KernelJAIgetUnsharpMaskEquivalentKernel(KernelJAI kernel, float gain)
     Given a kernel and the gain (sharpness) factor of an UnsharpMask operation, compute a modified kernel that would be equivalent to the specified unsharp operation. for UnsharpMask function we have the following formula: dst(i,j) = src(i,j) + gain * (src(i,j) - SUM SUM K(l,m) * src(i+l,j+m)) l m Which can be written as : dst(i,j) = SUM SUM Q(l,m) * src(i+l,j+m), l m where Q(0,0) = 1 + gain * (1 - K(0,0)), and Q(l,m) = - gain * K(l,m) otherwise
Parameters:
  kernel - the unsharp mask kernel
Parameters:
  gain - the unsharp mask gain (sharpness) factor.
public static  booleanisBinary(SampleModel sm)
     Check whether a SampleModel represents a binary data set, i.e., a single band of data with one bit per pixel packed into a MultiPixelPackedSampleModel.
static  voidsendExceptionToListener(String message, Exception e)
    
public static  voidsetPackedBinaryData(byte[] binaryDataArray, WritableRaster raster, Rectangle rect)
     Sets the supplied Raster's data from an array of packed binary data of the form returned by getPackedBinaryData().
public static  voidsetUnpackedBinaryData(byte[] bdata, WritableRaster raster, Rectangle rect)
     Copies data into the packed array of the Raster from an array of unpacked data of the form returned by getUnpackedBinaryData().

Field Detail
BYTE_MASK
final public static int BYTE_MASK(Code)
A constant used to extract a byte from a short or an int.



USHORT_MASK
final public static int USHORT_MASK(Code)
A constant used to extract an unsigned short from an int.





Method Detail
areEqualSampleModels
public boolean areEqualSampleModels(SampleModel sm1, SampleModel sm2)(Code)
Determines whether two SampleModels are "equal", i.e., assignment-compatible. This signifies that the two SampleModels are either the very same object or are two different objects with identical characteristics.



clampByte
final public static byte clampByte(int in)(Code)
Clamps a number to the range supported by byte data type.



clampByteNegative
final public static byte clampByteNegative(int in)(Code)
Clamps a negative number to the range supported by byte data type.



clampBytePositive
final public static byte clampBytePositive(int in)(Code)
Clamps a positive number to the range supported by byte data type.



clampFloat
final public static float clampFloat(double in)(Code)
Clamps a number to the range supported by float data type.



clampInt
final public static int clampInt(long in)(Code)
Clamps a number to the range supported by integer data type.



clampRoundByte
final public static byte clampRoundByte(float in)(Code)
Clamps and rounds a number to the range supported by byte data type. The input number is float.



clampRoundByte
final public static byte clampRoundByte(double in)(Code)
Clamps and rounds a number to the range supported by byte data type. The input number is double.



clampRoundInt
final public static int clampRoundInt(float in)(Code)
Clamps and rounds a number to the range supported by integer data type. The input number is float.



clampRoundInt
final public static int clampRoundInt(double in)(Code)
Clamps and rounds a number to the range supported by integer data type. The input number is double.



clampRoundShort
final public static short clampRoundShort(float in)(Code)
Clamps and rounds a number to the range supported by short data type. The input number is float.



clampRoundShort
final public static short clampRoundShort(double in)(Code)
Clamps and rounds a number to the range supported by short data type. The input number is double.



clampRoundUShort
final public static short clampRoundUShort(float in)(Code)
Clamps and rounds a number to the range supported by unsigned short data type. The input number is float.



clampRoundUShort
final public static short clampRoundUShort(double in)(Code)
Clamps and rounds a number to the range supported by unsigned short data type. The input number is double.



clampShort
final public static short clampShort(int in)(Code)
Clamps a number to the range supported by short data type.



clampUShort
final public static short clampUShort(int in)(Code)
Clamps a number to the range supported by unsigned short data type.



clampUShortNegative
final public static short clampUShortNegative(int in)(Code)



clampUShortPositive
final public static short clampUShortPositive(int in)(Code)
Clamps a positive number to the range supported by unsigned short data type.



copyRaster
final public static void copyRaster(RasterAccessor src, RasterAccessor dst)(Code)



evaluateParameters
public static Vector evaluateParameters(Vector parameters)(Code)
If any DeferredData components are detected, the argument is cloned and the DeferredData object is replaced with what its getData() returns.



evaluateParameters
public static ParameterBlock evaluateParameters(ParameterBlock pb)(Code)
If any DeferredData parameters are detected, a new ParameterBlock is constructed and the DeferredData object is replaced with what its getData() returns.



fillBackground
public static void fillBackground(WritableRaster raster, Rectangle rect, double[] backgroundValues)(Code)
Fill the specified rectangle of raster with the provided background values. Suppose the raster is initialized to 0. Thus, for binary data, if the provided background values are 0, do nothing.



fillBordersWithBackgroundValues
public static void fillBordersWithBackgroundValues(Rectangle outerRect, Rectangle innerRect, WritableRaster raster, double[] backgroundValues)(Code)
When the destination rectangle is not the same as the image bounds, should fill the border.



generateID
public static synchronized Object generateID(Object owner)(Code)
Generates a UID for the provided Object. The counter for the objects that request an ID, the hashcode of the class of the provided object, the hashcode of the provided object, the current time in milli seconds, and a random number are concatenated together in a BigInteger. This BigInteger is returned as the unique ID.



getCompatibleColorModel
public static ColorModel getCompatibleColorModel(SampleModel sm, Map config)(Code)
Derive a compatible ColorModel for the supplied SampleModel using the method specified via the OpImage configuration Map. a compatible ColorModel or null.



getImagingListener
public static ImagingListener getImagingListener(RenderingHints hints)(Code)



getImagingListener
public static ImagingListener getImagingListener(RenderContext context)(Code)



getPackedBinaryData
public static byte[] getPackedBinaryData(Raster raster, Rectangle rect)(Code)
For the case of binary data (isBinary() returns true), return the binary data as a packed byte array. The data will be packed as eight bits per byte with no bit offset, i.e., the first bit in each image line will be the left-most of the first byte of the line. The line stride in bytes will be (int)((getWidth()+7)/8). The length of the returned array will be the line stride multiplied by getHeight() the binary data as a packed array of bytes with zero offsetof null if the data are not binary.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



getStackTraceString
public static String getStackTraceString(Exception e)(Code)
Converts the supplied Exception's stack trace to a String.



getTileIndices
final public static Point[] getTileIndices(int txmin, int txmax, int tymin, int tymax)(Code)
Retrieve the indices of a set of tiles in row-major order with the given tile index bounds in x and y.



getUnpackedBinaryData
public static byte[] getUnpackedBinaryData(Raster raster, Rectangle rect)(Code)
Returns the binary data unpacked into an array of bytes. The line stride will be the width of the Raster.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



getUnsharpMaskEquivalentKernel
public static KernelJAI getUnsharpMaskEquivalentKernel(KernelJAI kernel, float gain)(Code)
Given a kernel and the gain (sharpness) factor of an UnsharpMask operation, compute a modified kernel that would be equivalent to the specified unsharp operation. for UnsharpMask function we have the following formula: dst(i,j) = src(i,j) + gain * (src(i,j) - SUM SUM K(l,m) * src(i+l,j+m)) l m Which can be written as : dst(i,j) = SUM SUM Q(l,m) * src(i+l,j+m), l m where Q(0,0) = 1 + gain * (1 - K(0,0)), and Q(l,m) = - gain * K(l,m) otherwise
Parameters:
  kernel - the unsharp mask kernel
Parameters:
  gain - the unsharp mask gain (sharpness) factor. an equivalent convolution KernelJAI



isBinary
public static boolean isBinary(SampleModel sm)(Code)
Check whether a SampleModel represents a binary data set, i.e., a single band of data with one bit per pixel packed into a MultiPixelPackedSampleModel.



sendExceptionToListener
static void sendExceptionToListener(String message, Exception e)(Code)



setPackedBinaryData
public static void setPackedBinaryData(byte[] binaryDataArray, WritableRaster raster, Rectangle rect)(Code)
Sets the supplied Raster's data from an array of packed binary data of the form returned by getPackedBinaryData().
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



setUnpackedBinaryData
public static void setUnpackedBinaryData(byte[] bdata, WritableRaster raster, Rectangle rect)(Code)
Copies data into the packed array of the Raster from an array of unpacked data of the form returned by getUnpackedBinaryData().

If the data are binary, then the target bit will be set if and only if the corresponding byte is non-zero.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.




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.