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 classAlgorithmNetworkSnake.PixelGrid.PixelGridNode
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>edgeJunctionsprivate intgridHeightprivate intgridWidthprivate java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>junctionsprivate 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 voidaddPixelLine(int x1, int y1, int x2, int y2)java.util.ArrayList<java.awt.Point>[]findBranches(int x, int y, int recordRate, boolean[][] visitedPixels)private voidfindEdgeJunctions()private voidfindJunctions()java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>getEdgeJunctions()intgetGridHeight()intgetGridWidth()java.util.ArrayList<AlgorithmNetworkSnake.PixelGrid.PixelGridNode>getJunctions()AlgorithmNetworkSnake.PixelGrid.PixelGridNode[][]getPixels()voidloadPixels(java.util.ArrayList<AlgorithmNetworkSnake.Pixel> pixelList)private voidsetPixel(int x, int y)voidsetPixels(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)
-
-