com.xinapse.multisliceimage.roi
Class LineROI

java.lang.Object
  extended by com.xinapse.multisliceimage.roi.ROI
      extended by com.xinapse.multisliceimage.roi.LineROI
All Implemented Interfaces:
LinearROI, RegularROI, RotatableROI, java.lang.Cloneable

public class LineROI
extends ROI
implements java.lang.Cloneable, LinearROI, RotatableROI, RegularROI

A Class representing a straight line on an image.


Field Summary
static java.lang.String X1TOKEN
          The token written to ROI output files to represent the x-coordinate of the first end of the line.
static java.lang.String X2TOKEN
          The token written to ROI output files to represent the x-coordinate of the second end of the line.
static java.lang.String Y1TOKEN
          The token written to ROI output files to represent the y-coordinate of the first end of the line.
static java.lang.String Y2TOKEN
          The token written to ROI output files to represent the y-coordinate of the second end of the line.
 
Fields inherited from class com.xinapse.multisliceimage.roi.ROI
handles, PREFERENCES_NODE_NAME, XTOKEN, YTOKEN
 
Constructor Summary
LineROI(double x1, double y1, double x2, double y2)
          Creates a new LineROI with the coordinates of the points forming the line in mm coordinates.
LineROI(double x1, double y1, double x2, double y2, byte userColour, ROIState state)
          Creates a new LineROI with the coordinates of the points forming the line in mm coordinates.
LineROI(double x1, double y1, double x2, double y2, ROIState state)
          Creates a new LineROI with the coordinates of the points forming the line in mm coordinates.
 
Method Summary
 java.util.List<ROI> add(ROI roi)
          Morphologically adds an ROI to this ROI to create a new java.util.List<ROI> of ROIs that is the result of adding the shapes of the two ROIs.
 LineROI clone()
          Returns a clone of this ROI.
 boolean contains(ROI roi)
          Indicates whether this LineROI contains another ROI entirely within its borders.
 java.util.List<ROI> dilate(double radius, java.util.concurrent.atomic.AtomicInteger opCounter, CancellableThread.Flag cancelFlag)
          Dilates this ROI by the specified distance.
 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)
          LineROIs are a special case, since we can't use the Bounding Rectangle to decide whether a Line is on screen, since the line may be vertical or horizontal, and therefore have an empty boundng rectangle.
 void drawInOrthoView(java.awt.Image orthoView, javax.vecmath.Point3f orthoViewPosition, javax.media.j3d.Transform3D imageToViewTx, int nCols, int nRows, int nSlices, float pixelXSize, float pixelYSize, boolean filled)
          Draws this ROI on top of an orthogonal view of an image.
 boolean equals(java.lang.Object o)
          Indicates whether some Object is equal to this ROI.
 java.util.List<ROI> exclusiveOr(ROI roi)
          Performs an exclusive OR operation on the shape of this ROI with another ROI.
 void flipHorizontal(java.awt.geom.Point2D flipPoint)
          Flip this ROI horizontally about a given location.
 void flipVertical(java.awt.geom.Point2D flipPoint)
          Flip this ROI vertically about a given location.
 java.awt.geom.Rectangle2D getBoundingRectangle(int nCols, int nRows, float pixelXSize, float pixelYSize)
          Returns a high-precision rectangle (in pixel coordinates) that just bounds this ROI.
static javax.swing.Icon getButtonIcon()
          Returns an Icon that can be used for a button to create this type of ROI.
 java.awt.geom.Point2D getCentre()
          Gets the centre (about which rotation will occur) of this RotatableROI in mm.
 ROI getCopy()
          Returns a copy of this ROI.
static ROICreateDialog getCreateDialog(CanAddROIToFrame listener)
          Returns a JDialog that can be used to create Line ROIs.
static InteractionType getCreateInteractionType()
          Returns the type of interaction needed to create a LineROI.
 java.lang.String getDescription()
          Return a description of this type of ROI.
 Feret getFeret()
          Returns the minimum and maximum Feret's diameter for this ROI, in mm.
static ROI getInstance(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2, int nCols, int nRows, float pixelXSize, float pixelYSize, byte userColour, ROIState state)
           
 java.awt.geom.Point2D[] getIntensityProfile(java.lang.Object pix, PixelDataType dataType, int nCols, int nRows, int offset, float pixelXSize, float pixelYSize, ComplexMode complexMode)
          Returns an array of Point2D representing the pixel intensities along this LinearROI.
 double getIntersectionLength(java.awt.geom.Rectangle2D rectangle, int nCols, int nRows, float pixelXSize, float pixelYSize)
          Calculates the length of the line segment where this LineROI intersects the given Rectangle argument.
 double getLength()
          Returns the length of this ROI in mm.
 double getLengthPix(float pixelXSize, float pixelYSize)
          Returns the length of this ROI in image pixels.
 java.awt.geom.Line2D getLine()
          Returns the line forming this LineROI in mm coordinates.
static java.lang.String getName()
          Returns a descriptive name for this type of ROI.
 java.awt.geom.Point2D getOppositeEnd(EndHandle endHandle)
          Returns the location of the end that is at the other end to the specified handle.
 double getPerimeter()
          Returns the perimeter length of this ROI.
 double getSquareArea()
          Returns the area of this regular ROI in square mm.
 ROIStats getStats(java.lang.Object pix, PixelDataType dataType, int nCols, int nRows, int offset, float pixelXSize, float pixelYSize, MaskAction maskAction, MaskMode maskMode, double maskValue, java.io.PrintStream intensityOutputStream, boolean isUnitsMM, ComplexMode complexMode)
          Returns statistics about this ROI, and (optionally) performs a masking operation.
 double getTheta()
          Returns the current rotation angle for this RotatableROI.
 double getX1()
          Returns the x-coordinate of the first end of the line.
 double getX2()
          Returns the x-coordinate of the second end of the line.
 double getY1()
          Returns the y-coordinate of the first end of the line.
 double getY2()
          Returns the y-coordinate of the second end of the line.
 int hashCode()
          Returns a hash code value for this LineROI.
 java.util.List<ROI> intersect(ROI roi)
          Performs an intersection operation on the shape of this ROI with another ROI.
 boolean intersects(ROI roi)
          Tests whether this ROI intersects another ROI.
 void move(double dx, double dy)
          Move this ROI by specified distances (in mm) in the x and y directions.
 void move(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
          Moves this LineROI so that the ends are at the new specified locations.
 boolean selectDeselect(java.awt.Point point, boolean editMode, boolean showDeleted, int nAlreadySelected)
          Selects or deselects an ROI after a user click at the point.
 void set(ROI roi)
          Sets the shape of this ROI to the shape of the supplied argument ROI.
 void setTheta(double theta)
          Sets the rotation angle for this RotatableROI.
 java.util.List<ROI> subtract(ROI roi)
          Morphologically subtracts an ROI from this ROI to create a new java.util.List<ROI> of ROIs that is the result of subtracting the shapes of the two ROIs.
 java.lang.String toString()
          Returns a String describing this ROI.
 
Methods inherited from class com.xinapse.multisliceimage.roi.ROI
add, addMorphological, clearDeletionHistory, clearStats, dilate, getAnnotation, getBoundingRectangle, getCachedStatistics, getClasses, getColor, getDisplayedBounds2D, getDisplayedBounds2D, getDisplayedRoiArea, getFeret, getHandles, getHandleUnderPoint, getImageSource, getPixelValue, getROIs, getROIs, getROIs, getSlice, getState, getStats, getStats, getTextColor, getTextFontSize, getUserColour, isDeleted, isEditable, isReloaded, isSelected, join, main, markDeleted, mmPosToPix, moveROIs, pixPosToMm, printStats, setAnnotation, setCreationHistory, setSlice, setState, setTextColor, setTextSize, setUserColour, subtract, write, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

X1TOKEN

public static final java.lang.String X1TOKEN
The token written to ROI output files to represent the x-coordinate of the first end of the line.

See Also:
Constant Field Values

Y1TOKEN

public static final java.lang.String Y1TOKEN
The token written to ROI output files to represent the y-coordinate of the first end of the line.

See Also:
Constant Field Values

X2TOKEN

public static final java.lang.String X2TOKEN
The token written to ROI output files to represent the x-coordinate of the second end of the line.

See Also:
Constant Field Values

Y2TOKEN

public static final java.lang.String Y2TOKEN
The token written to ROI output files to represent the y-coordinate of the second end of the line.

See Also:
Constant Field Values
Constructor Detail

LineROI

public LineROI(double x1,
               double y1,
               double x2,
               double y2)
        throws ROIException
Creates a new LineROI with the coordinates of the points forming the line in mm coordinates. The ROI state will be ROIState.NORMAL.

Parameters:
x1 - the x-location of the first end of the line.
y1 - the y-location of the first end of the line.
x2 - the x-location of the second end of the line.
y2 - the y-location of the second end of the line.
Throws:
ROIException - if the line length is zero.

LineROI

public LineROI(double x1,
               double y1,
               double x2,
               double y2,
               ROIState state)
        throws ROIException
Creates a new LineROI with the coordinates of the points forming the line in mm coordinates.

Parameters:
x1 - the x-location of the first end of the line.
y1 - the y-location of the first end of the line.
x2 - the x-location of the second end of the line.
y2 - the y-location of the second end of the line.
state - the selection state of the LineROI.
Throws:
ROIException - if the line length is zero.

LineROI

public LineROI(double x1,
               double y1,
               double x2,
               double y2,
               byte userColour,
               ROIState state)
        throws ROIException
Creates a new LineROI with the coordinates of the points forming the line in mm coordinates.

Parameters:
x1 - the x-location of the first end of the line.
y1 - the y-location of the first end of the line.
x2 - the x-location of the second end of the line.
y2 - the y-location of the second end of the line.
state - the selection state of the LineROI.
Throws:
ROIException - if the line length is zero.
Method Detail

getLine

public java.awt.geom.Line2D getLine()
Returns the line forming this LineROI in mm coordinates.

Returns:
the line forming this LineROI in mm coordinates.

getLength

public double getLength()
Description copied from interface: LinearROI
Returns the length of this ROI in mm.

Specified by:
getLength in interface LinearROI
Returns:
the length of this ROI in mm.

getLengthPix

public double getLengthPix(float pixelXSize,
                           float pixelYSize)
Description copied from interface: LinearROI
Returns the length of this ROI in image pixels.

Specified by:
getLengthPix in interface LinearROI
Parameters:
pixelXSize - the size of image pixels in the horizontal direction.
pixelYSize - the size of image pixels in the vertical direction.
Returns:
the length of this ROI in image pixels.

getIntensityProfile

public java.awt.geom.Point2D[] getIntensityProfile(java.lang.Object pix,
                                                   PixelDataType dataType,
                                                   int nCols,
                                                   int nRows,
                                                   int offset,
                                                   float pixelXSize,
                                                   float pixelYSize,
                                                   ComplexMode complexMode)
Description copied from interface: LinearROI
Returns an array of Point2D representing the pixel intensities along this LinearROI. The x-value of a point is a position along the LinearROI, and the y-value is the intensity. The first and last points will be at the ends of the LinearROI, but the location of the points in between is not prescribed by this interface.

Specified by:
getIntensityProfile in interface LinearROI
Parameters:
pix - the array of pixel intensities for in which this LinearROI is positioned.
dataType - the PixelDataType of the array of pixel intensities.
nCols - the number of columns in the slice.
nRows - the number of rows in the slice.
offset - an offset (in pixels) into the pixel value array for the starting pixel of the slice on which this ROI is defined.
pixelXSize - the size of image pixels in the horizontal direction.
pixelYSize - the size of image pixels in the vertical direction.
complexMode - the calculation mode for Complex images. The intensity profile returned will correspond to the mode: the real part, imaginary part, magnitude or phase.
Returns:
an array of Point2D representing the pixel intensities along this LinearROI.

getX1

public double getX1()
Returns the x-coordinate of the first end of the line.

Returns:
the x-coordinate of the first end of the line.

getY1

public double getY1()
Returns the y-coordinate of the first end of the line.

Returns:
the y-coordinate of the first end of the line.

getX2

public double getX2()
Returns the x-coordinate of the second end of the line.

Returns:
the x-coordinate of the second end of the line.

getY2

public double getY2()
Returns the y-coordinate of the second end of the line.

Returns:
the y-coordinate of the second end of the line.

getOppositeEnd

public java.awt.geom.Point2D getOppositeEnd(EndHandle endHandle)
Returns the location of the end that is at the other end to the specified handle.

Parameters:
endHandle - the Handle for the first end.
Returns:
the location of the end opposite to this handle.

getInstance

public static ROI getInstance(java.awt.geom.Point2D p1,
                              java.awt.geom.Point2D p2,
                              int nCols,
                              int nRows,
                              float pixelXSize,
                              float pixelYSize,
                              byte userColour,
                              ROIState state)
                       throws ROIException
Throws:
ROIException

getTheta

public double getTheta()
Description copied from interface: RotatableROI
Returns the current rotation angle for this RotatableROI.

Specified by:
getTheta in interface RotatableROI
Returns:
theta the current rotation angle.

setTheta

public void setTheta(double theta)
Description copied from interface: RotatableROI
Sets the rotation angle for this RotatableROI.

Specified by:
setTheta in interface RotatableROI
Parameters:
theta - the rotation angle.

getCentre

public java.awt.geom.Point2D getCentre()
Description copied from interface: RotatableROI
Gets the centre (about which rotation will occur) of this RotatableROI in mm.

Specified by:
getCentre in interface RotatableROI
Returns:
the centre of this ROI, about which rotation will occur.

getCreateInteractionType

public static InteractionType getCreateInteractionType()
Returns the type of interaction needed to create a LineROI.

Returns:
type of interaction needed to create a LineROI - InteractionType.CLICK_DRAG.

getSquareArea

public double getSquareArea()
Description copied from interface: RegularROI
Returns the area of this regular ROI in square mm.

Specified by:
getSquareArea in interface RegularROI
Returns:
zero.

move

public void move(java.awt.geom.Point2D p1,
                 java.awt.geom.Point2D p2)
Moves this LineROI so that the ends are at the new specified locations.

Parameters:
p1 - the new location of the first end of the line.
p2 - the new location of the second end of the line.

move

public void move(double dx,
                 double dy)
Description copied from class: ROI
Move this ROI by specified distances (in mm) in the x and y directions.

Specified by:
move in class ROI
Parameters:
dx - the distance to move in the x-direction.
dy - the distance to move in the y-direction.

flipVertical

public void flipVertical(java.awt.geom.Point2D flipPoint)
Description copied from class: ROI
Flip this ROI vertically about a given location.

Specified by:
flipVertical in class ROI
Parameters:
flipPoint - the point about which the ROI will be flipped.

flipHorizontal

public void flipHorizontal(java.awt.geom.Point2D flipPoint)
Description copied from class: ROI
Flip this ROI horizontally about a given location.

Specified by:
flipHorizontal in class ROI
Parameters:
flipPoint - the point about which the ROI will be flipped.

add

public java.util.List<ROI> add(ROI roi)
Description copied from class: ROI
Morphologically adds an ROI to this ROI to create a new java.util.List<ROI> of ROIs that is the result of adding the shapes of the two ROIs.

Overrides:
add in class ROI
Parameters:
roi - the ROI to add.
Returns:
a List of ROIs that results from the addition of the shapes.

subtract

public java.util.List<ROI> subtract(ROI roi)
Description copied from class: ROI
Morphologically subtracts an ROI from this ROI to create a new java.util.List<ROI> of ROIs that is the result of subtracting the shapes of the two ROIs.

Overrides:
subtract in class ROI
Parameters:
roi - the ROI to add.
Returns:
a List of ROIs that results from the addition of the shapes.

intersect

public java.util.List<ROI> intersect(ROI roi)
Description copied from class: ROI
Performs an intersection operation on the shape of this ROI with another ROI.

Overrides:
intersect in class ROI
Parameters:
roi - the ROI with which to perform the intersection operation.
Returns:
a List of ROIs that result from the operation.

exclusiveOr

public java.util.List<ROI> exclusiveOr(ROI roi)
Description copied from class: ROI
Performs an exclusive OR operation on the shape of this ROI with another ROI.

Overrides:
exclusiveOr in class ROI
Parameters:
roi - the ROI with which to perform the XOR operation.
Returns:
a List of ROIs that result from the operation.

intersects

public boolean intersects(ROI roi)
Description copied from class: ROI
Tests whether this ROI intersects another ROI.

Note that the area of intersection may be zero if one or other of the ROIs (or both) contains no area.

Specified by:
intersects in class ROI
Parameters:
roi - the ROI to be tested for intersection.
Returns:
true in the two ROIs intersect; false otherwise.

dilate

public java.util.List<ROI> dilate(double radius,
                                  java.util.concurrent.atomic.AtomicInteger opCounter,
                                  CancellableThread.Flag cancelFlag)
Description copied from class: ROI
Dilates this ROI by the specified distance.

Parameters:
radius - the radius of dilation.
opCounter - a counter for the number of sub-operations that was performed to execute the dilation operations.
cancelFlag - a flag that, if set externally, cancels the operation.
Returns:
a List of ROIs that result from the operation.

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)
LineROIs are a special case, since we can't use the Bounding Rectangle to decide whether a Line is on screen, since the line may be vertical or horizontal, and therefore have an empty boundng rectangle.

Overrides:
draw in class ROI
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.

drawInOrthoView

public void drawInOrthoView(java.awt.Image orthoView,
                            javax.vecmath.Point3f orthoViewPosition,
                            javax.media.j3d.Transform3D imageToViewTx,
                            int nCols,
                            int nRows,
                            int nSlices,
                            float pixelXSize,
                            float pixelYSize,
                            boolean filled)
Description copied from class: ROI
Draws this ROI on top of an orthogonal view of an image.

Specified by:
drawInOrthoView in class ROI
Parameters:
orthoView - the java.awt.Image into which the ROI is to be drawn.
orthoViewPosition - the coordinates (col, row, slice position) of the orthogonal view in the original image.
imageToViewTx - the Transform3D that maps original image pixel coordinates to pixel coordinates in the orthogonal view.
nCols - the number of columns in the original image.
nRows - the number of rows in the original image.
nSlices - the number of slices in the original image.
pixelXSize - the pixel width in the original image.
pixelYSize - the pixel height in the original image.
filled - whether the ROI should be drawn filled (effective only for ROIs that enclose an area).

selectDeselect

public boolean selectDeselect(java.awt.Point point,
                              boolean editMode,
                              boolean showDeleted,
                              int nAlreadySelected)
Description copied from class: ROI
Selects or deselects an ROI after a user click at the point.

Overrides:
selectDeselect in class ROI
Parameters:
point - the Point at which the user has clicked.
editMode - true if the tool working with ROIs is in edit mode; false if it is in view mode.
showDeleted - true if the tool working with ROIs is set to show deleted ROIs; false if it is not.
nAlreadySelected - the number of ROIs already selected. This determines the exact selection/deselection behaviour.
Returns:
true if the selection was changed.

getStats

public ROIStats getStats(java.lang.Object pix,
                         PixelDataType dataType,
                         int nCols,
                         int nRows,
                         int offset,
                         float pixelXSize,
                         float pixelYSize,
                         MaskAction maskAction,
                         MaskMode maskMode,
                         double maskValue,
                         java.io.PrintStream intensityOutputStream,
                         boolean isUnitsMM,
                         ComplexMode complexMode)
Description copied from class: ROI
Returns statistics about this ROI, and (optionally) performs a masking operation.

Overrides:
getStats in class ROI
Parameters:
pix - the whole image pixel value array. If pix is null, then the intensity-related stats will all be set to zero.
dataType - the type of pixels.
nCols - the number of columns in the slice.
nRows - the number of rows in the slice.
offset - an offset (in pixels) into the pixel value array for the starting pixel of the slice on which this ROI is defined.
pixelXSize - the size of image pixels in the horizontal direction.
pixelYSize - the size of image pixels in the vertical direction.
maskAction - one of:
  • MaskAction.NONE for no masking;
  • MaskAction.MASK_INSIDE to set pixel values to maskValue inside the shape; or
  • MaskAction.MASK_OUTSIDE to set the pixel values to maskValue outside the shape.
  • MaskAction.MASK_INSIDE_SOFT to perform soft masking inside the shape;
  • MaskAction.MASK_OUTSIDE_SOFT to perform soft masking outside the shape.
maskMode - how much of a pixel must be inside ROIs for the pixel to be part of the mask.
maskValue - the pixel value to set outside/inside the shape when performing masking ops.
intensityOutputStream - if non-null, pixel intensities within the ROI will be printed to this PrintStream.
isUnitsMM - true if the (x,y) coordinates of the pixel intensities are to be written in mm, false if the coordinates are to be writtn in pixel units.
complexMode - the calculation mode for PixelDataType.Complex images. The statistics returned will correspond to the mode: the real part, imaginary part, magnitude or phase.
Returns:
statistics about the ROI.

getIntersectionLength

public double getIntersectionLength(java.awt.geom.Rectangle2D rectangle,
                                    int nCols,
                                    int nRows,
                                    float pixelXSize,
                                    float pixelYSize)
Calculates the length of the line segment where this LineROI intersects the given Rectangle argument. The Rectangle is in image pixel coordinates.

Parameters:
rectangle - the Rectangle2d for which to find the intersection line length.
Returns:
the length of the intersection line.

getBoundingRectangle

public java.awt.geom.Rectangle2D getBoundingRectangle(int nCols,
                                                      int nRows,
                                                      float pixelXSize,
                                                      float pixelYSize)
Returns a high-precision rectangle (in pixel coordinates) that just bounds this ROI.

Overrides:
getBoundingRectangle in class ROI
Parameters:
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.
Returns:
a Rectangle2D that just bounds this ROI.

getFeret

public Feret getFeret()
Description copied from class: ROI
Returns the minimum and maximum Feret's diameter for this ROI, in mm.

Specified by:
getFeret in class ROI
Returns:
the minimum and maximum Feret's diameter (in mm) as a Feret object.

getPerimeter

public double getPerimeter()
Returns the perimeter length of this ROI. The perimeter of a LineROI is defined as twice its length.

Specified by:
getPerimeter in class ROI
Returns:
the perimeter length of this ROI.

getCreateDialog

public static ROICreateDialog getCreateDialog(CanAddROIToFrame listener)
Returns a JDialog that can be used to create Line ROIs.

Parameters:
listener - the CanAddROIToFrame to which the ROI will be added when the Add button of the Dialog is clicked.

contains

public boolean contains(ROI roi)
Indicates whether this LineROI contains another ROI entirely within its borders. A LineROI never contains another ROI, since it has zero area.

Specified by:
contains in class ROI
Parameters:
roi - the ROI to be tested for containment within this ROI.
Returns:
false always.

equals

public boolean equals(java.lang.Object o)
Description copied from class: ROI
Indicates whether some Object is equal to this ROI. To be equal, the Object must be an ROI of the same type, and of the same shape and location as this ROI.

Specified by:
equals in class ROI
Parameters:
o - the Object to be tested for equality to this ROI.
Returns:
true if the supplied Object is an ROI of the same type, shape and location as this ROI; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for this LineROI.

Overrides:
hashCode in class ROI
Returns:
a hash code value for this LineROI.

set

public void set(ROI roi)
         throws java.lang.ClassCastException
Description copied from class: ROI
Sets the shape of this ROI to the shape of the supplied argument ROI.

Specified by:
set in class ROI
Throws:
java.lang.ClassCastException - of the sub class of the argument ROI is not the same as this ROI.

getCopy

public ROI getCopy()
Description copied from class: ROI
Returns a copy of this ROI. The copy will be identical in shape and annotation as the original ROI, but with a history of that of a newly-created ROI.

Specified by:
getCopy in class ROI
Returns:
a copy of this ROI, cast to an Object.

getDescription

public java.lang.String getDescription()
Description copied from class: ROI
Return a description of this type of ROI.

Specified by:
getDescription in class ROI
Returns:
a String describing the type of this ROI.

clone

public LineROI 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 ROI
Returns:
a clone of this ROI, cast to an Object.

getName

public static java.lang.String getName()
Returns a descriptive name for this type of ROI.

Returns:
a String describing this type of ROI.

getButtonIcon

public static javax.swing.Icon getButtonIcon()
Returns an Icon that can be used for a button to create this type of ROI.

Returns:
an Icon that can be used to represent this type of ROI.

toString

public java.lang.String toString()
Description copied from class: ROI
Returns a String describing this ROI.

Specified by:
toString in class ROI
Returns:
a java.lang.String describing this ROI.


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.