Package ij.process

Examples of ij.process.ImageProcessor.crop()


    public boolean cropImage(Image i, File outputFile, int top, int left, int width, int height) {
        ImagePlus ip = ((ImageJImage)i).getImagePlus();
        ImageProcessor processor = ip.getProcessor();

        processor.setRoi(left, top, width, height);
        processor = processor.crop();
        ip.setProcessor(null, processor);

        return ImageProcess.save(((ImageJImage) i).getImageType(), ip, outputFile);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.