Interface EditableOutlineROI

All Known Implementing Classes:
ContourROI, CurvedLineROI, HollowROI, IrregularROI, IrregularROIInProgress, OpenSplineROI, SplineROI

public interface EditableOutlineROI
An interface that ROIs implement if they have an editable outline shape with handles at each vertex.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Delete a point on the outline of this EditableOutlineROI that is under a handle.
    Returns the visible Handle that is immediately after the specified handle, in the order in which they were placed around the ROI.
    Returns the visible Handle that is immediately before the specified handle, in the order in which they were placed around the ROI.
    Returns an array of VertexHandles.
    boolean
    Insert two points into the outline of this EditableOutlineROI: one just before the one that is under a handle, and one just after.
    void
    moveVertex(Point2D newPos, Handle handle, int nCols, int nRows, float pixelXSize, float pixelYSize, boolean pixelSnap)
    Move a point on the outline of this EditableOutlineROI to a new position.
  • Method Details

    • getVertexHandles

      Handle[] getVertexHandles()
      Returns an array of VertexHandles.
      Returns:
      an array of VertexHandles, or null if this ROI is not having its outline edited.
    • getFollowingVisibleHandle

      Handle getFollowingVisibleHandle(Handle handle)
      Returns the visible Handle that is immediately after the specified handle, in the order in which they were placed around the ROI.
      Parameters:
      handle - the handle for which to get the following handle.
      Returns:
      the following visible Handle, or null if there is no following visible handle.
    • getPrecedingVisibleHandle

      Handle getPrecedingVisibleHandle(Handle handle)
      Returns the visible Handle that is immediately before the specified handle, in the order in which they were placed around the ROI.
      Parameters:
      handle - the handle for which to get the preceding handle.
      Returns:
      the preceding visible Handle, or null if there is no preceding visible handle.
    • moveVertex

      void moveVertex(Point2D newPos, Handle handle, int nCols, int nRows, float pixelXSize, float pixelYSize, boolean pixelSnap) throws ROIException
      Move a point on the outline of this EditableOutlineROI to a new position.
      Parameters:
      newPos - the new location of the vertex in real-space coordinates.
      handle - the Handle that the user has grabbed, used to identify the vertex to be moved.
      nCols - the number of image columns.
      nRows - the number of image rows.
      pixelXSize - the pixel width in mm.
      pixelYSize - the pixel height in mm.
      pixelSnap - whether pixel snap is turned on.
      Throws:
      ROIException - if the vertex cannot be moved to the requested position.
    • insertTwoVertices

      boolean insertTwoVertices(Handle handle)
      Insert two points into the outline of this EditableOutlineROI: one just before the one that is under a handle, and one just after.
      Parameters:
      handle - the Handle that the user has grabbed, used to identify the vertex around which the new vertices are to be placed.
      Returns:
      true if a point is successfully inserted.
    • deleteVertex

      boolean deleteVertex(Handle handle) throws ROIException
      Delete a point on the outline of this EditableOutlineROI that is under a handle.
      Parameters:
      handle - the Handle that the user has grabbed, used to identify the vertex to be deleted.
      Returns:
      true if a point is successfully deleted.
      Throws:
      ROIException - if the point cannot be deleted from this ROI.