public void drawNames(boolean b) { drawNames = b; Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setIgnoreClipRect(drawNames); }
/** Sets the fill color of all the ROIs in this overlay. */ public void setFillColor(Color color) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setFillColor(color); }
/** Draws the specified Overlay on this image. Works best with RGB images. Does not work with 16-bit and float images. Requires Java 1.6. @see ImageProcessor#drawRoi */ public void drawOverlay(Overlay overlay) { Roi[] rois = overlay.toArray(); for (int i=0; i<rois.length; i++) drawRoi(rois[i]); }
/** Sets the stroke width of all the ROIs in this overlay. */ public void setStrokeWidth(Double width) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeWidth(width); }
/** Returns the index of the ROI with the specified name, or -1 if not found. */ public int getIndex(String name) { if (name==null) return -1; Roi[] rois = toArray(); for (int i=rois.length-1; i>=0; i--) { if (name.equals(rois[i].getName())) return i; } return -1; }
public void drawNames(boolean b) { drawNames = b; Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setIgnoreClipRect(drawNames); }
/** Sets the stroke color of all the ROIs in this overlay. */ public void setStrokeColor(Color color) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeColor(color); }
/** In the Overlay class in imageJ 1.46g and later. */ static int getIndex(Overlay overlay, String name) { if (name==null) return -1; Roi[] rois = overlay.toArray(); for (int i=rois.length-1; i>=0; i--) { if (name.equals(rois[i].getName())) return i; } return -1; }
/** Returns the index of the ROI with the specified name, or -1 if not found. */ public int getIndex(String name) { if (name==null) return -1; Roi[] rois = toArray(); for (int i=rois.length-1; i>=0; i--) { if (name.equals(rois[i].getName())) return i; } return -1; }
/** Sets the stroke width of all the ROIs in this overlay. */ public void setStrokeWidth(Double width) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeWidth(width); }
/** Sets the fill color of all the ROIs in this overlay. */ public void setFillColor(Color color) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setFillColor(color); }
/** In the Overlay class in imageJ 1.46g and later. */ static int getIndex(Overlay overlay, String name) { if (name==null) return -1; Roi[] rois = overlay.toArray(); for (int i=rois.length-1; i>=0; i--) { if (name.equals(rois[i].getName())) return i; } return -1; }
/** Sets the stroke color of all the ROIs in this overlay. */ public void setStrokeColor(Color color) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeColor(color); }
/** Draws the specified Overlay on this image. Works best with RGB images. Does not work with 16-bit and float images. Requires Java 1.6. @see ImageProcessor#drawRoi */ public void drawOverlay(Overlay overlay) { Roi[] rois = overlay.toArray(); for (int i=0; i<rois.length; i++) drawRoi(rois[i]); }
/** * Returns rois if any from the overlay. * @return See above */ public static Roi[] readFromOverlays() { ImagePlus image = IJ.getImage(); Overlay overlay = image.getOverlay(); if (overlay == null) return null; return overlay.toArray(); }
/** * Returns rois if any from the overlay. * @return See above */ public static Roi[] readFromOverlays() { ImagePlus image = IJ.getImage(); Overlay overlay = image.getOverlay(); if (overlay == null) return null; return overlay.toArray(); }
void list() { ImagePlus imp = IJ.getImage(); Overlay overlay = imp.getOverlay(); if (overlay!=null) listRois(overlay.toArray()); }
/** Returns a clone of this Overlay. */ public Overlay duplicate() { Roi[] rois = toArray(); Overlay overlay2 = create(); for (int i=0; i<rois.length; i++) overlay2.add((Roi)rois[i].clone()); return overlay2; }
/** Returns a clone of this Overlay. */ public Overlay duplicate() { Roi[] rois = toArray(); Overlay overlay2 = create(); for (int i=0; i<rois.length; i++) overlay2.add((Roi)rois[i].clone()); return overlay2; }
void list() { ImagePlus imp = IJ.getImage(); Overlay overlay = imp.getOverlay(); if (overlay!=null) listRois(overlay.toArray()); }