Package gov.nih.mipav.model.structures
Class VOIPoint
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f>
-
- gov.nih.mipav.model.structures.VOIBase
-
- gov.nih.mipav.model.structures.VOIPoint
-
- 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
public class VOIPoint extends VOIBase
Class for a point VOI, a simple extension of CurveBase.- Version:
- 1.0 Feb. 10, 1999
- Author:
- Matthew J. McAuliffe
- See Also:
$Logfile: /mipav/src/gov/nih/mipav/model/structures/VOIPoint.java $ $Revision: 64 $ $Date: 2/24/06 3:34p $
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
distanceString
Distance between segments shown only for active point in polyline_slicesprivate boolean
firstSlicePoint
True if this point is the 1st point in a slice/frame of Polyline_Sliceprivate boolean
isActivePoint
True only for the active point of a polyline_slice structure (display's coordinates)private int
m_iID
ID if this VOIPoint is contained in a PolyLineSlice object.private TransMatrix
m_kRotation
private TransMatrix
m_kRotationInverse
private static long
serialVersionUID
Use serialVersionUID for interoperability.private java.lang.String
totalDistanceString
Distance is calculated and passed in by VOI for polyline_slices-
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, ZPLANE
-
-
Constructor Summary
Constructors Constructor Description VOIPoint()
Default constructorVOIPoint(int iType)
Sets the type.VOIPoint(int iType, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> kPosition)
Sets the type and position.VOIPoint(int iType, WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Sets the type and position.VOIPoint(VOIPoint kVOI)
Copy Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VOIPoint
clone()
boolean
contains(float iX, float iY)
Returns true if the input iX, iY is contained within this contour.boolean
contains(float iX, float iY, float iZ)
Returns true if the input iX,iY,iZ is contained within this contour.java.lang.String
distanceString()
Returns the distance string.WildMagic.LibFoundation.Mathematics.Vector3f
exportPoint()
Method to access point VOI coordinatevoid
getCoordinates(float[] coord)
This method gets the coordinates of the pointWildMagic.LibFoundation.Mathematics.Vector3f
getGeometricCenter()
Gets the geometric center of the contour.int
getID()
Returns ID in PolyLineSlice object.WildMagic.LibFoundation.Mathematics.Vector3f
getPosition()
boolean
isActivePoint()
True if this is the active point in the PolyLineSlice object.boolean
isFirstSlicePoint()
Returns true if this is the first point in the PolyLineSlice object.void
locateVOIPoint(int xP, int yP, int zP, int xDim, int yDim, int zDim)
Sets the point at (xP,yP,zP).void
moveVOIPoint(int xM, int yM, int zM, int xDim, int yDim, int zDim)
Moves the point to the new location.boolean
nearPoint(int iX, int iY, int iZ)
Returns true if the input position is near one of the points on this contour.void
setFirstPoint(boolean isFirst, boolean isActPt, java.lang.String totalDistance, java.lang.String dist)
Parameters for drawing each point in the PolyLineSlice object.void
setFirstPoint(boolean isFirst, boolean isActPt, java.lang.String totalDistance, java.lang.String dist, int iID)
Parameters for drawing each point in the PolyLineSlice object.void
setMatrix(TransMatrix kMat)
void
setPlane(int iPlane)
java.lang.String
totalDistanceString()
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, setVolumeDisplayRange, slice, slice, transform, trimPoints, update, update, update
-
Methods 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, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
firstSlicePoint
private boolean firstSlicePoint
True if this point is the 1st point in a slice/frame of Polyline_Slice
-
totalDistanceString
private java.lang.String totalDistanceString
Distance is calculated and passed in by VOI for polyline_slices
-
distanceString
private java.lang.String distanceString
Distance between segments shown only for active point in polyline_slices
-
isActivePoint
private boolean isActivePoint
True only for the active point of a polyline_slice structure (display's coordinates)
-
m_iID
private int m_iID
ID if this VOIPoint is contained in a PolyLineSlice object.
-
m_kRotation
private TransMatrix m_kRotation
-
m_kRotationInverse
private TransMatrix m_kRotationInverse
-
-
Constructor Detail
-
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
public VOIPoint(int iType, java.util.Vector<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
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
public VOIPoint(VOIPoint kVOI)
Copy Constructor.- Parameters:
kVOI
-
-
-
Method Detail
-
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
public java.lang.String 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:
getGeometricCenter
in 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
public void setFirstPoint(boolean isFirst, boolean isActPt, java.lang.String totalDistance, java.lang.String dist)
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, java.lang.String totalDistance, java.lang.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
public void setMatrix(TransMatrix kMat)
-
totalDistanceString
public java.lang.String totalDistanceString()
Returns the totalDistance string.- Returns:
-
-