/** Adds the specified ROI to the list. The second argument ('n') will * be used to form the first part of the ROI label if it is zero or greater. * @param roi the Roi to be added * @param n if zero or greater, will be used to form the first part of the label */ public void add(Roi roi, int n) { add((ImagePlus)null, roi, n); }
void addPopupMenu() { pm=new PopupMenu(); //addPopupItem("Select All"); addPopupItem("Open..."); addPopupItem("Save..."); addPopupItem("Fill"); addPopupItem("Draw"); addPopupItem("AND"); addPopupItem("OR (Combine)"); addPopupItem("XOR"); addPopupItem("Split"); addPopupItem("Add Particles"); addPopupItem("Multi Measure"); addPopupItem("Multi Plot"); addPopupItem("Sort"); addPopupItem("Specify..."); addPopupItem("Remove Positions..."); addPopupItem("Labels..."); addPopupItem("List"); addPopupItem("Interpolate ROIs"); addPopupItem("Translate..."); addPopupItem("Help"); addPopupItem("Options..."); add(pm); }
if (IJ.isLinux()) list.setBackground(Color.white); JScrollPane scrollPane = new JScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); add("Center", scrollPane); panel = new Panel(); int nButtons = BUTTONS; labelsCheckbox.addItemListener(this); panel.add(labelsCheckbox); add("East", panel); addPopupMenu(); pack();
alt = false; add(shift, alt); if (IJ.isJava18()&&IJ.isMacOSX()) repaint();
/** Adds the specified ROI to the list. The second argument ('n') will * be used to form the first part of the ROI label if it is zero or greater. * @param roi the Roi to be added * @param n if zero or greater, will be used to form the first part of the label */ public void add(Roi roi, int n) { add((ImagePlus)null, roi, n); }
if (IJ.isLinux()) list.setBackground(Color.white); JScrollPane scrollPane = new JScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); add("Center", scrollPane); panel = new Panel(); int nButtons = BUTTONS; labelsCheckbox.addItemListener(this); panel.add(labelsCheckbox); add("East", panel); addPopupMenu(); pack();
void addPopupMenu() { pm=new PopupMenu(); //addPopupItem("Select All"); addPopupItem("Open..."); addPopupItem("Save..."); addPopupItem("Fill"); addPopupItem("Draw"); addPopupItem("AND"); addPopupItem("OR (Combine)"); addPopupItem("XOR"); addPopupItem("Split"); addPopupItem("Add Particles"); addPopupItem("Multi Measure"); addPopupItem("Multi Plot"); addPopupItem("Sort"); addPopupItem("Specify..."); addPopupItem("Remove Positions..."); addPopupItem("Labels..."); addPopupItem("List"); addPopupItem("Interpolate ROIs"); addPopupItem("Translate..."); addPopupItem("Help"); addPopupItem("Options..."); add(pm); }
alt = false; add(shift, alt); if (IJ.isJava18()&&IJ.isMacOSX()) repaint();
/** * Adds the specified paths to the list of ROI of the image plus. * * @param target The ImagePlus that will be associated with ROIS * @param geodDiams the list of paths */ public void createPathRois(ImagePlus target, Map<Integer, GeodesicDiameter.Result> geodDiams) { // get instance of ROI Manager RoiManager manager = RoiManager.getRoiManager(); Calibration calib = target.getCalibration(); // add each path to the ROI Manager int index = 0; for (GeodesicDiameter.Result result : geodDiams.values()) { manager.add(target, createPathRoi(result.path, calib), index++); } }
protected void exportToROIManager(ImagePlus image) { Roi[] rois = map.get(image); if (rois == null) return; int currentSlice = image.getCurrentSlice(); RoiManager manager = RoiManager.getInstance(); if (manager == null) manager = new RoiManager(); for (int i = 0; i < rois.length; i++) if (rois[i] != null) { image.setSliceWithoutUpdate(i + 1); manager.add(image, rois[i], i + 1); } image.setSlice(currentSlice); }
@Override protected void exportToROIManager(ImagePlus image) { Roi[] rois = map.get(image); if (rois == null) return; int currentSlice = image.getCurrentSlice(); RoiManager manager = RoiManager.getInstance(); if (manager == null) manager = new RoiManager(); for (int i = 0; i < rois.length; i++) if (specifiedByUser(rois[i])) { image.setSliceWithoutUpdate(i + 1); manager.add(image, rois[i], i + 1); } image.setSlice(currentSlice); }
public void setOverlay(Overlay overlay) { if (overlay==null) { overlayTemplate = null; return; } reset(); overlayTemplate = overlay.create(); setEditMode(null, false); for (int i=0; i<overlay.size(); i++) add(overlay.get(i), i+1); setEditMode(null, true); runCommand("show all"); }
public void setOverlay(Overlay overlay) { if (overlay==null) { overlayTemplate = null; return; } reset(); overlayTemplate = overlay.create(); setEditMode(null, false); for (int i=0; i<overlay.size(); i++) add(overlay.get(i), i+1); setEditMode(null, true); runCommand("show all"); }
rm.add((ImagePlus)null, roi, 0);
manager.add(images[imageNum], roi, nextRoi++); } else if (roisMode.equals(ImporterOptions.ROIS_MODE_OVERLAY)) { Overlay overlay = images[imageNum].getOverlay();
manager.add(images[imageNum], roi, nextRoi++); } else if (roisMode.equals(ImporterOptions.ROIS_MODE_OVERLAY)) { Overlay overlay = images[imageNum].getOverlay();
roiManager.add(imp, roi, particleNumber);
roiManager.add(imp, roi, particleNumber);