Package ij.plugin.frame

Examples of ij.plugin.frame.RoiManager.runCommand()


    super(getFrame(), title, false);
    label = new MultiLineLabel(text, 175);
    if (!IJ.isLinux()) label.setFont(new Font("SansSerif", Font.PLAIN, 14));
    if (IJ.isMacOSX()) {
      RoiManager rm = RoiManager.getInstance();
      if (rm!=null) rm.runCommand("enable interrupts");
    }
        GridBagLayout gridbag = new GridBagLayout(); //set up the layout
        GridBagConstraints c = new GridBagConstraints();
        setLayout(gridbag);
        c.insets = new Insets(6, 6, 0, 6);
View Full Code Here


  void hide() {
    ImagePlus imp = IJ.getImage();
    imp.setHideOverlay(true);
    RoiManager rm = RoiManager.getInstance();
    if (rm!=null) rm.runCommand("show none");
  }

  void show() {
    ImagePlus imp = IJ.getImage();
    imp.setHideOverlay(false);
View Full Code Here

    imp.setHideOverlay(false);
    if (imp.getOverlay()==null) {
      RoiManager rm = RoiManager.getInstance();
      if (rm!=null && rm.getCount()>1) {
        if (!IJ.isMacro()) rm.toFront();
        rm.runCommand("show all with labels");
      }
    }
  }

  void remove() {
View Full Code Here

  void remove() {
    ImagePlus imp = WindowManager.getCurrentImage();
    if (imp!=null) imp.setOverlay(null);
    RoiManager rm = RoiManager.getInstance();
    if (rm!=null) rm.runCommand("show none");
  }

  void flatten() {
    ImagePlus imp = IJ.getImage();
    ImagePlus imp2 = imp.flatten();
View Full Code Here

        rm = (RoiManager)frame;
      }
    }
    if (overlay.size()>=4 && overlay.get(3).getPosition()!=0)
      Prefs.showAllSliceOnly = true;
    rm.runCommand("reset");
    for (int i=0; i<overlay.size(); i++)
      rm.add(imp, overlay.get(i), i);
    rm.setEditMode(imp, true);
    if (rm.getCount()==overlay.size())
      imp.setOverlay(null);
View Full Code Here

      IJ.error("ROI Manager not found");
    RoiManager rm = (RoiManager)frame;
    boolean altDown= IJ.altKeyDown();
    IJ.setKeyUp(IJ.ALL_KEYS);
    if (altDown) IJ.setKeyDown(KeyEvent.VK_SHIFT);
    rm.runCommand("add");
    IJ.setKeyUp(IJ.ALL_KEYS);
  }

}
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.