Package 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,Cloneable
A Class representing an IrregularROI being drawn on an image. When being drawn, an IrregularROI
looks like a CurvedLineROI.
-
Field Summary
Fields inherited from class com.xinapse.multisliceimage.roi.IrregularROI
nPoints, POINTSTOKEN, xpts, yptsFields inherited from class com.xinapse.multisliceimage.roi.ROI
BUTTON_ICON_SIZE, handles, PREFERENCES_NODE_NAME, XTOKEN, YTOKEN -
Constructor Summary
ConstructorsConstructorDescriptionIrregularROIInProgress(double[] x, double[] y, byte userColour) Creates a newIrregularROIInProgresswith the specified shape in mm coordinates. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendVertex(double x, double y) Appends a vertex to the end of this IrregularROIInProgress.voidappendVertex(Point2D pt) Appends a vertex to the end of this IrregularROIInProgress.clone()Returns a clone of thisROI.booleandraw(Graphics g, Rectangle visibleRectangle, int imageDrawCols, int imageDrawRows, int xOffset, int yOffset, int nCols, int nRows, float pixelXSize, float pixelYSize, boolean drawAnnotation) Draws thisROIif it needs to be be drawn on screen.voidinsertVertex(double x, double y) Inserts a vertex at the beginning of this IrregularROIInProgress.voidinsertVertex(Point2D pt) Inserts a vertex at the beginning of this IrregularROIInProgress.voidRemoves the first vertex from this IrregularROIInProgress.voidRemoves the last vertex from this IrregularROIInProgress.Methods inherited from class com.xinapse.multisliceimage.roi.IrregularROI
closestPoints, contains, containsVertex, deleteVertex, drawInOrthoView, equals, erasePoints, flipHorizontal, flipVertical, getButtonIcon, getCentre, getCentroid, getCopy, getCreateInteractionType, getDescription, getFeret, getFollowingVisibleHandle, getName, getNormal, getNPoints, getPerimeter, getPrecedingVisibleHandle, getPrincipalAxisAngle, getTheta, getVertex, getVertexHandles, getVertices, hashCode, insertTwoVertices, intersect, join, main, makeConvex, makeConvex, move, move, moveVertex, orderPoints, removeSelfIntersections, selfIntersects, set, setTheta, setVertex, setVertices, setVertices, setVertices, setVertices, simplify, toSpline, toSpline, toStringMethods inherited from class com.xinapse.multisliceimage.roi.ROI
andNot, andNot, andNot, clearDeletionHistory, dilate, exclusiveOr, exclusiveOr, getAnnotation, getBoundingRectangle, getBoundingRectangle, getCentroid, getClasses, getColor, getDesignTextFontSize, getDisplayedBounds2D, getDisplayedBounds2D, getDisplayedRoiArea, getFeret, getGroupUid, getGroupUid, getHandles, getHandleUnderPoint, getImageSource, getPixelValue, getROIs, getROIs, getROIs, getROIs, getROIs, getSlice, getState, getStats, getStats, getStats, getTextColor, getUserColour, group, intersect, intersect, intersects, isDeleted, isEditable, isGroup, isReloaded, isSameAnnotation, isSameColour, isSelected, join, logicalUnion, markDeleted, mmPosToPix, moveROIs, pixPosToMm, printStats, selectDeselect, setAnnotation, setCreationHistory, setGroupUid, setSlice, setState, setTextColor, setTextSize, setUserColour, ungroup, ungroup, union, union, write, writeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.xinapse.multisliceimage.roi.StretchableROI
getDisplayedBounds2D
-
Constructor Details
-
IrregularROIInProgress
Creates a newIrregularROIInProgresswith 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.userColour- the colour of this ROI. A value of 0 indicates that the ROI will be drawn with the default colour for normal ROIs.- Throws:
ROIException- if theROIcannot be created as specified.
-
-
Method Details
-
appendVertex
Appends a vertex to the end of this IrregularROIInProgress.- Parameters:
pt- the location of the vertex to append.
-
appendVertex
public void appendVertex(double x, double y) Appends a vertex to the end of this IrregularROIInProgress.- Parameters:
x- the x-location of the vertex to append.y- the y-location of the vertex to append.
-
insertVertex
Inserts a vertex at the beginning of this IrregularROIInProgress.- Parameters:
pt- the location of the vertex to append.
-
insertVertex
public void insertVertex(double x, double y) Inserts a vertex at the beginning of this IrregularROIInProgress.- Parameters:
x- the x-location of the vertex to insert.y- the y-location of the vertex to insert.
-
removeLastVertex
public void removeLastVertex()Removes the last vertex from this IrregularROIInProgress. -
removeFirstVertex
public void removeFirstVertex()Removes the first vertex from this IrregularROIInProgress. -
draw
public boolean draw(Graphics g, Rectangle visibleRectangle, int imageDrawCols, int imageDrawRows, int xOffset, int yOffset, int nCols, int nRows, float pixelXSize, float pixelYSize, boolean drawAnnotation) Description copied from class:ROIDraws thisROIif it needs to be be drawn on screen.- Overrides:
drawin classIrregularROI- 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 thisROIis defined.nRows- the number of rows in the image on which thisROIis defined.pixelXSize- pixel width for the image on which thisROIis defined.pixelYSize- pixel height for the image on which thisROIis defined.drawAnnotation- a flag to indicate whether annotation should be drawn.- Returns:
trueif theROIis visible and been drawn on screen;falseotherwise.
-
clone
Description copied from class:ROIReturns a clone of thisROI. The copy will be identical in shape and annotation as the original ROI, and with a history identical to the clonedROI.- Overrides:
clonein classIrregularROI- Returns:
- a clone of this
ROI, cast to anObject.
-