Package ij.process

Examples of ij.process.ImageProcessor


  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();
    Image img = ip.createImage();
    imp.flush();
    imp = null;
    ip = null;
   
    BufferedImage bImg = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
View Full Code Here


    *    Gets Color lookup Table from 8 bit ImagePlus
    */
    void Process8bitCLT(ImagePlus image){
           colorDepth = 8;
            //setTransparent(false);
            ImageProcessor ip = image.getProcessor();
            ip = ip.convertToByte(true);      
            ColorModel cm = ip.getColorModel();
            indexedPixels = (byte[])(ip.getPixels());
            IndexColorModel m = (IndexColorModel)cm;
            int mapSize = m.getMapSize();
            if (transIndex>=mapSize) {
                setTransparent(false);
                transIndex = 0;
View Full Code Here

    ImageRecord dim = new ImageRecord(file);
    Opener o = new Opener();
    ImagePlus imp = o.openImage(file);
    if (imp == null)
      return null;
    ImageProcessor ip = imp.getProcessor();
    dim.setWidth(ip.getWidth());
    dim.setHeight(ip.getHeight());
    ip = null;
    return dim;
  }
View Full Code Here

                g.setColor(new Color(100, 100, 100));
                g.drawString(wmText, x + 2, y + 2);
                g.setColor(new Color(240, 240, 240));
                g.drawString(wmText, x, y);
            }
            ImageProcessor ip = new ImagePlus("temp", img).getProcessor();
            // if the inputMimeType is image/gif, need to convert to RGB in any case
            if (inputMimeType.equals("image/gif")) {
                ip = ip.convertToRGB();
                alreadyConvertedToRGB = true;
            }
            // causes scale() and resize() to do bilinear interpolation
            ip.setInterpolate(true);
            if (!op.equals("convert")) {
                if (op.equals("resize")) {
                    ip = resize(ip, newWidth);
                } else if (op.equals("zoom")) {
                    ip = zoom(ip, zoomAmt);
View Full Code Here

        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();
        Image img = ip.createImage();
        imp.flush();
        imp = null;
        ip = null;

        BufferedImage bImg = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
View Full Code Here

        final Opener o = new Opener();
        final ImagePlus imp = o.openImage(file);
        if (imp == null) {
            return null;
        }
        ImageProcessor ip = imp.getProcessor();
        final int width = ip.getWidth();
        final int height = ip.getHeight();

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("{} (width: {} | height: {})", file, Integer.toString(width), Integer.toString(height));
        }
View Full Code Here

TOP

Related Classes of ij.process.ImageProcessor

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.