Package gov.nih.mipav.model.algorithms
Class AlgorithmNetworkSnake.SnakeInitialiser
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.AlgorithmNetworkSnake.SnakeInitialiser
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- AlgorithmNetworkSnake
public class AlgorithmNetworkSnake.SnakeInitialiser extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AlgorithmNetworkSnake.SnakeInitialiser.KeyValuePair
class
AlgorithmNetworkSnake.SnakeInitialiser.Node
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node>
externalNodes
private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node>
internalNodes
private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node>
linkingNodes
private double
mergeThreshold
private java.util.TreeMap<AlgorithmNetworkSnake.tuple2i,AlgorithmNetworkSnake.SnakeInitialiser.Node>
nodeList
private int
recordRate
private java.util.ArrayList<java.util.ArrayList<java.awt.Point>>
wallPositions
-
Constructor Summary
Constructors Constructor Description SnakeInitialiser()
-
Method Summary
-
-
-
Field Detail
-
nodeList
private java.util.TreeMap<AlgorithmNetworkSnake.tuple2i,AlgorithmNetworkSnake.SnakeInitialiser.Node> nodeList
-
externalNodes
private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> externalNodes
-
internalNodes
private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> internalNodes
-
linkingNodes
private java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> linkingNodes
-
wallPositions
private java.util.ArrayList<java.util.ArrayList<java.awt.Point>> wallPositions
-
recordRate
private int recordRate
-
mergeThreshold
private double mergeThreshold
-
-
Method Detail
-
getNodeList
public java.util.TreeMap<AlgorithmNetworkSnake.tuple2i,AlgorithmNetworkSnake.SnakeInitialiser.Node> getNodeList()
-
setNodeList
public void setNodeList(java.util.TreeMap<AlgorithmNetworkSnake.tuple2i,AlgorithmNetworkSnake.SnakeInitialiser.Node> nodeList)
-
getExternalNodes
public java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> getExternalNodes()
-
setExternalNodes
public void setExternalNodes(java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> externalNodes)
-
getInternalNodes
public java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> getInternalNodes()
-
setInternalNodes
public void setInternalNodes(java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> internalNodes)
-
getLinkingNodes
public java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> getLinkingNodes()
-
setLinkingNodes
public void setLinkingNodes(java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> linkingNodes)
-
getWallPositions
public java.util.ArrayList<java.util.ArrayList<java.awt.Point>> getWallPositions()
-
setWallPositions
public void setWallPositions(java.util.ArrayList<java.util.ArrayList<java.awt.Point>> wallPositions)
-
getRecordRate
public int getRecordRate()
-
setRecordRate
public void setRecordRate(int recordRate)
-
getMergeThreshold
public double getMergeThreshold()
-
setMergeThreshold
public void setMergeThreshold(double mergeThreshold)
-
exists
public boolean exists(int x, int y)
-
clone
public AlgorithmNetworkSnake.SnakeInitialiser clone()
- Overrides:
clone
in classjava.lang.Object
-
loadPixelGrid
public void loadPixelGrid(AlgorithmNetworkSnake.PixelGrid pixelGrid)
-
mergeNodes
public void mergeNodes()
-
mergeNearbyJunctionNodes
private AlgorithmNetworkSnake.SnakeInitialiser.Node mergeNearbyJunctionNodes(AlgorithmNetworkSnake.SnakeInitialiser.Node currentNode, double minimumJunctionDistance)
-
createAndRedistributePoints
public java.util.ArrayList<java.awt.Point> createAndRedistributePoints(java.util.ArrayList<java.awt.Point> originalPoints)
-
redistributePoints
public java.util.ArrayList<java.awt.Point> redistributePoints(java.util.ArrayList<java.awt.Point> originalPoints)
-
addNode
public void addNode(int x, int y, AlgorithmNetworkSnake.AnchorPosition anchor)
-
insertNode
public AlgorithmNetworkSnake.SnakeInitialiser.Node insertNode(int x, int y, AlgorithmNetworkSnake.AnchorPosition anchor, int ax, int ay, int bx, int by)
-
insertNode
public AlgorithmNetworkSnake.SnakeInitialiser.Node insertNode(int x, int y, AlgorithmNetworkSnake.AnchorPosition anchor, int ax, int ay)
-
removeNode
public void removeNode(int x, int y, boolean Unlink)
-
linkNodes
public void linkNodes(AlgorithmNetworkSnake.SnakeInitialiser.Node node1, AlgorithmNetworkSnake.SnakeInitialiser.Node node2)
-
linkJunctionNodes
public void linkJunctionNodes(AlgorithmNetworkSnake.SnakeInitialiser.Node node1, AlgorithmNetworkSnake.SnakeInitialiser.Node node2)
-
unLinkNodes
public void unLinkNodes(AlgorithmNetworkSnake.SnakeInitialiser.Node node1, AlgorithmNetworkSnake.SnakeInitialiser.Node node2)
-
refresh
public void refresh()
-
rePopulateLists
private void rePopulateLists()
-
fixConsistency
private void fixConsistency()
-
getAllWalls
private java.util.ArrayList<java.util.ArrayList<java.awt.Point>> getAllWalls(java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> internalNodes, java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> externalNodes)
-
getJunctionWalls
private void getJunctionWalls(AlgorithmNetworkSnake.SnakeInitialiser.Node junction, java.util.ArrayList<java.util.ArrayList<java.awt.Point>> walls)
-
getWall
private java.util.ArrayList<java.awt.Point> getWall(AlgorithmNetworkSnake.SnakeInitialiser.Node sourceNode, int index)
-
RemoveWalls
public void RemoveWalls(AlgorithmNetworkSnake.SnakeInitialiser.Node currentNode)
-
removeWall
private void removeWall(AlgorithmNetworkSnake.SnakeInitialiser.Node currentNode, AlgorithmNetworkSnake.SnakeInitialiser.Node sourceNode)
-
findNextJunctions
public java.util.ArrayList<AlgorithmNetworkSnake.SnakeInitialiser.Node> findNextJunctions(AlgorithmNetworkSnake.SnakeInitialiser.Node currentNode)
-
findNextJunction
private AlgorithmNetworkSnake.SnakeInitialiser.Node findNextJunction(AlgorithmNetworkSnake.SnakeInitialiser.Node currentNode, AlgorithmNetworkSnake.SnakeInitialiser.Node sourceNode)
-
addLineSegment
public void addLineSegment(AlgorithmNetworkSnake.SnakeInitialiser.Node StartNodeA, AlgorithmNetworkSnake.SnakeInitialiser.Node StartNodeB, AlgorithmNetworkSnake.SnakeInitialiser.Node EndNodeA, AlgorithmNetworkSnake.SnakeInitialiser.Node EndNodeB, java.util.ArrayList<java.awt.Point> LineSegments)
-
pointDistance
private double pointDistance(java.awt.Point P1, java.awt.Point P2)
-
reCalculateJunctionNeighbours
private void reCalculateJunctionNeighbours()
-
-