|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRegistry
public final class Registry
A set of static methods for managing JAI's operation registry.
modules/library/coverage (gt-coverage.jar)
Method Summary | |
---|---|
static boolean |
registerGeotoolsServices(OperationRegistry registry)
Unconditionnaly registers all JAI operations provided in the org.geotools.image.jai
package. |
static boolean |
registerRIF(JAI jai,
OperationDescriptor descriptor,
String name,
ContextualRenderedImageFactory crif)
Register the "SampleTranscode" image operation to the operation registry of the specified JAI instance. |
static void |
setNativeAccelerationAllowed(String operation,
boolean allowed)
Allows or disallow native acceleration for the specified operation on the default JAI instance. |
static void |
setNativeAccelerationAllowed(String operation,
boolean allowed,
JAI jai)
Allows or disallow native acceleration for the specified operation on the given JAI instance. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean registerGeotoolsServices(OperationRegistry registry)
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.
registry
- The operation registry to register with.
true
if all registrations have been successful.public static void setNativeAccelerationAllowed(String operation, boolean allowed, JAI jai)
"Affine"
operation on
an image with float data type, bilinear interpolation and an 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.
operation
- The operation name (e.g. "Affine"
).allowed
- false
to disallow native acceleration.jai
- The instance of JAI
we are going to work on. This argument can be
omitted for the default JAI instance.public static void setNativeAccelerationAllowed(String operation, boolean allowed)
setNativeAccelerationAllowed(operation, allowed, JAI.getDefaultInstance())
.
setNativeAccelerationAllowed(String, boolean, JAI)
public static boolean registerRIF(JAI jai, OperationDescriptor descriptor, String name, ContextualRenderedImageFactory crif)
GridSampleDimension
.
jai
- is he JAI
instance in which we ant to register this operation.descriptor
- is the OperationDescriptor
for the JAI operation to register.name
- is the name of the operation to register.crif
- is the rendered image facotry for this operation.
true
if everything goes well, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |