ij.gui.Overlay.toArray()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中ij.gui.Overlay.toArray()方法的一些代码示例,展示了Overlay.toArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Overlay.toArray()方法的具体详情如下:
包路径:ij.gui.Overlay
类名称:Overlay
方法名:toArray

Overlay.toArray介绍

[英]Returns on array containing the ROIs in this Overlay.
[中]返回包含此覆盖中ROI的数组。

代码示例

代码示例来源:origin: net.imagej/ij

public void drawNames(boolean b) {
  drawNames = b;
  Roi[] rois = toArray();
  for (int i=0; i<rois.length; i++)
    rois[i].setIgnoreClipRect(drawNames);
}

代码示例来源:origin: net.imagej/ij

/** 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);
}

代码示例来源:origin: net.imagej/ij

/** 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]);
}

代码示例来源:origin: net.imagej/ij

/** 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);
}

代码示例来源:origin: net.imagej/ij

/** 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;
}

代码示例来源:origin: imagej/ImageJA

public void drawNames(boolean b) {
  drawNames = b;
  Roi[] rois = toArray();
  for (int i=0; i<rois.length; i++)
    rois[i].setIgnoreClipRect(drawNames);
}

代码示例来源:origin: net.imagej/ij

/** 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);
}

代码示例来源:origin: net.imagej/ij

/** 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;
}

代码示例来源:origin: imagej/ImageJA

/** 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;
}

代码示例来源:origin: imagej/ImageJA

/** 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);
}

代码示例来源:origin: imagej/ImageJA

/** 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);
}

代码示例来源:origin: imagej/ImageJA

/** 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;
}

代码示例来源:origin: imagej/ImageJA

/** 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);
}

代码示例来源:origin: imagej/ImageJA

/** 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]);
}

代码示例来源:origin: openmicroscopy/bioformats

/**
 * 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();
}

代码示例来源:origin: ome/bio-formats_plugins

/**
 * 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();
}

代码示例来源:origin: net.imagej/ij

void list() {
  ImagePlus imp = IJ.getImage();
  Overlay overlay = imp.getOverlay();
  if (overlay!=null)
    listRois(overlay.toArray());
}

代码示例来源:origin: net.imagej/ij

/** 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;
}

代码示例来源:origin: imagej/ImageJA

/** 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;
}

代码示例来源:origin: imagej/ImageJA

void list() {
  ImagePlus imp = IJ.getImage();
  Overlay overlay = imp.getOverlay();
  if (overlay!=null)
    listRois(overlay.toArray());
}

相关文章