com.xinapse.multisliceimage.roi
Class IrregularROIInProgress
java.lang.Object
com.xinapse.multisliceimage.roi.ROI
com.xinapse.multisliceimage.roi.IrregularROI
com.xinapse.multisliceimage.roi.IrregularROIInProgress
- All Implemented Interfaces:
- EditableOutlineROI, RotatableROI, StretchableROI, java.lang.Cloneable
public class IrregularROIInProgress
- extends IrregularROI
- implements java.lang.Cloneable
A Class representing an IrregularROI being drawn on an image. When being drawn, an IrregularROI
looks like a CurvedLineROI.
|
Constructor Summary |
IrregularROIInProgress(double[] x,
double[] y,
byte userColour)
Creates a new IrregularROIInProgress with the specified shape in mm coordinates. |
|
Method Summary |
void |
appendVertex(double x,
double y)
|
void |
appendVertex(java.awt.geom.Point2D pt)
|
IrregularROIInProgress |
clone()
Returns a clone of this ROI. |
boolean |
draw(java.awt.Graphics g,
java.awt.Rectangle visibleRectangle,
int imageDrawCols,
int imageDrawRows,
int xOffset,
int yOffset,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
boolean drawAnnotation)
Draws this ROI if it needs to be be drawn on screen. |
void |
insertVertex(double x,
double y)
|
void |
insertVertex(java.awt.geom.Point2D pt)
|
void |
removeFirstVertex()
|
void |
removeLastVertex()
|
| Methods inherited from class com.xinapse.multisliceimage.roi.IrregularROI |
closestPoints, contains, deleteVertex, dilate, drawInOrthoView, equals, erasePoints, flipHorizontal, flipVertical, getButtonIcon, getCentre, getCopy, getCreateInteractionType, getDescription, getFeret, getFollowingHandle, getName, getNPoints, getPerimeter, getPrecedingHandle, getTheta, getVertex, getVertexHandles, getVertices, hashCode, insertTwoVertices, intersects, join, makeConvex, move, move, moveVertex, selfIntersects, set, setTheta, setVertex, setVertices, setVertices, setVertices, setVertices, toString |
| Methods inherited from class com.xinapse.multisliceimage.roi.ROI |
add, add, addMorphological, clearDeletionHistory, clearStats, dilate, exclusiveOr, getAnnotation, getBoundingRectangle, getBoundingRectangle, getCachedStatistics, getClasses, getColor, getDisplayedBounds2D, getDisplayedBounds2D, getDisplayedRoiArea, getFeret, getHandles, getHandleUnderPoint, getImageSource, getPixelValue, getROIs, getROIs, getROIs, getSlice, getState, getStats, getStats, getStats, getTextColor, getTextFontSize, getUserColour, intersect, isDeleted, isEditable, isReloaded, isSelected, join, main, markDeleted, mmPosToPix, moveROIs, pixPosToMm, printStats, selectDeselect, setAnnotation, setCreationHistory, setSlice, setState, setTextColor, setTextSize, setUserColour, subtract, subtract, write, write |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
IrregularROIInProgress
public IrregularROIInProgress(double[] x,
double[] y,
byte userColour)
throws ROIException
- Creates a new IrregularROIInProgress with the specified shape in mm coordinates.
- Parameters:
x - an array of x-coordinates for the points forming the outline.y - an array of y-coordinates for the points forming the outline.
- Throws:
ROIException - if the ROI cannot be created as specified.
appendVertex
public void appendVertex(java.awt.geom.Point2D pt)
appendVertex
public void appendVertex(double x,
double y)
insertVertex
public void insertVertex(java.awt.geom.Point2D pt)
insertVertex
public void insertVertex(double x,
double y)
removeLastVertex
public void removeLastVertex()
removeFirstVertex
public void removeFirstVertex()
draw
public boolean draw(java.awt.Graphics g,
java.awt.Rectangle visibleRectangle,
int imageDrawCols,
int imageDrawRows,
int xOffset,
int yOffset,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
boolean drawAnnotation)
- Description copied from class:
ROI
- Draws this ROI if it needs to be be drawn on screen.
- Overrides:
draw in class IrregularROI
- Parameters:
g - the graphics context for the drawing operation.visibleRectangle - the part of the image that can be seen on-screen.imageDrawCols - width of the area in which this portion of the image is to be drawn.imageDrawRows - height of the area in which this portion of the image is to be drawn.xOffset - a horizontal offset for drawing operations.yOffset - a vertical offset for drawing operations.nCols - the number of columns in the image on which this ROI is defined.nRows - the number of rows in the image on which this ROI is defined.pixelXSize - pixel width for the image on which this ROI is defined.pixelYSize - pixel height for the image on which this ROI is defined.drawAnnotation - a flag to indicate whether annotation should be drawn.
- Returns:
- true if the ROI is visible and been drawn on screen;
false otherwise.
clone
public IrregularROIInProgress clone()
- Description copied from class:
ROI
- Returns a clone of this ROI. The copy will be identical in shape and
annotation as the original ROI, and with a history identical to the cloned ROI.
- Overrides:
clone in class IrregularROI
- Returns:
- a clone of this ROI, cast to an Object.
Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.