Package gov.nih.mipav.model.structures
Class VOIPoint
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.VOIPoint
- 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>
Class for a point VOI, a simple extension of CurveBase.
- Version:
- 1.0 Feb. 10, 1999
- Author:
- Matthew J. McAuliffe
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDistance between segments shown only for active point in polyline_slicesprivate booleanTrue if this point is the 1st point in a slice/frame of Polyline_Sliceprivate booleanTrue only for the active point of a polyline_slice structure (display's coordinates)private intID if this VOIPoint is contained in a PolyLineSlice object.private TransMatrixprivate TransMatrixprivate static final longUse serialVersionUID for interoperability.private StringDistance is calculated and passed in by VOI for polyline_slicesFields 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()booleancontains(float iX, float iY) Returns true if the input iX, iY is contained within this contour.booleancontains(float iX, float iY, float iZ) Returns true if the input iX,iY,iZ is contained within this contour.Returns the distance string.WildMagic.LibFoundation.Mathematics.Vector3fMethod to access point VOI coordinatevoidgetCoordinates(float[] coord) This method gets the coordinates of the pointWildMagic.LibFoundation.Mathematics.Vector3fGets the geometric center of the contour.intgetID()Returns ID in PolyLineSlice object.WildMagic.LibFoundation.Mathematics.Vector3fbooleanTrue if this is the active point in the PolyLineSlice object.booleanReturns true if this is the first point in the PolyLineSlice object.voidlocateVOIPoint(int xP, int yP, int zP, int xDim, int yDim, int zDim) Sets the point at (xP,yP,zP).voidmoveVOIPoint(int xM, int yM, int zM, int xDim, int yDim, int zDim) Moves the point to the new location.booleannearPoint(int iX, int iY, int iZ) Returns true if the input position is near one of the points on this contour.voidsetFirstPoint(boolean isFirst, boolean isActPt, String totalDistance, String dist) Parameters for drawing each point in the PolyLineSlice object.voidsetFirstPoint(boolean isFirst, boolean isActPt, String totalDistance, String dist, int iID) Parameters for drawing each point in the PolyLineSlice object.voidsetMatrix(TransMatrix kMat) voidsetPlane(int iPlane) Returns the totalDistance string.Methods inherited from class gov.nih.mipav.model.structures.VOIBase
addElement, addElement, area, areaTwice, calcIntensity, calcIntensity, calcIntensityThreshold, calcRGBIntensity, calcRGBIntensity, calcRGBIntensityThreshold, contain, 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, 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, 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:
-
firstSlicePoint
private boolean firstSlicePointTrue if this point is the 1st point in a slice/frame of Polyline_Slice -
totalDistanceString
Distance is calculated and passed in by VOI for polyline_slices -
distanceString
Distance between segments shown only for active point in polyline_slices -
isActivePoint
private boolean isActivePointTrue only for the active point of a polyline_slice structure (display's coordinates) -
m_iID
private int m_iIDID if this VOIPoint is contained in a PolyLineSlice object. -
m_kRotation
-
m_kRotationInverse
-
-
Constructor Details
-
VOIPoint
public VOIPoint()Default constructor -
VOIPoint
public VOIPoint(int iType) Sets the type. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.- Parameters:
iType-
-
VOIPoint
Sets the type and position. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.- Parameters:
iType-kPosition-
-
VOIPoint
public VOIPoint(int iType, WildMagic.LibFoundation.Mathematics.Vector3f kPosition) Sets the type and position. If the input type is VOI.POLYPOINT, this VOIPoint is part of a PolyLineSlice object.- Parameters:
iType-kPosition-
-
VOIPoint
Copy Constructor.- Parameters:
kVOI-
-
-
Method Details
-
clone
-
contains
public boolean contains(float iX, float iY) Returns true if the input iX, iY is contained within this contour. The z-value of the contour is ignored. -
contains
public boolean contains(float iX, float iY, float iZ) Returns true if the input iX,iY,iZ is contained within this contour. -
distanceString
Returns the distance string.- Returns:
-
exportPoint
public WildMagic.LibFoundation.Mathematics.Vector3f exportPoint()Method to access point VOI coordinate- Returns:
- 3d point
-
getCoordinates
public void getCoordinates(float[] coord) This method gets the coordinates of the point- Parameters:
coord- a float array, in which the first element is the x coordinate and the second element is the y coordinate
-
getGeometricCenter
public WildMagic.LibFoundation.Mathematics.Vector3f getGeometricCenter()Gets the geometric center of the contour.- Overrides:
getGeometricCenterin classVOIBase- Returns:
- returns the geometric center
-
getID
public int getID()Returns ID in PolyLineSlice object.- Returns:
-
getPosition
public WildMagic.LibFoundation.Mathematics.Vector3f getPosition() -
isActivePoint
public boolean isActivePoint()True if this is the active point in the PolyLineSlice object.- Returns:
-
isFirstSlicePoint
public boolean isFirstSlicePoint()Returns true if this is the first point in the PolyLineSlice object.- Returns:
-
locateVOIPoint
public void locateVOIPoint(int xP, int yP, int zP, int xDim, int yDim, int zDim) Sets the point at (xP,yP,zP). Bounds checking is performed- Parameters:
xP- x locationyP- y locationzP- z locationxDim- x dimension maximumyDim- y dimension maximumzDim- z dimension maximum
-
moveVOIPoint
public void moveVOIPoint(int xM, int yM, int zM, int xDim, int yDim, int zDim) Moves the point to the new location. 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
-
nearPoint
public boolean nearPoint(int iX, int iY, int iZ) Returns true if the input position is near one of the points on this contour.- Parameters:
iX- input x-position.iY- input y-position.iZ- input z-position- Returns:
- true if the input position is near one of the contour points.
-
setFirstPoint
Parameters for drawing each point in the PolyLineSlice object.- Parameters:
isFirst- boolean is this the very first point of the polyline slice structureisActPt- boolean is this the active point (for drawing as green and showing segment length)totalDistance- String the total distance of the polyline slicedist- String the segment (active point to next point) distance of the polyline slice
-
setFirstPoint
public void setFirstPoint(boolean isFirst, boolean isActPt, String totalDistance, String dist, int iID) Parameters for drawing each point in the PolyLineSlice object.- Parameters:
isFirst- boolean is this the very first point of the polyline slice structureisActPt- boolean is this the active point (for drawing as green and showing segment length)totalDistance- String the total distance of the polyline slicedist- String the segment (active point to next point) distance of the polyline slice
-
setMatrix
-
setPlane
public void setPlane(int iPlane) -
totalDistanceString
Returns the totalDistance string.- Returns:
-