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


java.lang.Object
   javax.media.jai.ROI
      javax.media.jai.ROIShape

ROIShape
public class ROIShape extends ROI (Code)
A class representing a region of interest within an image as a Shape. Such regions are binary by definition. Using a Shape representation allows boolean operations to be performed quickly and with compact storage. If a PropertyGenerator responsible for generating the ROI property of a particular OperationDescriptor (e.g., a warp) cannot reasonably produce an ROIShape representing the region, it should call getAsImage() on its sources and produce its output ROI in image form.


Field Summary
transient  ShapetheShape
     The internal Shape that defines this mask.

Constructor Summary
public  ROIShape(Shape s)
     Constructs an ROIShape from a Shape.
public  ROIShape(Area a)
     Constructs an ROIShape from an Area.

Method Summary
public  ROIadd(ROI roi)
     Adds another mask to this one.
public  booleancontains(Point p)
     Returns true if the mask contains a given Point.
Parameters:
  p - a Point specifying the coordinates of the pixel to be queried.
public  booleancontains(Point2D p)
     Returns true if the mask contains a given Point2D.
Parameters:
  p - A Point2D specifying the coordinates of the pixelto be queried.
throws:
  IllegalArgumentException - is p is null.
public  booleancontains(int x, int y)
     Returns true if the mask contains the point (x, y).
Parameters:
  x - An int specifying the X coordinate of the pixel to be queried.
Parameters:
  y - An int specifying the Y coordinate of the pixel to be queried.
public  booleancontains(double x, double y)
     Returns true if the mask contains the point (x, y).
Parameters:
  x - A double specifying the X coordinate of the pixelto be queried.
Parameters:
  y - A double specifying the Y coordinate of the pixelto be queried.
public  booleancontains(Rectangle rect)
     Returns true if a given Rectangle is entirely included within the mask.
Parameters:
  rect - A Rectangle specifying the region tobe tested for inclusion.
public  booleancontains(Rectangle2D rect)
     Returns true if a given Rectangle2D is entirely included within the mask.
Parameters:
  rect - A Rectangle2D specifying the region tobe tested for inclusion.
public  booleancontains(int x, int y, int w, int h)
     Returns true if a given rectangle (x, y, w, h) is entirely included within the mask.
Parameters:
  x - The int X coordinate of the upper left corner of the region.
Parameters:
  y - The int Y coordinate of the upper left corner of the region.
Parameters:
  w - The int width of the region.
Parameters:
  h - The int height of the region.
public  booleancontains(double x, double y, double w, double h)
     Returns true if a given rectangle (x, y, w, h) is entirely included within the mask.
Parameters:
  x - The double X coordinate of the upper left corner of the region.
Parameters:
  y - The double Y coordinate of the upper left corner of the region.
Parameters:
  w - The double width of the region.
Parameters:
  h - The double height of the region.
public  ROIexclusiveOr(ROI roi)
     Sets the mask to its exclusive-or with another mask.
public  int[][]getAsBitmask(int x, int y, int width, int height, int[][] mask)
     Returns a bitmask for a given rectangular region of the ROI indicating whether the pixel is included in the region of interest.
public  PlanarImagegetAsImage()
     Returns the shape as a PlanarImage.
public  LinkedListgetAsRectangleList(int x, int y, int width, int height)
     Returns a LinkedList of Rectangles for a given rectangular region of the ROI.
protected  LinkedListgetAsRectangleList(int x, int y, int width, int height, boolean mergeRectangles)
     Returns a LinkedList of Rectangles for a given rectangular region of the ROI.
Parameters:
  x - The X coordinate of the upper left corner of the rectangle.
Parameters:
  y - The Y coordinate of the upper left corner of the rectangle.
Parameters:
  width - The width of the rectangle.
Parameters:
  height - The height of the rectangle.
Parameters:
  mergeRectangles - true if the Rectanglesare to be merged into a minimal set.
public  ShapegetAsShape()
     Returns the internal Shape representation or null if a shape representation is not possible.
public  RectanglegetBounds()
     Returns the bounds of the mask as a Rectangle.
public  Rectangle2DgetBounds2D()
     Returns the bounds of the mask as a Rectangle2D.
public  ROIintersect(ROI roi)
     Sets the mask to its intersection with another mask.
public  booleanintersects(Rectangle r)
     Returns true if a given Rectangle intersects the mask.
Parameters:
  r - A Rectangle specifying the region to be tested forinclusion.
public  booleanintersects(Rectangle2D r)
     Returns true if a given Rectangle2D intersects the mask.
Parameters:
  r - A Rectangle2D specifying the region to betested for inclusion.
public  booleanintersects(int x, int y, int w, int h)
     Returns true if a given rectangle (x, y, w, h) intersects the mask.
Parameters:
  x - The int X coordinate of the upper left corner of the region.
Parameters:
  y - The int Y coordinate of the upper left corner of the region.
Parameters:
  w - The int width of the region.
Parameters:
  h - The int height of the region.
public  booleanintersects(double x, double y, double w, double h)
     Returns true if a given rectangle (x, y, w, h) intersects the mask.
Parameters:
  x - The double X coordinate of the upper left corner of the region.
Parameters:
  y - The double Y coordinate of the upper left corner of the region.
Parameters:
  w - The double width of the region.
Parameters:
  h - The double height of the region.
public  ROIsubtract(ROI roi)
     Subtracts another mask from this one.
public  ROItransform(AffineTransform at)
     Transforms the current contents of the ROI by a given AffineTransform.

Field Detail
theShape
transient Shape theShape(Code)
The internal Shape that defines this mask.




Constructor Detail
ROIShape
public ROIShape(Shape s)(Code)
Constructs an ROIShape from a Shape.
Parameters:
  s - A Shape.
throws:
  IllegalArgumentException - if s is null.



ROIShape
public ROIShape(Area a)(Code)
Constructs an ROIShape from an Area.
Parameters:
  a - An Area.




Method Detail
add
public ROI add(ROI roi)(Code)
Adds another mask to this one. This operation may force this mask to be rendered.
Parameters:
  roi - A ROI.
throws:
  IllegalArgumentException - is roi is null.



contains
public boolean contains(Point p)(Code)
Returns true if the mask contains a given Point.
Parameters:
  p - a Point specifying the coordinates of the pixel to be queried. true if the pixel lies within the mask.
throws:
  IllegalArgumentException - is p is null.



contains
public boolean contains(Point2D p)(Code)
Returns true if the mask contains a given Point2D.
Parameters:
  p - A Point2D specifying the coordinates of the pixelto be queried.
throws:
  IllegalArgumentException - is p is null. true if the pixel lies within the mask.



contains
public boolean contains(int x, int y)(Code)
Returns true if the mask contains the point (x, y).
Parameters:
  x - An int specifying the X coordinate of the pixel to be queried.
Parameters:
  y - An int specifying the Y coordinate of the pixel to be queried. true if the pixel lies within the mask.



contains
public boolean contains(double x, double y)(Code)
Returns true if the mask contains the point (x, y).
Parameters:
  x - A double specifying the X coordinate of the pixelto be queried.
Parameters:
  y - A double specifying the Y coordinate of the pixelto be queried. true if the pixel lies within the mask.



contains
public boolean contains(Rectangle rect)(Code)
Returns true if a given Rectangle is entirely included within the mask.
Parameters:
  rect - A Rectangle specifying the region tobe tested for inclusion. true if the rectangle isentirely contained within the mask.
throws:
  IllegalArgumentException - is rect is null.



contains
public boolean contains(Rectangle2D rect)(Code)
Returns true if a given Rectangle2D is entirely included within the mask.
Parameters:
  rect - A Rectangle2D specifying the region tobe tested for inclusion. true if the rectangle is entirelycontained within the mask.
throws:
  IllegalArgumentException - is rect is null.



contains
public boolean contains(int x, int y, int w, int h)(Code)
Returns true if a given rectangle (x, y, w, h) is entirely included within the mask.
Parameters:
  x - The int X coordinate of the upper left corner of the region.
Parameters:
  y - The int Y coordinate of the upper left corner of the region.
Parameters:
  w - The int width of the region.
Parameters:
  h - The int height of the region. true if the rectangle is entirelycontained within the mask.



contains
public boolean contains(double x, double y, double w, double h)(Code)
Returns true if a given rectangle (x, y, w, h) is entirely included within the mask.
Parameters:
  x - The double X coordinate of the upper left corner of the region.
Parameters:
  y - The double Y coordinate of the upper left corner of the region.
Parameters:
  w - The double width of the region.
Parameters:
  h - The double height of the region. true if the rectangle is entirely containedwithin the mask.



exclusiveOr
public ROI exclusiveOr(ROI roi)(Code)
Sets the mask to its exclusive-or with another mask. This operation may force this mask to be rendered.
Parameters:
  roi - A ROI.
throws:
  IllegalArgumentException - is roi is null.



getAsBitmask
public int[][] getAsBitmask(int x, int y, int width, int height, int[][] mask)(Code)
Returns a bitmask for a given rectangular region of the ROI indicating whether the pixel is included in the region of interest. The results are packed into 32-bit integers, with the MSB considered to lie on the left. The last entry in each row of the result may have bits that lie outside of the requested rectangle. These bits are guaranteed to be zeroed.

The mask array, if supplied, must be of length equal to or greater than height and each of its subarrays must have length equal to or greater than (width + 31)/32. If null is passed in, a suitable array will be constructed. If the mask is non-null but has insufficient size, an exception will be thrown.
Parameters:
  x - The X coordinate of the upper left corner of the rectangle.
Parameters:
  y - The Y coordinate of the upper left corner of the rectangle.
Parameters:
  width - The width of the rectangle.
Parameters:
  height - The height of the rectangle.
Parameters:
  mask - A two-dimensional array of ints at least(width + 31)/32 entries wide and (height) entries tall,or null. A reference to the mask parameter, orto a newly constructed array if mask isnull.




getAsImage
public PlanarImage getAsImage()(Code)
Returns the shape as a PlanarImage. This requires performing an antialiased rendering of the internal Shape. If the upper-left corner of the bounds of thisROIShape is (0, 0), the returned image is aBufferedImage of type TYPE_BYTE_BINARY wrapped asa PlanarImage. Otherwise, the returned image is a(bilevel) TiledImage whose SampleModelis an instance of MultiPixelPackedSampleModel.



getAsRectangleList
public LinkedList getAsRectangleList(int x, int y, int width, int height)(Code)
Returns a LinkedList of Rectangles for a given rectangular region of the ROI. The Rectangles in the list are merged into a minimal set.
Parameters:
  x - The X coordinate of the upper left corner of the rectangle.
Parameters:
  y - The Y coordinate of the upper left corner of the rectangle.
Parameters:
  width - The width of the rectangle.
Parameters:
  height - The height of the rectangle. A LinkedList of Rectangles.



getAsRectangleList
protected LinkedList getAsRectangleList(int x, int y, int width, int height, boolean mergeRectangles)(Code)
Returns a LinkedList of Rectangles for a given rectangular region of the ROI.
Parameters:
  x - The X coordinate of the upper left corner of the rectangle.
Parameters:
  y - The Y coordinate of the upper left corner of the rectangle.
Parameters:
  width - The width of the rectangle.
Parameters:
  height - The height of the rectangle.
Parameters:
  mergeRectangles - true if the Rectanglesare to be merged into a minimal set. A LinkedList of Rectangles.



getAsShape
public Shape getAsShape()(Code)
Returns the internal Shape representation or null if a shape representation is not possible.



getBounds
public Rectangle getBounds()(Code)
Returns the bounds of the mask as a Rectangle.



getBounds2D
public Rectangle2D getBounds2D()(Code)
Returns the bounds of the mask as a Rectangle2D.



intersect
public ROI intersect(ROI roi)(Code)
Sets the mask to its intersection with another mask. This operation may force this mask to be rendered.
Parameters:
  roi - A ROI.
throws:
  IllegalArgumentException - is roi is null.



intersects
public boolean intersects(Rectangle r)(Code)
Returns true if a given Rectangle intersects the mask.
Parameters:
  r - A Rectangle specifying the region to be tested forinclusion. true if the rectangle intersects the mask.
throws:
  IllegalArgumentException - is r is null.



intersects
public boolean intersects(Rectangle2D r)(Code)
Returns true if a given Rectangle2D intersects the mask.
Parameters:
  r - A Rectangle2D specifying the region to betested for inclusion. true if the rectangle intersects the mask.
throws:
  IllegalArgumentException - is r is null.



intersects
public boolean intersects(int x, int y, int w, int h)(Code)
Returns true if a given rectangle (x, y, w, h) intersects the mask.
Parameters:
  x - The int X coordinate of the upper left corner of the region.
Parameters:
  y - The int Y coordinate of the upper left corner of the region.
Parameters:
  w - The int width of the region.
Parameters:
  h - The int height of the region. true if the rectangle intersects the mask.



intersects
public boolean intersects(double x, double y, double w, double h)(Code)
Returns true if a given rectangle (x, y, w, h) intersects the mask.
Parameters:
  x - The double X coordinate of the upper left corner of the region.
Parameters:
  y - The double Y coordinate of the upper left corner of the region.
Parameters:
  w - The double width of the region.
Parameters:
  h - The double height of the region. true if the rectangle intersects the mask.



subtract
public ROI subtract(ROI roi)(Code)
Subtracts another mask from this one. This operation may force this mask to be rendered.
Parameters:
  roi - A ROI.
throws:
  IllegalArgumentException - is roi is null.



transform
public ROI transform(AffineTransform at)(Code)
Transforms the current contents of the ROI by a given AffineTransform.
Parameters:
  at - An AffineTransform object.
throws:
  IllegalArgumentException - if at is null.



Fields inherited from javax.media.jai.ROI
transient PlanarImage theImage(Code)(Java Doc)
int threshold(Code)(Java Doc)

Methods inherited from javax.media.jai.ROI
public ROI add(ROI roi)(Code)(Java Doc)
public boolean contains(Point p)(Code)(Java Doc)
public boolean contains(Point2D p)(Code)(Java Doc)
public boolean contains(int x, int y)(Code)(Java Doc)
public boolean contains(double x, double y)(Code)(Java Doc)
public boolean contains(Rectangle rect)(Code)(Java Doc)
public boolean contains(Rectangle2D rect)(Code)(Java Doc)
public boolean contains(int x, int y, int w, int h)(Code)(Java Doc)
public boolean contains(double x, double y, double w, double h)(Code)(Java Doc)
public ROI exclusiveOr(ROI roi)(Code)(Java Doc)
public int[][] getAsBitmask(int x, int y, int width, int height, int[][] mask)(Code)(Java Doc)
public PlanarImage getAsImage()(Code)(Java Doc)
public LinkedList getAsRectangleList(int x, int y, int width, int height)(Code)(Java Doc)
protected LinkedList getAsRectangleList(int x, int y, int width, int height, boolean mergeRectangles)(Code)(Java Doc)
public Shape getAsShape()(Code)(Java Doc)
public Rectangle getBounds()(Code)(Java Doc)
public Rectangle2D getBounds2D()(Code)(Java Doc)
public int getThreshold()(Code)(Java Doc)
public ROI intersect(ROI roi)(Code)(Java Doc)
public boolean intersects(Rectangle rect)(Code)(Java Doc)
public boolean intersects(Rectangle2D r)(Code)(Java Doc)
public boolean intersects(int x, int y, int w, int h)(Code)(Java Doc)
public boolean intersects(double x, double y, double w, double h)(Code)(Java Doc)
protected static LinkedList mergeRunLengthList(LinkedList rectList)(Code)(Java Doc)
public ROI performImageOp(RenderedImageFactory RIF, ParameterBlock paramBlock, int sourceIndex, RenderingHints renderHints)(Code)(Java Doc)
public ROI performImageOp(String name, ParameterBlock paramBlock, int sourceIndex, RenderingHints renderHints)(Code)(Java Doc)
public void setThreshold(int threshold)(Code)(Java Doc)
public ROI subtract(ROI roi)(Code)(Java Doc)
public ROI transform(AffineTransform at, Interpolation interp)(Code)(Java Doc)
public ROI transform(AffineTransform at)(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.