Class VOIText

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.VOIText
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>
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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • 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 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 Color textColor
      This must be kept separate (but parallel) to the VOI color.
    • backgroundColor

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

      private 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 String textString
      The String to be displayed.
    • noteString

      private 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 ArrayList<String> comments
  • Constructor Details

    • VOIText

      public VOIText()
      default constructor.
    • VOIText

      public VOIText(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 Details

    • xCor

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

      public static int yCor(int len, double dir)
    • clone

      public VOIText clone()
      Specified by:
      clone in class VOIBase
    • exportPoint

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

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

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

      public 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 ArrayList<String> getComments()
    • getFontDescriptors

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

      public 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 String getLocationString()
      Gets a string describing the text location (in the slice, does not include which slice).
      Returns:
      String formatted location string
    • getNote

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

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

      public 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(Color color)
      Sets background color
      Parameters:
      color -
    • setColor

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

      public void setComments(String comment)
    • setFontDescriptors

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

      public void setFontName(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(String noteString)
      Sets the contained note.
      Parameters:
      noteString - String note stored in VOIText
    • setText

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

      public void setTextFont(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()