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

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

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

JAI.getOperationRegistry介绍

暂无

代码示例

代码示例来源:origin: geoserver/geoserver

final OperationRegistry opRegistry = JAI.getDefaultInstance().getOperationRegistry();
for (String mode : RegistryMode.getModeNames()) {
  for (Iterator descriptors = opRegistry.getDescriptors(mode).iterator();

代码示例来源:origin: geoserver/geoserver

if (!(jaiDef.getOperationRegistry() instanceof ConcurrentOperationRegistry
    || jaiDef.getOperationRegistry()
        instanceof it.geosolutions.jaiext.ConcurrentOperationRegistry)) {
  jaiDef.setOperationRegistry(ConcurrentOperationRegistry.initializeRegistry());

代码示例来源:origin: geotools/geotools

final String name,
  final ContextualRenderedImageFactory crif) {
final OperationRegistry registry = jai.getOperationRegistry();
try {
  registry.registerDescriptor(descriptor);

代码示例来源:origin: geotools/geotools

public static synchronized void register(boolean force) {
  if (!registered || force) {
    OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
    registry.addPropertyGenerator("rendered", "Affine", new GTAffinePropertyGenerator());
    registered = true;
  }
}

代码示例来源:origin: geotools/geotools

public static synchronized void register(boolean force) {
  if (!registered || force) {
    OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
    registry.addPropertyGenerator("rendered", "Warp", new GTWarpPropertyGenerator());
    registered = true;
  }
}

代码示例来源:origin: geotools/geotools

protected static OperationDescriptor getOperationDescriptor(final String name)
    throws OperationNotFoundException {
  final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
  OperationDescriptor operation =
      (OperationDescriptor) registry.getDescriptor(RenderedRegistryMode.MODE_NAME, name);
  if (operation != null) {
    return operation;
  }
  throw new OperationNotFoundException(Errors.format(ErrorKeys.OPERATION_NOT_FOUND_$1, name));
}

代码示例来源:origin: geotools/geotools

/**
 * Returns the operation descriptor for the specified JAI operation name. This method uses the
 * default {@link JAI} instance and looks for the {@value #RENDERED_MODE} mode.
 *
 * @param name The operation name.
 * @return The operation descriptor for the given name.
 * @throws OperationNotFoundException if no JAI descriptor was found for the given name.
 * @since 2.4
 */
protected static OperationDescriptor getOperationDescriptor(final String name)
    throws OperationNotFoundException {
  final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
  OperationDescriptor operation =
      (OperationDescriptor) registry.getDescriptor(RENDERED_MODE, name);
  if (operation != null) {
    return operation;
  }
  throw new OperationNotFoundException(Errors.format(ErrorKeys.OPERATION_NOT_FOUND_$1, name));
}

代码示例来源:origin: geotools/geotools

final String operation, final boolean allowed, final JAI jai) {
final String product = "com.sun.media.jai";
final OperationRegistry registry = jai.getOperationRegistry();

代码示例来源:origin: geotools/geotools

/**
 * Forcefully registers the specified rendered operation in the JAI registry
 *
 * @param descriptor
 * @param rif
 * @param productName
 * @return true if the registration succeded, false if the registration was not required as the
 *     operation was already available in the registry
 */
public static boolean registerRIF(
    final JAI jai,
    OperationDescriptor descriptor,
    RenderedImageFactory rif,
    String productName) {
  final OperationRegistry registry = jai.getOperationRegistry();
  try {
    // see if the operation is already registered, avoid registering it twice
    new ParameterBlockJAI(descriptor.getName());
    return false;
  } catch (Exception e) {
    registry.registerDescriptor(descriptor);
    final String descName = descriptor.getName();
    registry.registerFactory(RenderedRegistryMode.MODE_NAME, descName, productName, rif);
    return true;
  }
}

代码示例来源:origin: geotools/geotools

final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
final OperationDescriptor operation =
    (OperationDescriptor)

代码示例来源:origin: locationtech/geowave

public static synchronized void register(final boolean force) {
 if (!registered || force) {
  final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
  final RenderedImageFactory rif = new WarpRIF();
  registry.registerFactory(
    RenderedRegistryMode.MODE_NAME,
    "Warp",
    "it.geosolutions.jaiext",
    rif);
  registered = true;
 }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Set the ordering of image reader and writers.
 */
@Override
public void initialize(final Properties properties, final boolean reinit) {
  Registry.setDefaultCodecPreferences();
  if (reinit) {
    Registry.registerGeotoolkitServices(JAI.getDefaultInstance().getOperationRegistry());
    initialized = true;
  }
}

代码示例来源:origin: org.n52.sensorweb/oxf-layer

public synchronized static void register() {
  try {
    if (descriptor != null) {
      return;
    }
    descriptor = new TransparencyDescriptor();
    OperationRegistry or = JAI.getDefaultInstance().getOperationRegistry();
    or.registerDescriptor(descriptor);
    RIFRegistry.register(or, resources[0][1], PRODUCT, descriptor);
  } catch (IllegalArgumentException e) {
    LOGGER.warn("Unable to register descriptor");
  }
}

代码示例来源:origin: org.n52.sensorweb/oxf-layer

public synchronized static void register() {
  try {
    if (descriptor != null) {
      return;
    }
    descriptor = new MosaikDescriptor();
    OperationRegistry or = JAI.getDefaultInstance().getOperationRegistry();
    or.registerDescriptor(descriptor);
    RIFRegistry.register(or, resources[0][1], PRODUCT, descriptor);
  } catch (IllegalArgumentException e) {
    LOGGER.warn("Unable to register descriptor");
  }
}

代码示例来源:origin: geotools/geotools

final ImagingParameterDescriptors parameters;
descriptor =
    JAI.getDefaultInstance().getOperationRegistry().getDescriptor(mode, "AddConst");
parameters = new ImagingParameterDescriptors(descriptor);
final GenericName alias = parameters.getAlias().iterator().next();

代码示例来源:origin: locationtech/geowave

public static synchronized void register(final boolean force) {
 if (!registered || force) {
  final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
  registry.unregisterDescriptor(new MosaicDescriptor());
  registry.registerDescriptor(new SourceThresholdFixMosaicDescriptor());
  // there seems to be a bug in jai-ext, line 1211 of
  // concurrentoperationregistry null pointer exception
  registry.registerFactory("rendered", "Mosaic", "com.sun.media.jai", new MosaicRIF());
  registered = true;
 }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * Ensures that the JAI registration has been done.
   */
  @Test
  public void testRegistration() {
    final RegistryElementDescriptor descriptor = JAI.getDefaultInstance().getOperationRegistry()
        .getDescriptor(RenderedRegistryMode.MODE_NAME, Hysteresis.OPERATION_NAME);
    assertNotNull("Descriptor not found.", descriptor);
    assertTrue(descriptor instanceof HysteresisDescriptor);
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Ensures that the JAI registration has been done.
 */
@Test
public void testRegistration() {
  final RegistryElementDescriptor descriptor = JAI.getDefaultInstance().getOperationRegistry()
      .getDescriptor(RenderedRegistryMode.MODE_NAME, SilhouetteMask.OPERATION_NAME);
  assertNotNull("Descriptor not found.", descriptor);
  assertTrue(descriptor instanceof SilhouetteMaskDescriptor);
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * Ensures that the JAI registration has been done.
   */
  @Test
  public void testRegistration() {
    final RegistryElementDescriptor descriptor = JAI.getDefaultInstance().getOperationRegistry()
        .getDescriptor(RenderedRegistryMode.MODE_NAME, Combine.OPERATION_NAME);
    assertNotNull("Descriptor not found.", descriptor);
    assertTrue(descriptor instanceof CombineDescriptor);
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Ensures that the JAI registration has been done.
 */
@Test
@Ignore("Fails randomly, need investigation.")
public void testRegistration() {
  final RegistryElementDescriptor descriptor = JAI.getDefaultInstance().getOperationRegistry()
      .getDescriptor(RenderedRegistryMode.MODE_NAME, Mask.OPERATION_NAME);
  assertNotNull("Descriptor not found.", descriptor);
  assertTrue(descriptor instanceof MaskDescriptor);
}

相关文章