javax.media.jai.JAI.setOperationRegistry()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中javax.media.jai.JAI.setOperationRegistry()方法的一些代码示例,展示了JAI.setOperationRegistry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JAI.setOperationRegistry()方法的具体详情如下:
包路径:javax.media.jai.JAI
类名称:JAI
方法名:setOperationRegistry

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));
}

相关文章