Java Doc for RasterFormatTag.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.RasterFormatTag

RasterFormatTag
final public class RasterFormatTag (Code)
This class encapsulates the information needed for RasterAccessor to understand how a Raster is laid out. It's designed so that one RasterFormatTag can be constructed per source and that RasterFormatTag can cache information that the RasterAccessor would otherwise have to extract from the Raster each time it's constructed (generally each time OpImage.computeRect() is called.) Additionally, it can cache various arrays (i.e. bankIndices[] and bandOffsets[]) that would otherwise be cloned everytime they were requested. Because of the way SampleModel.createCompatibleSampleModel() is designed not all fields of a particular SampleModel will match those of the SampleModel returned by SampleModel.createCompatibleSampleModel(). Values like pixelStride and numBands won't change, but values like bankIndicies[] and bandOffsets[] might if the underlying Raster is not pixelSequential. Rasters which are pixelSequential meet the following conditions 1) The SampleModel is a ComponentSampleModel. 2) The pixelStride is equal to the number of bands. 3) All the bankIndices[] are equal. 4) All the bandOffsets[] values are less than pixelStride 5) No two bandOffsets[] values are equal. For that reason, RasterFormatTags representing non pixelSequential rasters don't attempt to cache the bandOffsets[] or bankIndices[]. For such rasters, this information should be taken directly from the raster itself. Note that any RasterFormatTag that will cause data to be copied from the Raster will be pixelSequential as that is the format in which data is returned from Raster.getPixels() returns.



Constructor Summary
public  RasterFormatTag(SampleModel sampleModel, int formatTagID)
     Constructs a RasterFormatTag given a sampleModel and a formatTagID.

Method Summary
final public  int[]getBandOffsets()
     Returns the bandOffsets for the Raster if isPixelSequential() is true.
final public  int[]getBankIndices()
     Returns the bankIndices for the Raster if isPixelSequential() is true.
final public  intgetFormatTagID()
     Returns the FormatTagID used to construct this RasterFormatTag.
final public  intgetNumBands()
    
final public  intgetPixelStride()
    
final public  booleanisPixelSequential()
     Returns whether or not the SampleModel represented by the RasterFormatTag is PixelSequential.


Constructor Detail
RasterFormatTag
public RasterFormatTag(SampleModel sampleModel, int formatTagID)(Code)
Constructs a RasterFormatTag given a sampleModel and a formatTagID. Generally, this constructor is called by RasterAccessor.findCompatibleTags(RenderedImage[] srcs, RenderedImage dst) and it takes care of setting the values correctly. In special cases, OpImages need to construct a RasterFormatTag without creating a RenderedImage. In this case a RasterFormatTag can be created using a formatTagID returned from RasterAccessor.findCompatibleTag(SampleModel[] srcs, SampleModel dst) and a sampleModel that was either passed in to the findCompatibleTag() call or one that was created using createCompatibleSampleModel() on one of the passed in SampleModels. Attempting to use arbitrary SampleModels with arbitrary formatTagIDs has undefined results. param sampleModel A SampleModel for the RasterFormagTag param formatTagID An int to indicate format tag id




Method Detail
getBandOffsets
final public int[] getBandOffsets()(Code)
Returns the bandOffsets for the Raster if isPixelSequential() is true. Returns null otherwise. In the COPIED case, bankIndices will be numBands sequential integers starting with 0.



getBankIndices
final public int[] getBankIndices()(Code)
Returns the bankIndices for the Raster if isPixelSequential() is true. Returns null otherwise. In the COPIED case, the bankIndices will all be 0.



getFormatTagID
final public int getFormatTagID()(Code)
Returns the FormatTagID used to construct this RasterFormatTag. Valid values are defined in javax.media.jai.RasterAccessor.



getNumBands
final public int getNumBands()(Code)
Returns the number of bands in the underlying Raster



getPixelStride
final public int getPixelStride()(Code)
Returns the pixelStride of the underlying Raster



isPixelSequential
final public boolean isPixelSequential()(Code)
Returns whether or not the SampleModel represented by the RasterFormatTag is PixelSequential. Note that RasterFormatTag's that indicate data should be copied out of the Raster by the RasterAccessor will always return true for isPixelSequential(). RasterFormatTags that indicate no copying is needed will only return true, if 1) The SampleModel is a ComponentSampleModel. 2) The pixelStride is equal to the number of bands. 3) All the bankIndices[] are equal. 4) All the bandOffsets[] values are less than pixelStride 5) No two bandOffset values are equal.



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.