| java.lang.Object org.geotools.image.jai.Registry
Registry | final public class Registry (Code) | | A set of static methods for managing JAI's
.
since: 2.2 version: $Id: Registry.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux |
Method Summary | |
public static boolean | registerGeotoolsServices(OperationRegistry registry) Unconditionnaly registers all JAI operations provided in the
org.geotools.image.jai package. | public static synchronized void | setNativeAccelerationAllowed(String operation, boolean allowed) Allows or disallow native acceleration for the specified JAI operation. |
registerGeotoolsServices | public static boolean registerGeotoolsServices(OperationRegistry registry)(Code) | | Unconditionnaly registers all JAI operations provided in the
org.geotools.image.jai package. This method usually don't need to be invoked, since JAI should parse automatically
the
META-INF/registryFile.jai file at startup time. However, this default mechanism
may fail when the geotools JAR file is unreachable from the JAI class loader, in which case
the
org.geotools.coverage.processing package will invoke this method as a fallback.
Note to module maintainer: if this method is updated, remember to update the
META-INF/registryFile.jai file accordingly.
Parameters: registry - The operation registry to register with. true if all registrations have been successful. |
setNativeAccelerationAllowed | public static synchronized void setNativeAccelerationAllowed(String operation, boolean allowed)(Code) | | Allows or disallow native acceleration for the specified JAI operation. By default, JAI uses
hardware accelerated methods when available. For example, it make use of MMX instructions on
Intel processors. Unfortunatly, some native method crash the Java Virtual Machine under some
circonstances. For example on JAI 1.1.2, the "Affine" operation on an image with float data
type, bilinear interpolation and an
javax.media.jai.ImageLayout rendering hint cause
an exception in medialib native code. Disabling the native acceleration (i.e using the pure
Java version) is a convenient workaround until Sun fix the bug.
Implementation note: the current implementation assumes that factories for
native implementations are declared in the
com.sun.media.jai.mlib package, while
factories for pure java implementations are declared in the
com.sun.media.jai.opimage package. It work for Sun's 1.1.2 implementation, but may change in future versions. If this
method doesn't recognize the package, it does nothing.
Parameters: operation - The operation name (e.g. "Affine"). Parameters: allowed - false to disallow native acceleration. See Also: JAI bug report 4906854 |
|
|