TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) throw new IOException(
/** Returns the color interpretation of the sample dimension. */ @Override public ColorInterpretation getColorInterpretation() { return TypeMap.getColorInterpretation(getColorModel(), band); }
/** * Returns the color interpretation of the sample dimension. A sample dimension can be an index * into a color palette or be a color model component. If the sample dimension is not assigned a * color interpretation the value is {@link ColorInterpretation#UNDEFINED}. */ public ColorInterpretation getColorInterpretation() { // The 'Grid2DSampleDimension' class overrides this method // with better values for 'band' and 'numBands' constants. final int band = 0; final int numBands = 1; return TypeMap.getColorInterpretation(getColorModel(band, numBands), band); }
private GridSampleDimension[] getSampleDimensions(final RenderedImage coverageRaster) throws IOException { GridSampleDimension[] bands = rasterInfo.getGridSampleDimensions(); // may the image have been promoted? build the correct band info then final int imageBands = coverageRaster.getSampleModel().getNumBands(); if (bands.length == 1 && imageBands > 1) { LOGGER.fine( coverageName + " was promoted from 1 to " + coverageRaster.getSampleModel().getNumBands() + " bands, returning an appropriate set of GridSampleDimension"); // stolen from super.createCoverage: final ColorModel cm = coverageRaster.getColorModel(); bands = new GridSampleDimension[imageBands]; // setting bands names. for (int i = 0; i < imageBands; i++) { final ColorInterpretation colorInterpretation; colorInterpretation = TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) { throw new IOException("Unrecognized sample dimension type"); } bands[i] = new GridSampleDimension(colorInterpretation.name()); } } return bands; }
private GridCoverage2D prepareCoverage(RenderedImage image) throws IOException { // creating bands final SampleModel sm = image.getSampleModel(); final ColorModel cm = image.getColorModel(); final int numBands = sm.getNumBands(); final GridSampleDimension[] bands = new GridSampleDimension[numBands]; // setting bands names. for (int i = 0; i < numBands; i++) { final ColorInterpretation colorInterpretation = TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) throw new IOException("Unrecognized sample dimension type"); bands[i] = new GridSampleDimension(colorInterpretation.name()); } return coverageFactory.create( rasterManager.getCoverageIdentifier(), image, new GeneralEnvelope(bbox), bands, null, null); }
final ColorInterpretation colorInterpretation = TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) throw new IOException("Unrecognized sample dimension type");
final ColorInterpretation colorInterpretation = TypeMap.getColorInterpretation(cm, 0); if (colorInterpretation == null) throw new IOException("Unrecognized sample dimension type");
final ColorInterpretation colorInterpretation = TypeMap.getColorInterpretation(cm, i);
final ColorInterpretation colorInterpretation = TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) throw new IOException("Unrecognized sample dimension type");
sd[i] = new GridSampleDimension( TypeMap.getColorInterpretation(op.getColorModel(), i).name());
colorInterpretation = TypeMap.getColorInterpretation(cm, i); if (colorInterpretation == null) { throw new IOException("Unrecognized sample dimension type");
sd[i] = new GridSampleDimension( TypeMap.getColorInterpretation(im.getColorModel(), i).name());
sd[i] = new GridSampleDimension( TypeMap.getColorInterpretation(composedImage.getColorModel(), i) .name());
/** * Returns the color interpretation of the sample dimension. */ @Override public ColorInterpretation getColorInterpretation() { return TypeMap.getColorInterpretation(getColorModel(), band); }
/** * Returns the color interpretation of the sample dimension. */ public ColorInterpretation getColorInterpretation() { return TypeMap.getColorInterpretation(getColorModel(), band); }
/** * Returns the color interpretation of the sample dimension. * A sample dimension can be an index into a color palette or be a color model * component. If the sample dimension is not assigned a color interpretation * the value is {@link ColorInterpretation#UNDEFINED}. * */ public ColorInterpretation getColorInterpretation() { // The 'Grid2DSampleDimension' class overrides this method // with better values for 'band' and 'numBands' constants. final int band = 0; final int numBands = 1; return TypeMap.getColorInterpretation(getColorModel(band, numBands), band); }
/** * Returns the color interpretation of the sample dimension. * A sample dimension can be an index into a color palette or be a color model * component. If the sample dimension is not assigned a color interpretation * the value is {@link ColorInterpretation#UNDEFINED}. * * @deprecated No replacement. */ public ColorInterpretation getColorInterpretation() { // The 'Grid2DSampleDimension' class overrides this method // with better values for 'band' and 'numBands' constants. final int band = 0; final int numBands = 1; return TypeMap.getColorInterpretation(getColorModel(band, numBands), band); }
sd[i] = new GridSampleDimension( TypeMap.getColorInterpretation(classified.getColorModel(), i) .name());
sd[i] = new GridSampleDimension( TypeMap.getColorInterpretation(finalImage.getColorModel(), i) .name());
private GridCoverage2D prepareCoverage( RenderedImage image) throws IOException { // creating bands final SampleModel sm=image.getSampleModel(); final ColorModel cm=image.getColorModel(); final int numBands = sm.getNumBands(); final GridSampleDimension[] bands = new GridSampleDimension[numBands]; // setting bands names. for (int i = 0; i < numBands; i++) { final ColorInterpretation colorInterpretation=TypeMap.getColorInterpretation(cm, i); if(colorInterpretation==null) throw new IOException("Unrecognized sample dimension type"); bands[i] = new GridSampleDimension(colorInterpretation.name()).geophysics(true); } return coverageFactory.create(rasterManager.getCoverageIdentifier(), image,new GeneralEnvelope(bbox), bands, null, null); }