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

RasterFactory
public class RasterFactory (Code)
A convenience class for the construction of various types of WritableRaster and SampleModel objects.

This class provides the capability of creating Rasters with the enumerated data types in the java.awt.image.DataBuffer.

In some cases, instances of ComponentSampleModelJAI, a subclass of java.awt.image.ComponentSampleModel are instantiated instead of java.awt.image.BandedSampleModel in order to work around bugs in the current release of the Java 2 SDK.





Method Summary
public static  WritableRastercreateBandedRaster(int dataType, int width, int height, int bands, Point location)
     Creates a WritableRaster based on a ComponentSampleModel with the specified data type, width, height, and number of bands.

Note that the Raster's SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.

The upper left corner of the WritableRaster is given by the location argument.

public static  WritableRastercreateBandedRaster(int dataType, int width, int height, int scanlineStride, int bankIndices, int bandOffsets, Point location)
     Creates a WritableRaster based on a ComponentSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets. The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same.

Note that the Raster's SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.

The upper left corner of the WritableRaster is given by the location argument.

public static  WritableRastercreateBandedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int bankIndices, int bandOffsets, Point location)
     Creates a WritableRaster based on a ComponentSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.
public static  SampleModelcreateBandedSampleModel(int dataType, int width, int height, int numBands, int bankIndices, int bandOffsets)
     Creates a banded SampleModel with a given data type, width, height, number of bands, bank indices, and band offsets.

Note that the returned SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.

public static  SampleModelcreateBandedSampleModel(int dataType, int width, int height, int numBands)
     Creates a banded SampleModel with a given data type, width, height, and number of bands.
public static  ComponentColorModelcreateComponentColorModel(int dataType, ColorSpace colorSpace, boolean useAlpha, boolean premultiplied, int transparency)
     Creates a component-based ColorModel with a given data type, color space, and transparency type.
public static  SampleModelcreateComponentSampleModel(SampleModel sm, int dataType, int width, int height, int numBands)
     Creates a component SampleModel with a given data type, width, height, and number of bands that is "compatible" with a given SampleModel.
Parameters:
  sm - The SampleModel to be compatible with.
public static  WritableRastercreateInterleavedRaster(int dataType, int width, int height, int numBands, Point location)
     Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.

The upper left corner of the WritableRaster is given by the location argument.

public static  WritableRastercreateInterleavedRaster(int dataType, int width, int height, int scanlineStride, int pixelStride, int bandOffsets, Point location)
     Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.
public static  WritableRastercreateInterleavedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int pixelStride, int bandOffsets, Point location)
     Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.
public static  WritableRastercreatePackedRaster(int dataType, int width, int height, int bandMasks, Point location)
     Creates a WritableRaster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks.
public static  WritableRastercreatePackedRaster(int dataType, int width, int height, int numBands, int bitsPerBand, Point location)
     Creates a WritableRaster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.
public static  WritableRastercreatePackedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int bandMasks, Point location)
     Creates a WritableRaster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.
public static  WritableRastercreatePackedRaster(DataBuffer dataBuffer, int width, int height, int bitsPerPixel, Point location)
     Creates a WritableRaster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel. The upper left corner of the WritableRaster is given by the location argument.
public static  SampleModelcreatePixelInterleavedSampleModel(int dataType, int width, int height, int pixelStride, int scanlineStride, int bandOffsets)
     Creates a pixel interleaved SampleModel with a given data type, width, height, pixel and scanline strides, and band offsets.
public static  SampleModelcreatePixelInterleavedSampleModel(int dataType, int width, int height, int numBands)
     Creates a pixel interleaved SampleModel with a given data type, width, height, and number of bands.
public static  RastercreateRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point location)
     Creates a WritableRaster with the specified SampleModel and DataBuffer.
public static  WritableRastercreateWritableChild(WritableRaster raster, int parentX, int parentY, int width, int height, int childMinX, int childMinY, int bandList)
     Returns a new WritableRaster which shares all or part of the supplied WritableRaster's DataBuffer.
public static  WritableRastercreateWritableRaster(SampleModel sampleModel, Point location)
     Creates a WritableRaster with the specified SampleModel.
public static  WritableRastercreateWritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point location)
     Creates a WritableRaster with the specified SampleModel and DataBuffer.



Method Detail
createBandedRaster
public static WritableRaster createBandedRaster(int dataType, int width, int height, int bands, Point location)(Code)
Creates a WritableRaster based on a ComponentSampleModel with the specified data type, width, height, and number of bands.

Note that the Raster's SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.

The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the WritableRaster,one of the enumerated dataType values in java.awt.image.DataBuffer.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  bands - The desired number of bands.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if bands is<1.




createBandedRaster
public static WritableRaster createBandedRaster(int dataType, int width, int height, int scanlineStride, int bankIndices, int bandOffsets, Point location)(Code)
Creates a WritableRaster based on a ComponentSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets. The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same.

Note that the Raster's SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.

The upper left corner of the WritableRaster is given by the location argument. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the WritableRaster,one of the enumerated dataType values in java.awt.image.DataBuffer.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  bankIndices - An array of ints indicating thebank index for each band.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if bankIndices isnull, bandOffsets isnull, if bandOffsets.lengthis != bankIndices.length,if dataType is not one of the enumerateddatatypes of java.awt.image.DataBuffer.




createBandedRaster
public static WritableRaster createBandedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int bankIndices, int bandOffsets, Point location)(Code)
Creates a WritableRaster based on a ComponentSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets. The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.

Note that the Raster's SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  bankIndices - An array of ints indicating thebank index for each band.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if bankIndices isnull, if bandOffsets isnull, if bandOffsets.lengthis != bankIndices.length,if dataType is not one of the enumerateddatatypes of java.awt.image.DataBuffer.




createBandedSampleModel
public static SampleModel createBandedSampleModel(int dataType, int width, int height, int numBands, int bankIndices, int bandOffsets)(Code)
Creates a banded SampleModel with a given data type, width, height, number of bands, bank indices, and band offsets.

Note that the returned SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected. Its behavior will be equivalent to that of a BandedSampleModel, and in particular its pixel stride will always be 1.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the SampleModel.
Parameters:
  height - The desired height of the SampleModel.
Parameters:
  numBands - The desired number of bands.
Parameters:
  bankIndices - An array of ints indicating thebank index for each band.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
throws:
  IllegalArgumentException - if numBands is<1, if bandOffsets.length is!= bankIndices.length.




createBandedSampleModel
public static SampleModel createBandedSampleModel(int dataType, int width, int height, int numBands)(Code)
Creates a banded SampleModel with a given data type, width, height, and number of bands. The bank indices and band offsets are set to default values.

Note that the returned SampleModel will be of type ComponentSampleModel, not BandedSampleModel as might be expected. Its behavior will be equivalent to that of a BandedSampleModel, and in particular its pixel stride will always be 1.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the SampleModel.
Parameters:
  height - The desired height of the SampleModel.
Parameters:
  numBands - The desired number of bands.




createComponentColorModel
public static ComponentColorModel createComponentColorModel(int dataType, ColorSpace colorSpace, boolean useAlpha, boolean premultiplied, int transparency)(Code)
Creates a component-based ColorModel with a given data type, color space, and transparency type. Currently this method does not support data type DataBuffer.TYPE_SHORT. If useAlpha is false, both premultiplied and transparency input are ignored and they are set to be false and Transparency.OPQAUE , respectively.
Parameters:
  dataType - The data type of the ColorModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  colorSpace - An instance of ColorSpace.
Parameters:
  useAlpha - true if alpha is to be used.
Parameters:
  premultiplied - true if alpha values arepremultiplied. If useAlpha isfalse, the value ofpremultiplied is ignored.
Parameters:
  transparency - One of Transparency.OPAQUE,Transparency.BITMASK, orTransparency.TRANSLUCENT. IfuseAlpha is false, the value oftransparency is ignored. If useAlphais true, transparency must not equalTransparency.OPQAUE.
throws:
  IllegalArgumentExceptionException - if colorSpace isnull.
throws:
  IllegalArgumentException - if transparencyhas an unknown value, if useAlpha == true buttransparency == Transparency.OPAQUE, or ifdataType is not one of the standard types listedabove.



createComponentSampleModel
public static SampleModel createComponentSampleModel(SampleModel sm, int dataType, int width, int height, int numBands)(Code)
Creates a component SampleModel with a given data type, width, height, and number of bands that is "compatible" with a given SampleModel.
Parameters:
  sm - The SampleModel to be compatible with.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the SampleModel.
Parameters:
  height - The desired height of the SampleModel.
Parameters:
  numBands - The desired number of bands.



createInterleavedRaster
public static WritableRaster createInterleavedRaster(int dataType, int width, int height, int numBands, Point location)(Code)
Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified data type, width, height, and number of bands.

The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  numBands - The desired number of bands.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if numbands is<1.




createInterleavedRaster
public static WritableRaster createInterleavedRaster(int dataType, int width, int height, int scanlineStride, int pixelStride, int bandOffsets, Point location)(Code)
Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets. The number of bands is inferred from bandOffsets.length.

The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the WritableRaster,one of the enumerated dataType values in java.awt.image.DataBuffer.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  pixelStride - The desired pixel stride.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if bandOffsets isnull, dataType is not one ofthe enumerated dataType value of java.awt.image.DataBuffer.
throws:
  IllegalArgumentException - if the number of array elementsrequired by the returned WritableRasterwould exceed Integer.MAX_VALUE.




createInterleavedRaster
public static WritableRaster createInterleavedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int pixelStride, int bandOffsets, Point location)(Code)
Creates a WritableRaster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets. The number of bands is inferred from bandOffsets.length. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  pixelStride - The desired pixel stride.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - if bandOffsets isnull, if pixelStride*width is> scanlineStride, if dataTypeof the DataBuffer is not onethe enumerated dataType value of java.awt.image.DataBuffer.



createPackedRaster
public static WritableRaster createPackedRaster(int dataType, int width, int height, int bandMasks, Point location)(Code)
Creates a WritableRaster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks. The number of bands is inferred from bandMasks.length.

The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the WritableRaster,one of DataBuffer.TYPE_BYTE,TYPE_USHORT or TYPE_INT.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - is thrown ifthe dataType is not of either TYPE_BYTEor TYPE_USHORT or TYPE_INT.




createPackedRaster
public static WritableRaster createPackedRaster(int dataType, int width, int height, int numBands, int bitsPerBand, Point location)(Code)
Creates a WritableRaster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band. If the number of bands is one, the SampleModel will be a MultiPixelPackedSampleModel.

If the number of bands is more than one, the SampleModel will be a SinglePixelPackedSampleModel, with each band having bitsPerBand bits. In either case, the requirements on dataType and bitsPerBand imposed by the corresponding SampleModel must be met.

The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class.
Parameters:
  dataType - The data type of the WritableRaster,one of DataBuffer.TYPE_BYTE,TYPE_USHORT or TYPE_INT.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  numBands - The desired number of bands.
Parameters:
  bitsPerBand - The number of bits per band.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - is thrown ifthe dataType is not of either TYPE_BYTEor TYPE_USHORT or TYPE_INT.
throws:
  IllegalArgumentException - is thrown if bitsPerBandis negative or zero.




createPackedRaster
public static WritableRaster createPackedRaster(DataBuffer dataBuffer, int width, int height, int scanlineStride, int bandMasks, Point location)(Code)
Creates a WritableRaster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks. The number of bands is inferred from bandMasks.length. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  bandMasks - An array of ints indicating thebitmasks for each band within a pixel.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - is thrown ifthe dataType is not of either TYPE_BYTEor TYPE_USHORT or TYPE_INT.



createPackedRaster
public static WritableRaster createPackedRaster(DataBuffer dataBuffer, int width, int height, int bitsPerPixel, Point location)(Code)
Creates a WritableRaster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per pixel. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  width - The desired width of the WritableRaster.
Parameters:
  height - The desired height of the WritableRaster.
Parameters:
  bitsPerPixel - The desired pixel depth.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.
throws:
  IllegalArgumentException - is thrown ifthe dataType of the dataBufferis not of either TYPE_BYTE or TYPE_USHORT or TYPE_INT.



createPixelInterleavedSampleModel
public static SampleModel createPixelInterleavedSampleModel(int dataType, int width, int height, int pixelStride, int scanlineStride, int bandOffsets)(Code)
Creates a pixel interleaved SampleModel with a given data type, width, height, pixel and scanline strides, and band offsets.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the SampleModel.
Parameters:
  height - The desired height of the SampleModel.
Parameters:
  pixelStride - The desired pixel stride.
Parameters:
  scanlineStride - The desired scanline stride.
Parameters:
  bandOffsets - An array of ints indicating therelative offsets of the bands within a pixel.
throws:
  IllegalArgumentException - if bandOffsets isnull, if the pixelStride*widthis > than scanlineStride,if the dataType is not one of the abovementioned datatypes.



createPixelInterleavedSampleModel
public static SampleModel createPixelInterleavedSampleModel(int dataType, int width, int height, int numBands)(Code)
Creates a pixel interleaved SampleModel with a given data type, width, height, and number of bands. The pixel stride, scanline stride, and band offsets are set to default values.
Parameters:
  dataType - The data type of the SampleModel,one of DataBuffer.TYPE_BYTE,TYPE_USHORT,TYPE_SHORT,TYPE_INT,TYPE_FLOAT, orTYPE_DOUBLE.
Parameters:
  width - The desired width of the SampleModel.
Parameters:
  height - The desired height of the SampleModel.
Parameters:
  numBands - The desired number of bands.
throws:
  IllegalArgumentException - if numBands is<1.



createRaster
public static Raster createRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point location)(Code)
Creates a WritableRaster with the specified SampleModel and DataBuffer. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  sampleModel - The SampleModel to be used.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.



createWritableChild
public static WritableRaster createWritableChild(WritableRaster raster, int parentX, int parentY, int width, int height, int childMinX, int childMinY, int bandList)(Code)
Returns a new WritableRaster which shares all or part of the supplied WritableRaster's DataBuffer. The new WritableRaster will possess a reference to the supplied WritableRaster, accessible through its getParent() and getWritableParent() methods.

This method provides a workaround for a bug in the implementation of WritableRaster.createWritableChild in the initial relase of the Java2 platform.

The parentX, parentY, width and height parameters form a Rectangle in this WritableRaster's coordinate space, indicating the area of pixels to be shared. An error will be thrown if this Rectangle is not contained with the bounds of the supplied WritableRaster.

The new WritableRaster may additionally be translated to a different coordinate system for the plane than that used by the supplied WritableRaster. The childMinX and childMinY parameters give the new (x, y) coordinate of the upper-left pixel of the returned WritableRaster; the coordinate (childMinX, childMinY) in the new WritableRaster will map to the same pixel as the coordinate (parentX, parentY) in the supplied WritableRaster.

The new WritableRaster may be defined to contain only a subset of the bands of the supplied WritableRaster, possibly reordered, by means of the bandList parameter. If bandList is null, it is taken to include all of the bands of the supplied WritableRaster in their current order.

To create a new WritableRaster that contains a subregion of the supplied WritableRaster, but shares its coordinate system and bands, this method should be called with childMinX equal to parentX, childMinY equal to parentY, and bandList equal to null.
Parameters:
  raster - The parent WritableRaster.
Parameters:
  parentX - X coordinate of the upper left corner of the sharedrectangle in this WritableRaster's coordinates.
Parameters:
  parentY - Y coordinate of the upper left corner of the sharedrectangle in this WritableRaster's coordinates.
Parameters:
  width - Width of the shared rectangle starting at(parentX, parentY).
Parameters:
  height - Height of the shared rectangle starting at(parentX, parentY).
Parameters:
  childMinX - X coordinate of the upper left corner ofthe returned WritableRaster.
Parameters:
  childMinY - Y coordinate of the upper left corner ofthe returned WritableRaster.
Parameters:
  bandList - Array of band indices, or null to use all bands.
throws:
  RasterFormatException - if the subregion is outside of theraster bounds.




createWritableRaster
public static WritableRaster createWritableRaster(SampleModel sampleModel, Point location)(Code)
Creates a WritableRaster with the specified SampleModel. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  sampleModel - The SampleModel to use.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.



createWritableRaster
public static WritableRaster createWritableRaster(SampleModel sampleModel, DataBuffer dataBuffer, Point location)(Code)
Creates a WritableRaster with the specified SampleModel and DataBuffer. The upper left corner of the WritableRaster is given by the location argument. If location is null, (0, 0) will be used.
Parameters:
  sampleModel - The SampleModel to be used.
Parameters:
  dataBuffer - The DataBuffer to be used.
Parameters:
  location - A Point indicating the startingcoordinates of the WritableRaster.



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.