ij.gui
Class ImageRoi

java.lang.Object
  extended by ij.gui.AbstractRoi
      extended by ij.gui.AttributeRoi
          extended by ij.gui.Roi
              extended by ij.gui.ImageRoi
All Implemented Interfaces:
RoiBeans, RoiConstance, java.io.Serializable, java.lang.Cloneable

public class ImageRoi
extends Roi

An ImageRoi is an Roi that displays an image as an overlay.

See Also:
ImagePlus.setOverlay(ij.gui.Overlay), Serialized Form

Field Summary
 
Fields inherited from class ij.gui.Roi
asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, constrain, defaultFillColor, handleColor, ic, imageID, instanceColor, lineWidth, mag, nonScalable, oldHeight, oldWidth, oldX, oldY, onePixelWide, overlay, pasteMode, previousRoi, updateFullWindow
 
Fields inherited from class ij.gui.AttributeRoi
fillColor, imp, ROIColor, stroke, strokeColor, type, wideLine, xMax, yMax
 
Fields inherited from interface ij.gui.RoiConstance
ADD_TO_ROI, ANGLE, COMPOSITE, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, LINE, MOVING, MOVING_HANDLE, NO_MODS, NORMAL, NOT_PASTING, OVAL, POINT, POLYGON, POLYLINE, RECTANGLE, RESIZING, SUBTRACT_FROM_ROI, TRACED_ROI
 
Constructor Summary
ImageRoi(int x, int y, java.awt.image.BufferedImage bi)
          Creates a new ImageRoi from a BufferedImage.
ImageRoi(int x, int y, ImageProcessor ip)
          Creates a new ImageRoi from a ImageProcessor.
 
Method Summary
 void draw(java.awt.Graphics g)
           
 double getOpacity()
          Returns the current opacity.
 void setComposite(java.awt.Composite composite)
          Sets the composite mode.
 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.
 
Methods inherited from class ij.gui.Roi
abortPaste, clipRectMargin, clone, contains, drawHandle, drawOverlay, drawPixels, drawPixels, drawPixels, endPaste, equals, getBoundingRect, getBounds, getCornerDiameter, getCurrentPasteMode, getDrawOffset, getFloatBounds, getFloatPolygon, getHandleSize, getLength, getMagnification, getMask, getPasteMode, getPolygon, getPrototypeOverlay, getRoundRectArcSize, getScaledStroke, getState, getTypeAsString, grow, handleMouseDown, handleMouseDrag, handleMouseUp, isArea, isDrawingTool, isHandle, isLine, isVisible, mouseDownInHandle, moveHandle, nudge, nudgeCorner, screenX, screenXD, screenY, screenYD, setCornerDiameter, setDrawOffset, setImage, setInstanceColor, setLineWidth, setLocation, setNonScalable, setPasteMode, setPrototypeOverlay, setRoundRectArcSize, showStatus, startPaste, subPixelResolution, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine
 
Methods inherited from class ij.gui.AttributeRoi
copyAttributes, getAngle, getColor, getConvexHull, getCPosition, getDefaultFillColor, getFeretsDiameter, getFeretValues, getFillColor, getImage, getImageID, getName, getPosition, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getZPosition, setColor, setDefaultFillColor, setFillColor, setName, setPosition, setPosition, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

draw

public void draw(java.awt.Graphics g)
Specified by:
draw in interface RoiBeans
Overrides:
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.


getOpacity

public double getOpacity()
Returns the current opacity.