Class VOIProtractor

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<WildMagic.LibFoundation.Mathematics.Vector3f>, java.util.Collection<WildMagic.LibFoundation.Mathematics.Vector3f>, java.util.List<WildMagic.LibFoundation.Mathematics.Vector3f>, java.util.RandomAccess

    public class VOIProtractor
    extends VOIBase
    This class is fundamental to the VOI class in which points are stored that describe a Protractor VOI. The points are 3D and are floats (see Vector3f). It extends VOIBase and therefore it extends Vector. Point 1 is the common vertex of the 2 intersecting lines, point 0 is the outer point of the initially shorter line, and point 2 is the outer point of the initially longer line. This kind of VOI is used to measure angles.
    See Also:
    VOIBase, VOILine, VOI, VOIPoint, Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • allSlices

        private boolean allSlices
        Set to true, displays this protractor object for any z-value.
    • Constructor Detail

      • VOIProtractor

        public VOIProtractor()
        Default constructor.
      • VOIProtractor

        public VOIProtractor​(java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> kPositions)
        Constructor, sets the position of the protractor.
        Parameters:
        kPositions -
      • VOIProtractor

        public VOIProtractor​(VOIProtractor kVOI)
        Copy constructor.
        Parameters:
        kVOI -
    • Method Detail

      • getAllSlices

        public boolean getAllSlices()
        Returns true if this protractor is displayed independent of z-value.
        Returns:
      • getAngleString

        public java.lang.String getAngleString​(double fAngle)
        Returns the angle of the protractor as a string. Based on the input image resolutions.
        Parameters:
        afResolutions -
        Returns:
      • getAngleString

        public java.lang.String getAngleString​(float[] afResolutions)
        Returns the angle of the protractor as a string. Based on the input image resolutions.
        Parameters:
        afResolutions -
        Returns:
      • getTheta

        public double getTheta​(float[] afResolutions)
        Gets the angle between the two lines of the protractor.
        Returns:
        theta
      • getLengthPtToPt

        public double getLengthPtToPt​(float[] resolutions)
        Returns the total length of this contour, based on the input resolutions.
        Overrides:
        getLengthPtToPt in class VOIBase
        Parameters:
        resolutions - .
        Returns:
        total length of this contour, scaled by the resolutions.
      • setAllSlices

        public void setAllSlices​(boolean bValue)
        Sets the all-slice flag. Displays this protractor independent of z-value. Used in the TriPlanar View for rotating images.
        Parameters:
        bValue -
      • translate

        public void translate​(float xT,
                              float yT)
        Translates 3 points of the protractor VOI.
        Parameters:
        xT - amount to translate in the x direction
        yT - amount to translate in the y direction