Catalano.Imaging.Tools
Class NearestNeighborMatrix
- java.lang.Object
-
- Catalano.Imaging.Tools.NearestNeighborMatrix
-
public class NearestNeighborMatrix extends java.lang.ObjectNearest Neighbor Matrix.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classNearestNeighborMatrix.Direction
-
Constructor Summary
Constructors Constructor and Description NearestNeighborMatrix()Initialize a new instance of the NearestNeighborMatrix class.NearestNeighborMatrix(int startIndex)Initialize a new instance of the NearestNeighborMatrix class.NearestNeighborMatrix(NearestNeighborMatrix.Direction direction)Initialize a new instance of the NearestNeighborMatrix class.NearestNeighborMatrix(NearestNeighborMatrix.Direction direction, int startIndex)Initialize a new instance of the NearestNeighborMatrix class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NearestNeighborMatrix.DirectiongetDirection()Get Direction.IntPointgetPoint(int nearestNeighborIndex, int width, int height)Get the point relative nearest neighbor matrix.intgetStartIndex()Get Start index.int[][]ProcessImage(FastBitmap fastBitmap)Process image.int[][]ProcessImage(FastBitmap fastBitmap, java.util.ArrayList<IntPoint> boundary)Process image.voidsetDirection(NearestNeighborMatrix.Direction direction)Set Direction.voidsetStartIndex(int startIndex)Set Start index.
-
-
-
Constructor Detail
-
NearestNeighborMatrix
public NearestNeighborMatrix()
Initialize a new instance of the NearestNeighborMatrix class.
-
NearestNeighborMatrix
public NearestNeighborMatrix(int startIndex)
Initialize a new instance of the NearestNeighborMatrix class.- Parameters:
startIndex- Start index.
-
NearestNeighborMatrix
public NearestNeighborMatrix(NearestNeighborMatrix.Direction direction)
Initialize a new instance of the NearestNeighborMatrix class.- Parameters:
direction- Direction.
-
NearestNeighborMatrix
public NearestNeighborMatrix(NearestNeighborMatrix.Direction direction, int startIndex)
Initialize a new instance of the NearestNeighborMatrix class.- Parameters:
direction- Direction.startIndex- Start index.
-
-
Method Detail
-
getDirection
public NearestNeighborMatrix.Direction getDirection()
Get Direction.- Returns:
- Direction.
-
setDirection
public void setDirection(NearestNeighborMatrix.Direction direction)
Set Direction.- Parameters:
direction- Direction.
-
getStartIndex
public int getStartIndex()
Get Start index.- Returns:
- Start index.
-
setStartIndex
public void setStartIndex(int startIndex)
Set Start index.- Parameters:
startIndex- Start index.
-
ProcessImage
public int[][] ProcessImage(FastBitmap fastBitmap)
Process image.- Parameters:
fastBitmap- Image to be processed.- Returns:
- Nearest Neighbor Matrix.
-
ProcessImage
public int[][] ProcessImage(FastBitmap fastBitmap, java.util.ArrayList<IntPoint> boundary)
Process image.- Parameters:
fastBitmap- Image to be processed.boundary- List of points contains boundary of object.- Returns:
- Nearest Neighbor Matrix.
-
getPoint
public IntPoint getPoint(int nearestNeighborIndex, int width, int height)
Get the point relative nearest neighbor matrix.- Parameters:
nearestNeighborIndex- Nearest Neighbor index.width- Width of the matrix.height- Height of the matrix.- Returns:
- Point.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG