Package noduledistances.imagej
Class Node
java.lang.Object
java.awt.geom.Point2D
java.awt.Point
noduledistances.imagej.Node
- All Implemented Interfaces:
Serializable,Cloneable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float -
Field Summary
FieldsModifier and TypeFieldDescriptionintint[][]DEPRECATED 2d array where each element A_ij is the distance to the j'th node on the i'th iteration of dijkstra's.static final intstatic final intintdoublenodeNumber represents the number shown on the nodule csv data to easily associate a nodule node with it's nodule number.int[]static final intstatic final intNode.type == 0 -> skeleton node type == 1 -> red nodule type == 2 -> green nodule type == 3 -> mixed noduleinttype == 0 -> skeleton node
type == 1 -> red nodule
type == 2 -> green nodule
type == 3 -> mixed nodule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecomputes the euclidean distance between this node and the given node.booleanWe say two nodes are equal when any of the following are true:
1. they reference the same object in memory
2. their x/y values are the same
3. if they are the same type of node( skeleton/nodule) AND are within 8 pixelsArrayList<int[]>getPaths(int node) Finds and returns the set of paths from this node to the given node.toString()voidupdate(int type) method for updating the nodule.voidupdate(int type, double nodeNumber, int area) method for updating the nodevoidupdate(int x, int y, int type, double nodeNumber, int area) method for updating the node.Methods inherited from class java.awt.Point
getLocation, getX, getY, move, setLocation, setLocation, setLocation, translateMethods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
-
Field Details
-
SKELETON
public static final int SKELETONNode.type == 0 -> skeleton node type == 1 -> red nodule type == 2 -> green nodule type == 3 -> mixed nodule- See Also:
-
RED
public static final int RED- See Also:
-
GREEN
public static final int GREEN- See Also:
-
MIXED
public static final int MIXED- See Also:
-
type
public int typetype == 0 -> skeleton node
type == 1 -> red nodule
type == 2 -> green nodule
type == 3 -> mixed nodule -
area
public int area -
nodeIndex
public int nodeIndex -
nodeNumber
public double nodeNumbernodeNumber represents the number shown on the nodule csv data to easily associate a nodule node with it's nodule number. If the node is not a nodule, the value defaults to -1. The notation is noduleNumber_noduleSubnumber, and the underscore is represented as a decimal. -
distance
public int[][] distanceDEPRECATED 2d array where each element A_ij is the distance to the j'th node on the i'th iteration of dijkstra's. Each row is one iteration of Dijkstra's, we remove a used edge from the original graph and perform another iteration of dijsktra's to create a sample of possible paths. DEPRECATED -
prevNode
public int[] prevNode
-
-
Constructor Details
-
Node
public Node(int x, int y, int type, double nodeNumber, int area) constructor method- Parameters:
x- : x coordinate of the node.y- : y coordinate of the node.type- : type of the node.nodeNumber- : node number of the node if it is a nodule.area- : nodule area of the node if it is a nodule.
-
Node
public Node(int x, int y, int type, double nodeNumber) constructor method- Parameters:
x- : x coordinate of the node.y- : y coordinate of the node.type- : type of the node.nodeNumber- : node number of the node if it is a noduel.
-
-
Method Details
-
update
public void update(int x, int y, int type, double nodeNumber, int area) method for updating the node.- Parameters:
x- : new x coordinate.y- : new y coordinate.type- : new type of the node.nodeNumber- : new node number for the node.area- : new nodule area for the node.
-
update
public void update(int type, double nodeNumber, int area) method for updating the node- Parameters:
type- : new type for the node.nodeNumber- : new node number for the node.area- : new nodule area for the node.
-
update
public void update(int type) method for updating the nodule.- Parameters:
type- : new type for the node.
-
equals
We say two nodes are equal when any of the following are true:
1. they reference the same object in memory
2. their x/y values are the same
3. if they are the same type of node( skeleton/nodule) AND are within 8 pixels -
getPaths
Finds and returns the set of paths from this node to the given node.- Parameters:
node- : node to search from.- Returns:
- : the set of paths from this node to the given node.
-
distance
computes the euclidean distance between this node and the given node.- Parameters:
node- : node to compute the distance betwee.- Returns:
- : the euclidean distance between this node and the given node.
-
toString
-