Class VOIText

  • 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
    Direct Known Subclasses:
    VOIWormAnnotation

    public class VOIText
    extends VOIBase

    Title: VOI Text

    Description: VOI Text is used to hold an annotation that will be displayed on screen with the chosen font size, color, type, and descriptors (BOLD, ITALIC) it e

    Copyright: Copyright (c) 2004

    Company:

    Version:
    1.0
    Author:
    not attributable
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

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

        private int fontDescriptors
        The descriptors for the font which start at PLAIN and are additive (PLAIN + BOLD = bold) (BOLD+ITALIC = bold and italic) etc.
      • fontName

        private java.lang.String fontName
        The name (or type) of the font.
      • fontSize

        private int fontSize
        The size of the font (half-sizes not allowed...int).
      • textColor

        private java.awt.Color textColor
        This must be kept separate (but parallel) to the VOI color.
      • backgroundColor

        private java.awt.Color backgroundColor
        The color used to draw behind the main text (so that the text will stand out)
      • textFont

        private java.awt.Font textFont
        The font is stored here so that it does not have to be reallocated on each redraw. It is only new'd at the beginning or if the fontDescriptors variable changes
      • textString

        private java.lang.String textString
        The String to be displayed.
      • noteString

        private java.lang.String noteString
        The note stored in VOIText, has same font as textString
      • useMarker

        private boolean useMarker
        If this is set to true, a draggable arrow will be displayed
      • comments

        private java.util.ArrayList<java.lang.String> comments
    • Constructor Detail

      • VOIText

        public VOIText()
        default constructor.
      • VOIText

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

        public VOIText​(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
      • VOIText

        public VOIText​(VOIText kVOI)
        Copy contructor.
        Parameters:
        kVOI -
    • Method Detail

      • xCor

        public static int xCor​(int len,
                               double dir)
      • yCor

        public static int yCor​(int len,
                               double dir)
      • exportPoint

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

        public java.awt.Color getBackgroundColor()
        Gets background color.
        Returns:
        background color.
      • getColor

        public java.awt.Color getColor()
        Gets the font color (for copy/paste operations).
        Returns:
        Color font color
      • getColorString

        public java.lang.String getColorString()
        Gets a string describing the font's color (for saving in XML header).
        Returns:
        String formatted string for font's color
      • getComments

        public java.util.ArrayList<java.lang.String> getComments()
      • getFontDescriptors

        public int getFontDescriptors()
        Gets the font's descriptors (PLAN, BOLD, ITALIC).
        Returns:
        int font descriptors
      • getFontName

        public java.lang.String getFontName()
        Gets the name (type) of the font.
        Returns:
        String font name
      • getFontSize

        public int getFontSize()
        Returns the size of the font.
        Returns:
        int font size
      • getLocationString

        public java.lang.String getLocationString()
        Gets a string describing the text location (in the slice, does not include which slice).
        Returns:
        String formatted location string
      • getNote

        public java.lang.String getNote()
        Gets the contained note.
        Returns:
        Contained note of the VOIText
      • getText

        public java.lang.String getText()
        Gets the displayed text.
        Returns:
        String on-screen text
      • getTextFont

        public java.awt.Font getTextFont()
        Returns the Font.
        Returns:
      • getTextWidth

        public WildMagic.LibFoundation.Mathematics.Vector3f getTextWidth()
      • moveVOIPoint

        public void moveVOIPoint​(int xM,
                                 int yM,
                                 int zM)
        Moves the point to the new location. NO 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
      • setBackgroundColor

        public void setBackgroundColor​(java.awt.Color color)
        Sets background color
        Parameters:
        color -
      • setColor

        public void setColor​(java.awt.Color color)
        Sets the color of the font.
        Parameters:
        color - Color font color
      • setComments

        public void setComments​(java.lang.String comment)
      • setFontDescriptors

        public void setFontDescriptors​(int fontDescriptors)
        Sets the font's descriptors.
        Parameters:
        fontDescriptors - int font descriptors
      • setFontName

        public void setFontName​(java.lang.String fontName)
        Sets the name (type) of the font.
        Parameters:
        fontName - String font name
      • setFontSize

        public void setFontSize​(int fontSize)
        Sets the size of the font.
        Parameters:
        fontSize - int font size
      • setNote

        public void setNote​(java.lang.String noteString)
        Sets the contained note.
        Parameters:
        noteString - String note stored in VOIText
      • setText

        public void setText​(java.lang.String textString)
        Sets the displayed text.
        Parameters:
        textString - String text to be displayed
      • setTextFont

        public void setTextFont​(java.awt.Font font)
        Sets Font.
        Parameters:
        font -
      • setTextWidth

        public void setTextWidth​(WildMagic.LibFoundation.Mathematics.Vector3f kVolume)
      • setUseMarker

        public void setUseMarker​(boolean mark)
        Sets the arrow to be on or off
        Parameters:
        mark - whether to draw the arrow
      • getDisplay

        public boolean getDisplay()
      • useMarker

        public boolean useMarker()
        gets whether or not the arrow should be drawn
        Returns:
      • update

        public void update​(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
        Description copied from class: VOIBase
        Set the color of this contour.
        Overrides:
        update in class VOIBase
        Parameters:
        kColor - new color for this contour.
      • updateText

        public void updateText()