本文整理了Java中javax.media.jai.JAI.setOperationRegistry()
方法的一些代码示例,展示了JAI.setOperationRegistry()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JAI.setOperationRegistry()
方法的具体详情如下:
包路径:javax.media.jai.JAI
类名称:JAI
方法名:setOperationRegistry
暂无
代码示例来源:origin: geoserver/geoserver
|| jaiDef.getOperationRegistry()
instanceof it.geosolutions.jaiext.ConcurrentOperationRegistry)) {
jaiDef.setOperationRegistry(ConcurrentOperationRegistry.initializeRegistry());
代码示例来源:origin: it.geosolutions.jaiext.utilities/jt-utilities
private synchronized static JAIExt getJAIEXT(boolean useJaiExtOps, boolean forceReInit) {
if (jaiext == null || forceReInit) {
ConcurrentOperationRegistry initializeRegistry = (ConcurrentOperationRegistry) ConcurrentOperationRegistry.initializeRegistry(useJaiExtOps);
jaiext = new JAIExt(initializeRegistry);
DEFAULT_INSTANCE.setOperationRegistry(initializeRegistry);
}
return jaiext;
}
代码示例来源:origin: geosolutions-it/jai-ext
private synchronized static JAIExt getJAIEXT(boolean useJaiExtOps, boolean forceReInit) {
if (jaiext == null || forceReInit) {
ConcurrentOperationRegistry initializeRegistry = (ConcurrentOperationRegistry) ConcurrentOperationRegistry.initializeRegistry(useJaiExtOps);
jaiext = new JAIExt(initializeRegistry);
DEFAULT_INSTANCE.setOperationRegistry(initializeRegistry);
}
return jaiext;
}
代码示例来源:origin: bcdev/beam
private static void initJAI(ClassLoader cl) {
// Suppress ugly (and harmless) JAI error messages saying that a JAI is going to continue in pure Java mode.
System.setProperty("com.sun.media.jai.disableMediaLib", "true"); // disable native libraries for JAI
// Must use a new operation registry in order to register JAI operators defined in Ceres and BEAM
OperationRegistry operationRegistry = OperationRegistry.getThreadSafeOperationRegistry();
InputStream is = SystemUtils.class.getResourceAsStream(JAI_REGISTRY_PATH);
if (is != null) {
// Suppress ugly (and harmless) JAI error messages saying that a descriptor is already registered.
final PrintStream oldErr = System.err;
try {
setSystemErr(new PrintStream(new ByteArrayOutputStream()));
operationRegistry.updateFromStream(is);
operationRegistry.registerServices(cl);
JAI.getDefaultInstance().setOperationRegistry(operationRegistry);
} catch (IOException e) {
BeamLogManager.getSystemLogger().log(Level.SEVERE,
MessageFormat.format("Error loading {0}: {1}", JAI_REGISTRY_PATH,
e.getMessage()), e);
} finally {
setSystemErr(oldErr);
}
} else {
BeamLogManager.getSystemLogger().warning(MessageFormat.format("{0} not found", JAI_REGISTRY_PATH));
}
Integer parallelism = Integer.getInteger(BEAM_PARALLELISM_PROPERTY_NAME,
Runtime.getRuntime().availableProcessors());
JAI.getDefaultInstance().getTileScheduler().setParallelism(parallelism);
BeamLogManager.getSystemLogger().info(
MessageFormat.format("JAI tile scheduler parallelism set to {0}", parallelism));
}
内容来源于网络,如有侵权,请联系作者删除!