final OperationRegistry opRegistry = JAI.getDefaultInstance().getOperationRegistry(); for (String mode : RegistryMode.getModeNames()) { for (Iterator descriptors = opRegistry.getDescriptors(mode).iterator();
if (!(jaiDef.getOperationRegistry() instanceof ConcurrentOperationRegistry || jaiDef.getOperationRegistry() instanceof it.geosolutions.jaiext.ConcurrentOperationRegistry)) { jaiDef.setOperationRegistry(ConcurrentOperationRegistry.initializeRegistry());
final String name, final ContextualRenderedImageFactory crif) { final OperationRegistry registry = jai.getOperationRegistry(); try { registry.registerDescriptor(descriptor);
public static synchronized void register(boolean force) { if (!registered || force) { OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry(); registry.addPropertyGenerator("rendered", "Affine", new GTAffinePropertyGenerator()); registered = true; } }
public static synchronized void register(boolean force) { if (!registered || force) { OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry(); registry.addPropertyGenerator("rendered", "Warp", new GTWarpPropertyGenerator()); registered = true; } }
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)); }
/** * 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)); }
final String operation, final boolean allowed, final JAI jai) { final String product = "com.sun.media.jai"; final OperationRegistry registry = jai.getOperationRegistry();
/** * 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; } }
final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry(); final OperationDescriptor operation = (OperationDescriptor)
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; } }
/** * 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; } }
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"); } }
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"); } }
final ImagingParameterDescriptors parameters; descriptor = JAI.getDefaultInstance().getOperationRegistry().getDescriptor(mode, "AddConst"); parameters = new ImagingParameterDescriptors(descriptor); final GenericName alias = parameters.getAlias().iterator().next();
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; } }
/** * 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); } }
/** * 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); }
/** * 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); } }
/** * 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); }