Package gov.nih.mipav.model.structures
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
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 Summary
FieldsModifier and TypeFieldDescriptionprivate ColorThe color used to draw behind the main text (so that the text will stand out)private intThe descriptors for the font which start at PLAIN and are additive (PLAIN + BOLD = bold) (BOLD+ITALIC = bold and italic) etc.private StringThe name (or type) of the font.private intThe size of the font (half-sizes not allowed...int).private StringThe note stored in VOIText, has same font as textStringprivate static final longUse serialVersionUID for interoperability.private ColorThis must be kept separate (but parallel) to the VOI color.private FontThe font is stored here so that it does not have to be reallocated on each redraw.private StringThe String to be displayed.private booleanIf this is set to true, a draggable arrow will be displayedFields inherited from class gov.nih.mipav.model.structures.VOIBase
active, autoLabel, averagePt, cenMassPt, cenMassPtB, cenMassPtG, cenMassPtR, CIRCLE, closed, display, DOWN, fixed, gcPt, label, lastPoint, LEFT, LEFT_MIDDLE, LOWER_LEFT, LOWER_MIDDLE, LOWER_RIGHT, m_akImageMinMax, m_bQuickLUT, m_bReloadPoints, m_bSplit, m_bUpdateAverage, m_bUpdateBounds, m_bUpdateGeometricCenter, m_bUpdateMask, m_bUpdatePlane, m_iAnchorIndex, m_iPlane, m_iVOIType, m_kColor, m_kPositionSum, m_kVolumeVOI, nearBoundPoint, nearPoint, NOT_A_PLANE, NOT_A_POINT, numPixels, process, RIGHT, RIGHT_MIDDLE, SQUARE, UNKNOWN_SUBTYPE, UP, UPPER_LEFT, UPPER_MIDDLE, UPPER_RIGHT, voiGroup, volumeDisplayRange, XPLANE, YPLANE, ZPLANEFields inherited from class java.util.Vector
capacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()WildMagic.LibFoundation.Mathematics.Vector3fMethod to access point VOI coordinate.Gets background color.getColor()Gets the font color (for copy/paste operations).Gets a string describing the font's color (for saving in XML header).booleanintGets the font's descriptors (PLAN, BOLD, ITALIC).Gets the name (type) of the font.intReturns the size of the font.Gets a string describing the text location (in the slice, does not include which slice).getNote()Gets the contained note.getText()Gets the displayed text.Returns the Font.WildMagic.LibFoundation.Mathematics.Vector3fvoidmoveVOIPoint(int xM, int yM, int zM) Moves the point to the new location.voidsetBackgroundColor(Color color) Sets background colorvoidSets the color of the font.voidsetComments(String comment) voidsetFontDescriptors(int fontDescriptors) Sets the font's descriptors.voidsetFontName(String fontName) Sets the name (type) of the font.voidsetFontSize(int fontSize) Sets the size of the font.voidSets the contained note.voidSets the displayed text.voidsetTextFont(Font font) Sets Font.voidsetTextWidth(WildMagic.LibFoundation.Mathematics.Vector3f kVolume) voidsetUseMarker(boolean mark) Sets the arrow to be on or offvoidupdate(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Set the color of this contour.voidbooleangets whether or not the arrow should be drawnstatic intxCor(int len, double dir) static intyCor(int len, double dir) Methods inherited from class gov.nih.mipav.model.structures.VOIBase
addElement, addElement, area, areaTwice, calcIntensity, calcIntensity, calcIntensityThreshold, calcRGBIntensity, calcRGBIntensity, calcRGBIntensityThreshold, contain, contains, contains, contains, createVolumeVOI, cycleActivePt, delete, deleteVolumeVOI, display, dispose, distanceToVOI, equals, exportArrays, exportArrays, fillVolume, findPositionAndCurvature, findPositionAndIntensity, findPositionAndIntensity, findVOIIndentations2D, getActivePt, getAllContourPoints, getAnchor, getAverage, getBounds, getBounds, getCenterOfMass, getCenterOfMass, getCenterOfMassB, getCenterOfMassG, getCenterOfMassR, getContourID, getDoGeometricCenterLabel, getGeometricCenter, getGeometricCenterA, getGroup, getImageBoundingBox, getLabel, getLastNumPixels, getLengthPtToPt, getLengthPtToPt, getLengthString, getMaskPositions, getName, getNearBoundPoint, getNearPoint, getNumVoxels, getPlane, getProcess, getSelectedPoint, getSubtype, getTotalLengthString, getType, getVolumeDisplayRange, getVolumeVOI, importArrays, importArrays, importPoints, isActive, isClosed, isFixed, isM_bUpdateBounds, isM_bUpdateGeometricCenter, isQuickLUT, isSplit, nearLine, nearLine, planeFit, reloadPoints, setActive, setAnchor, setClosed, setDoGeometricCenterLabel, setFixed, setGroup, setLabel, setMask, setMaskSlice, setNearBoundPoint, setNearPoint, setPlane, setProcess, setQuickLUT, setSelectedPoint, setSplit, setSubtype, setVOIIntensities, setVOIIntensities, setVolumeDisplayRange, slice, slice, transform, trimPoints, update, updateMethods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
fontDescriptors
private int fontDescriptorsThe descriptors for the font which start at PLAIN and are additive (PLAIN + BOLD = bold) (BOLD+ITALIC = bold and italic) etc. -
fontName
The name (or type) of the font. -
fontSize
private int fontSizeThe size of the font (half-sizes not allowed...int). -
textColor
This must be kept separate (but parallel) to the VOI color. -
backgroundColor
The color used to draw behind the main text (so that the text will stand out) -
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
The String to be displayed. -
noteString
The note stored in VOIText, has same font as textString -
useMarker
private boolean useMarkerIf this is set to true, a draggable arrow will be displayed -
comments
-
-
Constructor Details
-
VOIText
public VOIText()default constructor. -
VOIText
Constructor, sets positions of the annotation.- Parameters:
kPositions-
-
VOIText
public VOIText(WildMagic.LibFoundation.Mathematics.Vector3f kPosition) -
VOIText
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
-
exportPoint
public WildMagic.LibFoundation.Mathematics.Vector3f exportPoint()Method to access point VOI coordinate.- Returns:
- 3d point
-
getBackgroundColor
Gets background color.- Returns:
- background color.
-
getColor
Gets the font color (for copy/paste operations).- Returns:
- Color font color
-
getColorString
Gets a string describing the font's color (for saving in XML header).- Returns:
- String formatted string for font's color
-
getComments
-
getFontDescriptors
public int getFontDescriptors()Gets the font's descriptors (PLAN, BOLD, ITALIC).- Returns:
- int font descriptors
-
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
Gets a string describing the text location (in the slice, does not include which slice).- Returns:
- String formatted location string
-
getNote
Gets the contained note.- Returns:
- Contained note of the VOIText
-
getText
Gets the displayed text.- Returns:
- String on-screen text
-
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 directionyM- amount in pixels to move the line in the y directionzM- amount in pixels to move the line in the z directionxDim- x dimension maximumyDim- y dimension maximumzDim- z dimension maximum
-
setBackgroundColor
Sets background color- Parameters:
color-
-
setColor
Sets the color of the font.- Parameters:
color- Color font color
-
setComments
-
setFontDescriptors
public void setFontDescriptors(int fontDescriptors) Sets the font's descriptors.- Parameters:
fontDescriptors- int font descriptors
-
setFontName
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
Sets the contained note.- Parameters:
noteString- String note stored in VOIText
-
setText
Sets the displayed text.- Parameters:
textString- String text to be displayed
-
setTextFont
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:VOIBaseSet the color of this contour. -
updateText
public void updateText()
-