Package gov.nih.mipav.model.algorithms
Class AlgorithmNetworkSnake.PixelGrid
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.AlgorithmNetworkSnake.PixelGrid
-
- Enclosing class:
- AlgorithmNetworkSnake
public class AlgorithmNetworkSnake.PixelGrid extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AlgorithmNetworkSnake.PixelGrid.PixelGridNode
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>
edgeJunctions
private int
gridHeight
private int
gridWidth
private java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>
junctions
private AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][]
pixels
-
Constructor Summary
Constructors Constructor Description PixelGrid(int width, int height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPixelLine(int x1, int y1, int x2, int y2)
java.util.ArrayList<java.awt.Point>[]
findBranches(int x, int y, int recordRate, boolean[][] visitedPixels)
private void
findEdgeJunctions()
private void
findJunctions()
java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>
getEdgeJunctions()
int
getGridHeight()
int
getGridWidth()
java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>
getJunctions()
AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][]
getPixels()
void
loadPixels(java.util.ArrayList<AlgorithmNetworkSnake.Pixel> pixelList)
private void
setPixel(int x, int y)
void
setPixels(AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][] pixels)
private java.util.ArrayList<java.awt.Point>
traverseWall(AlgorithmNetworkSnake.PixelGrid.PixelGridNode sourceNode, AlgorithmNetworkSnake.PixelGrid.PixelGridNode nextNode, int recordRate, boolean[][] visitedPixels)
-
-
-
Field Detail
-
pixels
private AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][] pixels
-
junctions
private java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode> junctions
-
edgeJunctions
private java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode> edgeJunctions
-
gridWidth
private int gridWidth
-
gridHeight
private int gridHeight
-
-
Method Detail
-
getPixels
public AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][] getPixels()
-
setPixels
public void setPixels(AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][] pixels)
-
getJunctions
public java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode> getJunctions()
-
getEdgeJunctions
public java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode> getEdgeJunctions()
-
getGridWidth
public int getGridWidth()
-
getGridHeight
public int getGridHeight()
-
loadPixels
public void loadPixels(java.util.ArrayList<AlgorithmNetworkSnake.Pixel> pixelList)
-
findJunctions
private void findJunctions()
-
findEdgeJunctions
private void findEdgeJunctions()
-
findBranches
public java.util.ArrayList<java.awt.Point>[] findBranches(int x, int y, int recordRate, boolean[][] visitedPixels)
-
traverseWall
private java.util.ArrayList<java.awt.Point> traverseWall(AlgorithmNetworkSnake.PixelGrid.PixelGridNode sourceNode, AlgorithmNetworkSnake.PixelGrid.PixelGridNode nextNode, int recordRate, boolean[][] visitedPixels)
-
addPixelLine
public void addPixelLine(int x1, int y1, int x2, int y2)
-
setPixel
private void setPixel(int x, int y)
-
-