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


javax.media.jai.ColormapOpImage
   ca.forklabs.media.jai.opimage.UnaryFunctionOpImage

UnaryFunctionOpImage
public class UnaryFunctionOpImage extends ColormapOpImage (Code)
Class UnaryFunctionOpImage is an OpImage implementing the unaryfunction operation as described in UnaryFunctionDescriptor .
author:
   Daniel Léonard
version:
   $Revision: 1.2 $

Inner Class :abstract protected static class PixelSpecialization

Field Summary
protected static  PixelSpecialization<byte[]>BYTE_SPECIALIZATION
     Specialization for data of type byte.
protected static  PixelSpecialization<double[]>DOUBLE_SPECIALIZATION
     Specialization for data of type double.
protected static  PixelSpecialization<float[]>FLOAT_SPECIALIZATION
     Specialization for data of type float.
protected static  PixelSpecialization<int[]>INT_SPECIALIZATION
     Specialization for data of type int.
protected static  PixelSpecialization<short[]>SHORT_SPECIALIZATION
     Specialization for data of type short.
protected static  PixelSpecialization<short[]>U_SHORT_SPECIALIZATION
     Specialization for data of type unsigned short.

Constructor Summary
public  UnaryFunctionOpImage(RenderedImage source, UnaryFunction<Double, Double> function, ImageLayout layout, Map config)
     Constructor.

The layout of the source is used as the fall-back for the layout of the destination.


Method Summary
protected  A[][]buildAllSourceData(RasterAccessor[] sources, PixelSpecialization<A> specialization)
     Builds the 3-dimensional source matrix. <
Parameters:
  A - > the type of pixels.
Parameters:
  sources - the source rasters.
Parameters:
  specialization - the specialization for the type of pixels.
protected  RasterAccessorbuildRasterAccessor(Raster raster, RasterFormatTag tag, Rectangle bounds, ColorModel color_model)
     Builds a raster accessor for rasters associated with this operation.
Parameters:
  raster - the raster the accessor is for.
Parameters:
  tag - the format tag for the raster.
Parameters:
  bounds - the bounds.
Parameters:
  color_model - the color model.
protected  RasterAccessorbuildSinkRasterAccessor(WritableRaster raster, Rectangle bounds)
     Builds a raster accessor for the sink raster.
Parameters:
  raster - the sink raster.
Parameters:
  bounds - the bounds.
protected  RasterAccessorbuildSourceRasterAccessor(Raster raster, Rectangle bounds, int index)
     Builds the raster accessor for the source raster at the given index.
Parameters:
  raster - the source raster.
Parameters:
  bounds - the bounds on the sink image.
Parameters:
  index - the index of the source image.
protected  RasterAccessor[]buildSourceRasterAccessors(Raster[] rasters, Rectangle bounds)
     Builds all the source raster accessors.
Parameters:
  rasters - the source rasters.
Parameters:
  bounds - the bounds.
protected  voidcompute(RasterAccessor[] sources, RasterAccessor sink, PixelSpecialization<A> specialization)
     Really computes the image.
protected  voidcompute(RasterAccessor[] sources, RasterAccessor sink)
     Computes the image.
protected  voidcomputeByte(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with bytes as the data type.
protected  voidcomputeDouble(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with doubles as the data type.
protected  voidcomputeFloat(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with floats as the data type.
protected  voidcomputeInt(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with integers as the data type.
protected  voidcomputeRect(Raster[] sources, WritableRaster sink, Rectangle bounds)
     Calculates the median of the corresponding pixels of the source images within a specified rectangle.
protected  voidcomputeShort(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with shorts as the data type.
protected  voidcomputeUShort(RasterAccessor[] sources, RasterAccessor sink)
     Compute the image for images with unsigned shorts as the data type.
protected  RasterFormatTaggetFormatTag(int index)
     Gets the raster format tag for the raster at the given index.
Parameters:
  index - the index of the image.
protected  RasterFormatTaggetSinkFormatTag()
     Gets the raster format tag for the sink raster.
protected  RasterFormatTaggetSourceFormatTag(int index)
     Gets the raster format tag for the given source raster.
Parameters:
  index - the index of the source image.
protected  UnaryFunction<Double, Double>getUnaryFunction()
     Gets the function to appy to the image.
protected  StringgetUnknownDataTypeErrorMessage(int type)
     Gets the error message telling that the raster data type is unknown.
Parameters:
  type - the bad type.
protected  voidincrementLineOffsets(int[] line_offsets, int[] line_strides)
     Increments the line offsets by their corresponding line strides.
protected  voidincrementPixelOffsets(int[] pixel_offsets, int[] pixel_strides)
     Increments the pixel offsets by their corresponding pixel strides.
protected  voidresetLineOffsets(int band, int[][] band_offsets, int[] line_offsets)
     Resets the line offsets by setting them to their corresponding band offset.
protected  voidresetPixelOffsets(int[] line_offsets, int[] pixel_offsets)
     Resets the pixel offsets by setting them to their corresponding line offset.
protected  voidsetUnaryFunction(UnaryFunction<Double, Double> function)
     Changes the function to apply to the image.
protected  voidsetup(UnaryFunction<Double, Double> function)
     Sets up this OpImage .
protected  voidtransformColormap(byte[][] color_map)
     Transforms the colormap.

Field Detail
BYTE_SPECIALIZATION
protected static PixelSpecialization<byte[]> BYTE_SPECIALIZATION(Code)
Specialization for data of type byte.



DOUBLE_SPECIALIZATION
protected static PixelSpecialization<double[]> DOUBLE_SPECIALIZATION(Code)
Specialization for data of type double.



FLOAT_SPECIALIZATION
protected static PixelSpecialization<float[]> FLOAT_SPECIALIZATION(Code)
Specialization for data of type float.



INT_SPECIALIZATION
protected static PixelSpecialization<int[]> INT_SPECIALIZATION(Code)
Specialization for data of type int.



SHORT_SPECIALIZATION
protected static PixelSpecialization<short[]> SHORT_SPECIALIZATION(Code)
Specialization for data of type short.



U_SHORT_SPECIALIZATION
protected static PixelSpecialization<short[]> U_SHORT_SPECIALIZATION(Code)
Specialization for data of type unsigned short.




Constructor Detail
UnaryFunctionOpImage
public UnaryFunctionOpImage(RenderedImage source, UnaryFunction<Double, Double> function, ImageLayout layout, Map config)(Code)
Constructor.

The layout of the source is used as the fall-back for the layout of the destination. Any layout parameters not specified in the layout argument are set to the same value as that of the source.
Parameters:
  source - the source image.
Parameters:
  function - the function to apply to the source image.
Parameters:
  layout - the image layout of the destination image.
Parameters:
  config - the configuration of the operation.





Method Detail
buildAllSourceData
protected A[][] buildAllSourceData(RasterAccessor[] sources, PixelSpecialization<A> specialization)(Code)
Builds the 3-dimensional source matrix. <
Parameters:
  A - > the type of pixels.
Parameters:
  sources - the source rasters.
Parameters:
  specialization - the specialization for the type of pixels. the 3-dimensional source matrix.



buildRasterAccessor
protected RasterAccessor buildRasterAccessor(Raster raster, RasterFormatTag tag, Rectangle bounds, ColorModel color_model)(Code)
Builds a raster accessor for rasters associated with this operation.
Parameters:
  raster - the raster the accessor is for.
Parameters:
  tag - the format tag for the raster.
Parameters:
  bounds - the bounds.
Parameters:
  color_model - the color model. the raster accessor.



buildSinkRasterAccessor
protected RasterAccessor buildSinkRasterAccessor(WritableRaster raster, Rectangle bounds)(Code)
Builds a raster accessor for the sink raster.
Parameters:
  raster - the sink raster.
Parameters:
  bounds - the bounds. the raster accessor.



buildSourceRasterAccessor
protected RasterAccessor buildSourceRasterAccessor(Raster raster, Rectangle bounds, int index)(Code)
Builds the raster accessor for the source raster at the given index.
Parameters:
  raster - the source raster.
Parameters:
  bounds - the bounds on the sink image.
Parameters:
  index - the index of the source image. the raster accessor.



buildSourceRasterAccessors
protected RasterAccessor[] buildSourceRasterAccessors(Raster[] rasters, Rectangle bounds)(Code)
Builds all the source raster accessors.
Parameters:
  rasters - the source rasters.
Parameters:
  bounds - the bounds. the raster accessors.



compute
protected void compute(RasterAccessor[] sources, RasterAccessor sink, PixelSpecialization<A> specialization)(Code)
Really computes the image.
Parameters:
  sources - the source raster accessors.
Parameters:
  sink - the sink raster accessor.
Parameters:
  specialization - the pixel specialization.<
Parameters:
  A - > the type of pixel (as an array of that type).



compute
protected void compute(RasterAccessor[] sources, RasterAccessor sink)(Code)
Computes the image.
Parameters:
  sources - the source image.
Parameters:
  sink - the median image.



computeByte
protected void computeByte(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with bytes as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



computeDouble
protected void computeDouble(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with doubles as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



computeFloat
protected void computeFloat(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with floats as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



computeInt
protected void computeInt(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with integers as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



computeRect
protected void computeRect(Raster[] sources, WritableRaster sink, Rectangle bounds)(Code)
Calculates the median of the corresponding pixels of the source images within a specified rectangle.
Parameters:
  sources - the cobbled sources.
Parameters:
  sink - the raster for each calculation.
Parameters:
  bounds - the region of interest.



computeShort
protected void computeShort(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with shorts as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



computeUShort
protected void computeUShort(RasterAccessor[] sources, RasterAccessor sink)(Code)
Compute the image for images with unsigned shorts as the data type.
Parameters:
  sources - the source images.
Parameters:
  sink - the sink image.



getFormatTag
protected RasterFormatTag getFormatTag(int index)(Code)
Gets the raster format tag for the raster at the given index.
Parameters:
  index - the index of the image. the raster format tag.



getSinkFormatTag
protected RasterFormatTag getSinkFormatTag()(Code)
Gets the raster format tag for the sink raster. the raster format tag.



getSourceFormatTag
protected RasterFormatTag getSourceFormatTag(int index)(Code)
Gets the raster format tag for the given source raster.
Parameters:
  index - the index of the source image. the raster format tag.



getUnaryFunction
protected UnaryFunction<Double, Double> getUnaryFunction()(Code)
Gets the function to appy to the image. the function.



getUnknownDataTypeErrorMessage
protected String getUnknownDataTypeErrorMessage(int type)(Code)
Gets the error message telling that the raster data type is unknown.
Parameters:
  type - the bad type. the formatted error message.



incrementLineOffsets
protected void incrementLineOffsets(int[] line_offsets, int[] line_strides)(Code)
Increments the line offsets by their corresponding line strides.
Parameters:
  line_offsets - the line offsets.
Parameters:
  line_strides - the line strides.



incrementPixelOffsets
protected void incrementPixelOffsets(int[] pixel_offsets, int[] pixel_strides)(Code)
Increments the pixel offsets by their corresponding pixel strides.
Parameters:
  pixel_offsets - the pixel offsets.
Parameters:
  pixel_strides - the pixel strides.



resetLineOffsets
protected void resetLineOffsets(int band, int[][] band_offsets, int[] line_offsets)(Code)
Resets the line offsets by setting them to their corresponding band offset.
Parameters:
  band - the current band.
Parameters:
  band_offsets - the band offsets.
Parameters:
  line_offsets - the line offsets.



resetPixelOffsets
protected void resetPixelOffsets(int[] line_offsets, int[] pixel_offsets)(Code)
Resets the pixel offsets by setting them to their corresponding line offset.
Parameters:
  line_offsets - the line offsets.
Parameters:
  pixel_offsets - the pixel offsets.



setUnaryFunction
protected void setUnaryFunction(UnaryFunction<Double, Double> function)(Code)
Changes the function to apply to the image.
Parameters:
  function - the new function.



setup
protected void setup(UnaryFunction<Double, Double> function)(Code)
Sets up this OpImage .
Parameters:
  function - the function to apply.



transformColormap
protected void transformColormap(byte[][] color_map)(Code)
Transforms the colormap.
Parameters:
  color_map - the color map.



Methods inherited from javax.media.jai.ColormapOpImage
final protected void initializeColormapOperation()(Code)(Java Doc)
final protected boolean isColormapOperation()(Code)(Java Doc)
abstract protected void transformColormap(byte[][] colormap)(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.