Code example for ImageTypeSpecifier

0
        csm = rasterHandler.getSampleModel();
        ccmdl = PlanarImage.createColorModel(csm);
        final List<ImageTypeSpecifier> l = new ArrayList<ImageTypeSpecifier>();
 
        if (imageType == null) {
            imageType = new ImageTypeSpecifier(ccmdl, csm);
            l.add(imageType);
        } 
        return l.iterator();
    } 
 
    public IIOMetadata getStreamMetadata() throws IOException {
        // grass raster data do not support stream metadata. 
        return null; 
    } 
 
    public IIOMetadata getImageMetadata( final int imageIndex ) throws IOException {
        ensureOpen(); 
        if (metadata == null)
            metadata = new GrassBinaryImageMetadata(this.rasterHandler);