/** * Takes two rendered or renderable source images, and adds every pair of pixels, one from * each source image of the corresponding position and band. See JAI {@link AddDescriptor} * for details. * * @param renderedImage * the {@link RenderedImage} to be added to this {@link ImageWorker}. * @return this {@link ImageWorker}. * * @see AddDescriptor */ public final ImageWorker addImage(final RenderedImage renderedImage) { image = AddDescriptor.create(image, renderedImage, getRenderingHints()); invalidateStatistics(); return this; }
/** * Takes two rendered or renderable source images, and adds every pair of pixels, one from * each source image of the corresponding position and band. See JAI {@link AddDescriptor} * for details. * * @param renderedImage * the {@link RenderedImage} to be added to this {@link ImageWorker}. * @return this {@link ImageWorker}. * * @see AddDescriptor */ public final ImageWorker addImage(final RenderedImage renderedImage) { image = AddDescriptor.create(image, renderedImage, getRenderingHints()); invalidateStatistics(); return this; }
AddDescriptor.create(levelMasterImageEq, H1w, null).getAsBufferedImage(), wid, null).getAsBufferedImage(); BufferedImage crit2 = ImageOperations.doubleConvolve(Hinvert, wi); WeakReference<RenderedImage> vload = new WeakReference(ImagePyramidCache.readImage("v")); WeakReference<RenderedImage> P2 = new WeakReference(MultiplyDescriptor.create(vload.get(), Iyload.get(), null)); WeakReference<RenderedImage> It = new WeakReference(AddDescriptor.create(AddDescriptor.create(I0I1.get(), P1.get(), null), P2.get(), null));
private void setTargetBandImages(Product product, List<RenderedImage> bandImages, List<RenderedImage> variableCountImageList) { for (int i = 0; i < variables.length; i++) { Variable outputVariable = variables[i]; product.getBand(outputVariable.getName()).setSourceImage(bandImages.get(i)); final String countBandName = getCountBandName(outputVariable); product.getBand(countBandName).setSourceImage(variableCountImageList.get(i)); } if (conditions != null) { for (Condition condition : conditions) { if (condition.isOutput()) { // The sum of all conditions of all sources is created. // 1.0 indicates condition is true and 0.0 indicates false. final RenderedImage sumImage = createConditionSumImage(condition); final RenderedImage reformattedImage = FormatDescriptor.create(sumImage, DataBuffer.TYPE_INT, null); RenderedImage condImage = reformattedImage; if (isUpdateMode()) { final RenderedImage updateimage = updateProduct.getBand(condition.getName()).getSourceImage(); condImage = AddDescriptor.create(reformattedImage, updateimage, null); } Band band = product.getBand(condition.getName()); band.setSourceImage(condImage); } } } }