|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.shapelogic.imageprocessing.BaseVectorizer
org.shapelogic.imageprocessing.ShortLineBasedVectorizer
org.shapelogic.imageprocessing.DirectionBasedVectorizer
public class DirectionBasedVectorizer
DirectionBasedVectorizer is a Vectorizer based on direction. This is special by using directions as the primary way of finding the path.
| Field Summary | |
|---|---|
protected byte[] |
_chainCodeForMultiLine
All the direction from _firstPointInLine, so the direction on index 0 is point one pixel away from _firstPointInLine. |
protected int[] |
_directionsCount
|
protected int |
_lastPointInCurrentMultiLine
|
protected double[] |
_shortLineAngles
|
protected double[] |
_shortLineAngleSpeeds
|
protected int |
_shortLineCount
|
protected double[] |
_shortLineLength
|
protected int[] |
_shortLinePointIndex
|
protected static int |
CHAIN_CODE_FOR_MULTI_LINE_MAX_LENGTH
|
protected static int |
MAX_SHORT_LINE_COUNT
|
protected static int |
NUMBER_OF_SAME_DIRECTION_TO_START_STRAIGHT
|
| Fields inherited from class org.shapelogic.imageprocessing.ShortLineBasedVectorizer |
|---|
_angleLimit, _currentAngle, _currentCircleInterval, _currentLineType, _currentVectorDirection, _firstPointInLine, _firstUsedDirection, _maxPointsInShortLine, _pixelTypeCalculatorNextPoint, _pointsInCurrentShortLine, _secondUsedDirection, _startOfShortLinePoint, ANGLE_DIFFERENCE_LIMIT, MAX_NUMBER_OF_POINTS_IN_SHORT_LINE |
| Fields inherited from class org.shapelogic.imageprocessing.BaseVectorizer |
|---|
_currentDirection, _currentPixelIndex, _currentPoint, _cyclePoints, _endPointsClusters, _errorMessage, _firstPointInLineIndex, _firstPointInMultiLine, _matchingOH, _maxX, _maxY, _minX, _minY, _numberOfPointsInAllLines, _pixels, _pixelTypeCalculator, _pixelTypeFinder, _rulesArrayForLetterMatching, _unfinishedPoints, MAX_DISTANCE_BETWEEN_CLUSTER_POINTS, POLYGON, RAW_POLYGON, STRAIGHT_LINE_COLOR |
| Fields inherited from interface ij.plugin.filter.PlugInFilter |
|---|
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING |
| Constructor Summary | |
|---|---|
DirectionBasedVectorizer()
|
|
| Method Summary | |
|---|---|
static CPointInt |
angleFromDirectionArray(byte[] directionArray,
int startDirection,
int endDirection)
Get angle from direction byte array. |
protected void |
findMultiLinePostProcess()
To be overridden. |
protected boolean |
isStraight()
Test if the last part of the line is straight. |
protected boolean |
lastPixelOk(byte newDirection)
Change to be an up front check. |
protected void |
makeNewPointPostProcess()
|
protected void |
moveCurrentPointForwards(byte newDirection)
|
protected boolean |
multiLineHasGlobalFitness()
Test that the current direction is close to the last direction. |
void |
newShortLine()
Hook for creating new short line. |
protected int |
numberOfDirections(int[] directionsCount)
Test how many of the 8 directions are represented. |
protected void |
splitLine(int splitIndex)
I think that this is messing with the short lines. |
| Methods inherited from class org.shapelogic.imageprocessing.ShortLineBasedVectorizer |
|---|
findMultiLine, findMultiLinePreProcess, findNextLinePoint, getAngleLimit, getMaxSinceLast, handleProblematicPoints, internalFactory, makeNewPoint, resetShortLine, setAngleLimit, setMaxSinceLast, splitLine |
| Methods inherited from class org.shapelogic.imageprocessing.BaseVectorizer |
|---|
addToUnfinishedPoints, countRegionCrossingsAroundPoint, drawLine, drawLines, findAllLines, findFirstLinePoint, findPointType, getCleanedupPolygon, getCyclePoints, getErrorMessage, getMatchingOH, getMaxX, getMaxY, getMinX, getMinY, getPixels, getPoints, getPolygon, init, isGuiEnabled, isPixelUsed, matchLines, oppesiteDirection, pixelIndexToPoint, pointToPixelIndex, pointToPixelIndex, polygonFactory, run, setup, showMessage, showMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ij.plugin.filter.PlugInFilter |
|---|
run, setup |
| Field Detail |
|---|
protected static final int CHAIN_CODE_FOR_MULTI_LINE_MAX_LENGTH
protected static final int MAX_SHORT_LINE_COUNT
protected static final int NUMBER_OF_SAME_DIRECTION_TO_START_STRAIGHT
protected byte[] _chainCodeForMultiLine
protected int[] _directionsCount
protected int _shortLineCount
protected double[] _shortLineAngles
protected double[] _shortLineAngleSpeeds
protected double[] _shortLineLength
protected int[] _shortLinePointIndex
protected int _lastPointInCurrentMultiLine
| Constructor Detail |
|---|
public DirectionBasedVectorizer()
| Method Detail |
|---|
protected boolean multiLineHasGlobalFitness()
protected boolean lastPixelOk(byte newDirection)
ShortLineBasedVectorizer
lastPixelOk in class ShortLineBasedVectorizerprotected boolean isStraight()
protected int numberOfDirections(int[] directionsCount)
protected void moveCurrentPointForwards(byte newDirection)
moveCurrentPointForwards in class ShortLineBasedVectorizerpublic void newShortLine()
ShortLineBasedVectorizer
newShortLine in class ShortLineBasedVectorizerprotected void makeNewPointPostProcess()
makeNewPointPostProcess in class ShortLineBasedVectorizer
public static CPointInt angleFromDirectionArray(byte[] directionArray,
int startDirection,
int endDirection)
protected void splitLine(int splitIndex)
splitIndex - protected void findMultiLinePostProcess()
BaseVectorizer
findMultiLinePostProcess in class ShortLineBasedVectorizer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||