Package gov.lanl.adore.djatoka.io

Examples of gov.lanl.adore.djatoka.io.FormatIOException


        try {
            encoder.write(out);
        } catch (IOException e) {
            LOGGER.error(e.getMessage(), e);
            throw new FormatIOException(e.getMessage(), e);
        }
    }
View Full Code Here


        try {
            ip = JAIReader.read(new File(input))[0];
        } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);
            throw new FormatIOException(e.getMessage(), e);
        }

        return open(ip);
    }
View Full Code Here

     * @throws FormatIOException
     */
    private BufferedImage open(ImagePlus imp) throws FormatIOException {
        if (imp == null) {
            LOGGER.error("Null ImagePlus Object.");
            throw new FormatIOException("Null ImagePlus Object.");
        }

        ImageProcessor ip = imp.getProcessor();
        int width = ip.getWidth();
        int height = ip.getHeight();
View Full Code Here

    @Override
    public BufferedImage open(final String aFileName) throws FormatIOException {
        try {
            return new PNMImage(aFileName).getBufferedImage();
        } catch (final IOException details) {
            throw new FormatIOException(details);
        }
    }
View Full Code Here

    @Override
    public BufferedImage open(final InputStream aInputStream) throws FormatIOException {
        try {
            return new PNMImage(aInputStream).getBufferedImage();
        } catch (final IOException details) {
            throw new FormatIOException(details);
        }
    }
View Full Code Here

                isBitmap = false;
            } else if (magic1 == 'P' && magic2 == '4') {
                isBitmap = true;
                isGreyscale = false;
            } else {
                throw new FormatIOException("Bad PPM magic number: " + magic1 + magic2);
            }

            /*
             * Read image header.
             */
 
View Full Code Here

TOP

Related Classes of gov.lanl.adore.djatoka.io.FormatIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.