Package ij.gui

Examples of ij.gui.ShapeRoi


    //IJ.showStatus("Creating GeneralPath");
    GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
    for (int i = 0; i < polygons.size(); i++)
      path.append((Polygon)polygons.get(i), false);

    ShapeRoi shape = new ShapeRoi(path);
    Roi roi = shape!=null?shape.shapeToRoi():null; // try to convert to non-composite ROI
    IJ.showProgress(1,1);
    if (roi!=null)
      return roi;
    else
      return shape;
View Full Code Here


  /** Fills outside an Roi. */
  public void fillOutside(Roi roi) {
    if (roi==null || !roi.isArea()) return;
    ImageProcessor m = getMask();
    Rectangle r = getRoi();
    ShapeRoi s1, s2;
    if (roi instanceof ShapeRoi)
      s1 = (ShapeRoi)roi;
    else
      s1 = new ShapeRoi(roi);
    s2 = new ShapeRoi(new Roi(0,0, width, height));
    setRoi(s1.xor(s2));
    fill(getMask());
    setMask(m);
    setRoi(r);
  }
View Full Code Here

    //IJ.showStatus("Creating GeneralPath");
    GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
    for (int i = 0; i < polygons.size(); i++)
      path.append((Polygon)polygons.get(i), false);

    ShapeRoi shape = new ShapeRoi(path);
    Roi roi = shape!=null?shape.shapeToRoi():null; // try to convert to non-composite ROI
    IJ.showProgress(1,1);
    if (roi!=null)
      return roi;
    else
      return shape;
View Full Code Here

TOP

Related Classes of ij.gui.ShapeRoi

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.