Class VOIPoint

java.lang.Object
java.util.AbstractCollection<WildMagic.LibFoundation.Mathematics.Vector3f>
java.util.AbstractList<WildMagic.LibFoundation.Mathematics.Vector3f>
java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f>
gov.nih.mipav.model.structures.VOIBase
gov.nih.mipav.model.structures.VOIPoint
All Implemented Interfaces:
Serializable, Cloneable, Iterable<WildMagic.LibFoundation.Mathematics.Vector3f>, Collection<WildMagic.LibFoundation.Mathematics.Vector3f>, List<WildMagic.LibFoundation.Mathematics.Vector3f>, RandomAccess, SequencedCollection<WildMagic.LibFoundation.Mathematics.Vector3f>

public class VOIPoint extends VOIBase
Class for a point VOI, a simple extension of CurveBase.
Version:
1.0 Feb. 10, 1999
Author:
Matthew J. McAuliffe
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • firstSlicePoint

      private boolean firstSlicePoint
      True if this point is the 1st point in a slice/frame of Polyline_Slice
    • totalDistanceString

      private String totalDistanceString
      Distance is calculated and passed in by VOI for polyline_slices
    • distanceString

      private String distanceString
      Distance between segments shown only for active point in polyline_slices
    • isActivePoint

      private boolean isActivePoint
      True only for the active point of a polyline_slice structure (display's coordinates)
    • m_iID

      private int m_iID
      ID if this VOIPoint is contained in a PolyLineSlice object.
    • m_kRotation

      private TransMatrix m_kRotation
    • m_kRotationInverse

      private TransMatrix m_kRotationInverse
  • Constructor Details

    • VOIPoint

      public VOIPoint()
      Default constructor
    • VOIPoint

      public VOIPoint(int iType)
      Sets the type. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.
      Parameters:
      iType -
    • VOIPoint

      public VOIPoint(int iType, Vector<WildMagic.LibFoundation.Mathematics.Vector3f> kPosition)
      Sets the type and position. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.
      Parameters:
      iType -
      kPosition -
    • VOIPoint

      public VOIPoint(int iType, WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
      Sets the type and position. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.
      Parameters:
      iType -
      kPosition -
    • VOIPoint

      public VOIPoint(VOIPoint kVOI)
      Copy Constructor.
      Parameters:
      kVOI -
  • Method Details

    • clone

      public VOIPoint clone()
      Specified by:
      clone in class VOIBase
    • contains

      public boolean contains(float iX, float iY)
      Returns true if the input iX, iY is contained within this contour. The z-value of the contour is ignored.
      Overrides:
      contains in class VOIBase
      Parameters:
      iX -
      iY -
      Returns:
    • contains

      public boolean contains(float iX, float iY, float iZ)
      Returns true if the input iX,iY,iZ is contained within this contour.
      Overrides:
      contains in class VOIBase
      Parameters:
      iX -
      iY -
      iZ -
      Returns:
    • distanceString

      public String distanceString()
      Returns the distance string.
      Returns:
    • exportPoint

      public WildMagic.LibFoundation.Mathematics.Vector3f exportPoint()
      Method to access point VOI coordinate
      Returns:
      3d point
    • getCoordinates

      public void getCoordinates(float[] coord)
      This method gets the coordinates of the point
      Parameters:
      coord - a float array, in which the first element is the x coordinate and the second element is the y coordinate
    • getGeometricCenter

      public WildMagic.LibFoundation.Mathematics.Vector3f getGeometricCenter()
      Gets the geometric center of the contour.
      Overrides:
      getGeometricCenter in class VOIBase
      Returns:
      returns the geometric center
    • getID

      public int getID()
      Returns ID in PolyLineSlice object.
      Returns:
    • getPosition

      public WildMagic.LibFoundation.Mathematics.Vector3f getPosition()
    • isActivePoint

      public boolean isActivePoint()
      True if this is the active point in the PolyLineSlice object.
      Returns:
    • isFirstSlicePoint

      public boolean isFirstSlicePoint()
      Returns true if this is the first point in the PolyLineSlice object.
      Returns:
    • locateVOIPoint

      public void locateVOIPoint(int xP, int yP, int zP, int xDim, int yDim, int zDim)
      Sets the point at (xP,yP,zP). Bounds checking is performed
      Parameters:
      xP - x location
      yP - y location
      zP - z location
      xDim - x dimension maximum
      yDim - y dimension maximum
      zDim - z dimension maximum
    • moveVOIPoint

      public void moveVOIPoint(int xM, int yM, int zM, int xDim, int yDim, int zDim)
      Moves the point to the new location. Bounds checking is performed
      Parameters:
      xM - amount in pixels to move the line in the x direction
      yM - amount in pixels to move the line in the y direction
      zM - amount in pixels to move the line in the z direction
      xDim - x dimension maximum
      yDim - y dimension maximum
      zDim - z dimension maximum
    • nearPoint

      public boolean nearPoint(int iX, int iY, int iZ)
      Returns true if the input position is near one of the points on this contour.
      Parameters:
      iX - input x-position.
      iY - input y-position.
      iZ - input z-position
      Returns:
      true if the input position is near one of the contour points.
    • setFirstPoint

      public void setFirstPoint(boolean isFirst, boolean isActPt, String totalDistance, String dist)
      Parameters for drawing each point in the PolyLineSlice object.
      Parameters:
      isFirst - boolean is this the very first point of the polyline slice structure
      isActPt - boolean is this the active point (for drawing as green and showing segment length)
      totalDistance - String the total distance of the polyline slice
      dist - String the segment (active point to next point) distance of the polyline slice
    • setFirstPoint

      public void setFirstPoint(boolean isFirst, boolean isActPt, String totalDistance, String dist, int iID)
      Parameters for drawing each point in the PolyLineSlice object.
      Parameters:
      isFirst - boolean is this the very first point of the polyline slice structure
      isActPt - boolean is this the active point (for drawing as green and showing segment length)
      totalDistance - String the total distance of the polyline slice
      dist - String the segment (active point to next point) distance of the polyline slice
    • setMatrix

      public void setMatrix(TransMatrix kMat)
    • setPlane

      public void setPlane(int iPlane)
      Overrides:
      setPlane in class VOIBase
    • totalDistanceString

      public String totalDistanceString()
      Returns the totalDistance string.
      Returns: