/** * Retains inconditionnaly the first band of {@linkplain #image}. All other bands (if any) are * discarted without any further processing. * * @return this {@link ImageWorker}. * @see #getNumBands * @see #retainBands * @see BandSelectDescriptor */ public final ImageWorker retainFirstBand() { retainBands(1); // All post conditions for this method contract. assert getNumBands() == 1; return this; }
/** * Retains unconditionally the last band of {@linkplain #image}. All other bands (if any) are * discarded without any further processing. * * <p>It is worth to point out that we use the true number of bands rather than the number of * color components. This means that if we apply this method on a colormapped image we get back * the image itself untouched since it originally contains 1 band although the color components * are 3 or 4 as per the attached colormap. * * @return this {@link ImageWorker}. * @see #getNumBands * @see #retainBands * @see BandSelectDescriptor */ public final ImageWorker retainLastBand() { final int band = getNumBands() - 1; if (band != 0) { retainBands(new int[] {band}); } // All post conditions for this method contract. assert getNumBands() == 1; return this; }
retainBands(numBands - 1);
raster = new ImageWorker(raster).retainBands(bands).getRenderedImage(); ColorModel colorModel = raster.getColorModel(); if (colorModel == null) {
/** * Retains inconditionnaly the first band of {@linkplain #image}. All other * bands (if any) are discarted without any further processing. * * @return this {@link ImageWorker}. * * @see #getNumBands * @see #retainBands * @see BandSelectDescriptor */ public final ImageWorker retainFirstBand() { retainBands(1); // All post conditions for this method contract. assert getNumBands() == 1; return this; }
/** * Retains inconditionnaly the first band of {@linkplain #image}. All other * bands (if any) are discarted without any further processing. * * @return this {@link ImageWorker}. * * @see #getNumBands * @see #retainBands * @see BandSelectDescriptor */ public final ImageWorker retainFirstBand() { retainBands(1); // All post conditions for this method contract. assert getNumBands() == 1; return this; }
.getRenderedImage(); worker.setRenderingHints(hints).retainBands(numbands - 1); new ImageWorker(IHS) .setRenderingHints(hints) .retainBands(new int[] {1}) .getRenderedImage(); intensity = true;
this.retainBands(numBands);
worker.retainBands(new int[] {band});
.getRenderedImage(); imageWorker.retainBands(mosaic.getColorModel().getNumColorComponents()); imageWorker.addBand(maskedAlpha, false, true, null); } else {
worker.retainBands(1); image = worker.getRenderedImage();
/** * Retains inconditionnaly the last band of {@linkplain #image}. All other * bands (if any) are discarted without any further processing. * * @return this {@link ImageWorker}. * * @see #getNumBands * @see #retainBands * @see BandSelectDescriptor */ public final ImageWorker retainLastBand() { retainBands(new int[] {getNumBands() - 1}); // All post conditions for this method contract. assert getNumBands() == 1; return this; }
alphaChannel = w.retainBands(alphaIndex).getPlanarImage();
PlanarImage image; if (targetBands != sourceBands) { image = w.setRenderingHints(hints).retainBands(bandIndices).getPlanarImage(); } else {
if (getNumBands() % 2 == 0) retainBands(getNumBands() - 1); forceColorSpaceRGB(); final RenderingHints hints = getRenderingHints();
new ImageWorker(sourceImage).setRenderingHints(hints).retainBands(numBands - 1); alphaChannel = new ImageWorker(sourceImage)
pb.set(new int[] {--numBands}, 0); final RenderedOp alphaChannel = JAI.create("BandSelect", pb, hints); retainBands(numBands); forceIndexColorModel(errorDiffusion); tileCacheEnabled(true);
new ImageWorker(outputImage) .setRenderingHints(this.getHints()) .retainBands(new int[] {visibleBand}) .getRenderedImage(); sd =
.retainBands(new int[] {2}) .getRenderedImage(); gc =