Evolution of Graphics and Imaging on the Java Platform

Java-based imaging has progressed through three main stages: the AWT model, the Java 2D API extensions to that model, and the Java Advanced Imaging (JAI) API extensions to the Java 2D API. All the major parts of Java 2D and JAI can ultimately trace their lineage to the AWT model. That said, the AWT model is fairly simple and will receive attention only as needed to explain Java 2D and JAI concepts. The beginning reader will want to become familiar with a set of core packages, especially java.awt and java.awt.image and will want to bookmark the following URLs:

http://java.sun.com/j2se/1.3/docs/api/java/awt/package-summary.html

http://java.sun.com/j2se/1.3/docs/api/java/awt/Image.html

It should be emphasized at the outset that many imaging and graphics problems can be solved by simply using the Java 2D API. The developer will want to weigh heavily whether it is necessary to use the JAI extensions. A primary reason is that, at present, the JAI API isn't part of the core Java Foundation Classes. The Java 2D API is part of the JFC and is thus supported on all Java platforms since 1.2. Java 2D's being a standard part of the JFC simplifies matters greatly for many basic Internet applications because the user isn't required to set classpaths or download class libraries. Another important reason for choosing Java 2D over JAI is simplicity. Getting a handle on JAI can be challenging, even for experienced image processing programmers.

On the other hand, JAI is truly an advanced imaging API. It is a complete extension to Java 2D and allows for powerful imaging operations such as multiresolution imaging, image tiling, and imaging over a network (explained in Chapter 5, “Image I/O Package”). JAI comes with more than 80 image operators and provides an extension mechanism for developing additional operators. Further, JAI uses a sophisticated imaging model, called the pull model, that enables a number of optimizations and allows so-called deferred execution, in which images are processed as needed, thus avoiding unnecessary image computation. Another important aspect of the JAI is the use of native code for many image processing operations.

JAI is suitable for applications such as medical imaging, interactive special effects, and remote sensing applications, just to name a few. My own emphasis is on functional brain imaging and virtual reality. In both of these areas, I see the potential for a lot of exciting applications. Nonetheless, a more mundane aspect of my research involves the design of computerized cognitive tasks, essentially little custom user interfaces that are displayed on the computer screen to study some particular cognitive skill. For the development of these applications, Java 2D is ideal. Given that Java 2D has some reasonably sophisticated image processing capabilities, excellent and complete graphics support, and is included as part of the core JDK 1.2, most developers will want to strongly consider using Java 2D unless compelled to do otherwise.

It is further true that a basic knowledge of Java 2D (at least the imaging aspects of Java 2D) is essential to understanding the JAI. Readers already knowledgeable about things such as the immediate mode rendering model and the difference between rendered and renderable images might want to skip ahead to Chapter 6, “Java Advanced Imaging,” where the JAI is described in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset