Module ij
Package ij.gui

Class ImageRoi

All Implemented Interfaces:, java.lang.Cloneable, java.lang.Iterable<java.awt.Point>

public class ImageRoi
extends Roi
An ImageRoi is an Roi that overlays an image.
See Also:
ImagePlus.setOverlay(ij.gui.Overlay), Serialized Form
  • Constructor Details

    • ImageRoi

      public ImageRoi​(int x, int y, java.awt.image.BufferedImage bi)
      Creates a new ImageRoi from a BufferedImage.
    • ImageRoi

      public ImageRoi​(int x, int y, ImageProcessor ip)
      Creates a new ImageRoi from a ImageProcessor.
  • Method Details

    • draw

      public void draw​(java.awt.Graphics g)
      draw in class Roi
    • setComposite

      public void setComposite​(java.awt.Composite composite)
      Sets the composite mode.
    • setOpacity

      public void setOpacity​(double opacity)
      Sets the composite mode using the specified opacity (alpha), in the range 0.0-1.0, where 0.0 is fully transparent and 1.0 is fully opaque.
    • getSerializedImage

      public byte[] getSerializedImage()
      Returns a serialized version of the image.
    • getOpacity

      public double getOpacity()
      Returns the current opacity.
    • rotate

      public void rotate​(double angle)
    • setAngle

      public void setAngle​(double angle)
    • setZeroTransparent

      public void setZeroTransparent​(boolean zeroTransparent)
    • getZeroTransparent

      public boolean getZeroTransparent()
    • clone

      public java.lang.Object clone()
      Description copied from class: Roi
      Returns a copy of this roi. See Thinking is Java by Bruce Eckel ( for a good description of object cloning.
      clone in class Roi
    • getProcessor

      public ImageProcessor getProcessor()
    • setProcessor

      public void setProcessor​(ImageProcessor ip)