/** * Constructs a default coverage processor. The {@link #scanForPlugins} method will be * automatically invoked the first time an operation is required. Additional operations * can be added by subclasses with the {@link #addOperation} method. Rendering hints will * be initialized with the following hints: * <p> * <ul> * <li>{@link JAI#KEY_REPLACE_INDEX_COLOR_MODEL} set to {@link Boolean#FALSE}.</li> * <li>{@link JAI#KEY_TRANSFORM_ON_COLORMAP} set to {@link Boolean#FALSE}.</li> * </ul> * * @param hints A set of additional rendering hints, or {@code null} if none. */ public DefaultProcessor(final RenderingHints hints) { registry = new FactoryRegistry(Collections.singleton(Operation.class)); this.hints = new Hints(hints); this.hints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE); this.hints.put(JAI.KEY_TRANSFORM_ON_COLORMAP, Boolean.FALSE); this.hints.put(Hints.GRID_COVERAGE_PROCESSOR, this); // Must overwrites user setting. }
/** * Constructs a default coverage processor. The {@link #scanForPlugins} method will be * automatically invoked the first time an operation is required. Additional operations * can be added by subclasses with the {@link #addOperation} method. Rendering hints will * be initialized with the following hints: * <p> * <ul> * <li>{@link JAI#KEY_REPLACE_INDEX_COLOR_MODEL} set to {@link Boolean#FALSE}.</li> * <li>{@link JAI#KEY_TRANSFORM_ON_COLORMAP} set to {@link Boolean#FALSE}.</li> * </ul> * * @param hints A set of additional rendering hints, or {@code null} if none. */ public CoverageProcessor(final RenderingHints hints) { registry = new FactoryRegistry(Arrays.asList(new Class<?>[] { Operation.class })); this.hints = new Hints(); this.hints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE); this.hints.put(JAI.KEY_TRANSFORM_ON_COLORMAP, Boolean.FALSE); // override with user hints if(hints!=null) this.hints.add(hints); }