if (iw.getNoData() == null && this.noData != null) { iw.setNoData(this.noData.getAsRange()); if (iw.getNoData() != null) { PlanarImage t = PlanarImage.wrapRenderedImage(renderedImage); t.setProperty(NoDataContainer.GC_NODATA, new NoDataContainer(iw.getNoData())); renderedImage = t; } else if (this.noData != null) {
CoverageUtilities.setNoDataProperty(properties, w.getNoData()); CoverageUtilities.setROIProperty(properties, w.getROI()); return getCoverageFactory()
CoverageUtilities.setNoDataProperty(properties, w.getNoData());
final SampleModel sm = this.image.getSampleModel(); final int datatype = sm.getDataType(); Range noData = getNoData(); final boolean gray = ColorUtilities.isGrayPalette(icm, checkTransparent)
ri, intensityWorker.getROI(), intensityWorker.getNoData(), destinationNoData, resX,
Float.valueOf(targetBB.height)); newROI = w.getROI(); newNoData = w.getNoData(); CoverageUtilities.setROIProperty(sourceProps, newROI); CoverageUtilities.setNoDataProperty(sourceProps, newNoData); nodata != null ? new Range[] {nodata} : null); newROI = w.getROI(); newNoData = w.getNoData(); CoverageUtilities.setROIProperty(sourceProps, newROI); CoverageUtilities.setNoDataProperty(sourceProps, newNoData); operation = "Affine"; newROI = w.getROI(); newNoData = w.getNoData(); CoverageUtilities.setROIProperty(sourceProps, newROI); CoverageUtilities.setNoDataProperty(sourceProps, newNoData); w.warp(warp, interpolation); newROI = w.getROI(); newNoData = w.getNoData(); CoverageUtilities.setROIProperty(sourceProps, newROI); CoverageUtilities.setNoDataProperty(sourceProps, newNoData);
CoverageUtilities.setNoDataProperty(properties, w.getNoData());
if (getNoData() != null) { ImageWorker delegate = new ImageWorker(getRenderedImage()); delegate.setBackground(bgValues);
/** * Optmized method for Gray Scale Byte images to turn noData value to transparent. * * @param image * @return */ private RenderedImage grayNoDataTransparent(RenderedImage image) { // Using an ImageWorker ImageWorker iw = new ImageWorker(image); Range noData = iw.getNoData(); ColorModel cm = image.getColorModel(); final int numColorBands = cm.getNumColorComponents(); if (noData != null && image.getSampleModel().getDataType() == DataBuffer.TYPE_BYTE && numColorBands == 1 && cm instanceof ComponentColorModel) { int minValue = noData.getMin().intValue(); int maxValue = noData.getMax().intValue(); if (minValue == maxValue && minValue >= Byte.MIN_VALUE && minValue <= Byte.MAX_VALUE) { // Optimization on gray images with noData value. Make that value transparent Color transparentColor = new Color(minValue, minValue, minValue); iw.makeColorTransparent(transparentColor); return iw.getRenderedImage(); } } return null; }
if (!(imageBounds.contains(mapRasterArea) || imageBounds.equals(mapRasterArea)) || transparencyType != Transparency.OPAQUE || iw.getNoData() != null || roiCandidate instanceof ROI) { image =