Package gov.nih.mipav.model.structures
Class VOIProtractor
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.VOIProtractor
- 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>
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanSet to true, displays this protractor object for any z-value.private static final longUse serialVersionUID for interoperability.Fields 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
ConstructorsConstructorDescriptionDefault constructor.VOIProtractor(VOIProtractor kVOI) Copy constructor.VOIProtractor(Vector<WildMagic.LibFoundation.Mathematics.Vector3f> kPositions) Constructor, sets the position of the protractor. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanReturns true if this protractor is displayed independent of z-value.getAngleString(double fAngle) Returns the angle of the protractor as a string.getAngleString(float[] afResolutions) Returns the angle of the protractor as a string.doublegetLengthPtToPt(float[] resolutions) Returns the total length of this contour, based on the input resolutions.doublegetTheta(float[] afResolutions) Gets the angle between the two lines of the protractor.voidsetAllSlices(boolean bValue) Sets the all-slice flag.voidtranslate(float xT, float yT) Translates 3 points of the protractor VOI.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, 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, 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:
-
allSlices
private boolean allSlicesSet to true, displays this protractor object for any z-value.
-
-
Constructor Details
-
VOIProtractor
public VOIProtractor()Default constructor. -
VOIProtractor
Constructor, sets the position of the protractor.- Parameters:
kPositions-
-
VOIProtractor
Copy constructor.- Parameters:
kVOI-
-
-
Method Details
-
clone
-
getAllSlices
public boolean getAllSlices()Returns true if this protractor is displayed independent of z-value.- Returns:
-
getAngleString
Returns the angle of the protractor as a string. Based on the input image resolutions.- Parameters:
afResolutions-- Returns:
-
getAngleString
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:
getLengthPtToPtin classVOIBase- 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 directionyT- amount to translate in the y direction
-