|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.imageutil.BaseImageOperation org.shapelogic.imageprocessing.BaseVectorizer org.shapelogic.imageprocessing.ShortLineBasedVectorizer
public abstract class ShortLineBasedVectorizer
Base class for vectorizers that are using a local short line, to determine when to set point on multi line. This approach was not very successful.
Field Summary | |
---|---|
double |
_angleLimit
|
protected double |
_currentAngle
|
protected CircleInterval |
_currentCircleInterval
|
protected LineType |
_currentLineType
|
protected CPointInt |
_currentVectorDirection
Short to current point |
protected CPointInt |
_firstPointInLine
Start of current line, this is also the last point saved in the multi line |
protected byte |
_firstUsedDirection
|
int |
_maxPointsInShortLine
|
protected PixelTypeCalculator |
_pixelTypeCalculatorNextPoint
|
protected int |
_pointsInCurrentShortLine
|
protected byte |
_secondUsedDirection
|
protected CPointInt |
_startOfShortLinePoint
Try to do short lines and |
static double |
ANGLE_DIFFERENCE_LIMIT
|
static int |
MAX_NUMBER_OF_POINTS_IN_SHORT_LINE
|
Fields inherited from class org.shapelogic.imageprocessing.BaseVectorizer |
---|
_cleanedupPolygon, _currentDirection, _currentPixelIndex, _currentPoint, _cyclePoints, _displayInternalInfo, _endPointsClusters, _errorMessage, _firstPointInLineIndex, _firstPointInMultiLine, _matchingOH, _maxX, _maxY, _minX, _minY, _nextCount, _numberOfPointsInAllLines, _pixels, _pixelTypeCalculator, _pixelTypeFinder, _rulesArrayForLetterMatching, _stream, _streamName, _unfinishedPoints, _yForUnporcessedPixel, MAX_DISTANCE_BETWEEN_CLUSTER_POINTS, STRAIGHT_LINE_COLOR |
Fields inherited from class org.shapelogic.imageutil.BaseImageOperation |
---|
_arg, _guiWrapper, _image, _keyValueParser, _setupReturnValue |
Constructor Summary | |
---|---|
ShortLineBasedVectorizer()
|
Method Summary | |
---|---|
protected void |
findMultiLine()
Take point off _unfinishedPoints try to start line from that, if nothing is found the remove point. |
protected void |
findMultiLinePostProcess()
To be overridden. |
protected boolean |
findMultiLinePreProcess()
|
protected boolean |
findNextLinePoint()
Get the next point to investigate from _currentPoint. |
double |
getAngleLimit()
|
int |
getMaxSinceLast()
|
protected byte |
handleProblematicPoints()
Find the maximum if there is more than one the add them all the unknown list. |
protected void |
internalFactory()
All the objects that needs special version should be created here. |
protected boolean |
lastPixelOk(byte newDirection)
Change to be an up front check. |
protected void |
makeNewPoint()
|
protected void |
makeNewPointPostProcess()
|
protected void |
moveCurrentPointForwards(byte newDirection)
|
void |
newShortLine()
Hook for creating new short line. |
protected void |
resetShortLine()
|
void |
setAngleLimit(double angleLimit)
|
void |
setMaxSinceLast(int maxSinceLast)
|
protected void |
splitLine(CPointInt splitPoint)
Insert point between current _firstPointInLine and newFirstPoint. |
Methods inherited from class org.shapelogic.imageprocessing.BaseVectorizer |
---|
addToUnfinishedPoints, cleanPolygon, countRegionCrossingsAroundPoint, drawLine, drawLines, findAllLines, findFirstLinePoint, findPointType, getCleanedupPolygon, getCyclePoints, getErrorMessage, getImageProcessor, getMatchingOH, getMaxX, getMaxY, getMinX, getMinY, getPixels, getPoints, getPolygon, getStream, getStreamName, hasNext, init, isPixelUsed, matchLines, next, oppesiteDirection, pixelIndexToPoint, pointToPixelIndex, pointToPixelIndex, polygonFactory, remove, run, setStreamName |
Methods inherited from class org.shapelogic.imageutil.BaseImageOperation |
---|
getGuiWrapper, getImage, getKeyValueParser, getSetupReturnValue, isImageValid, setArg, setGuiWrapper, setKeyValueParser, setSetupReturnValue, setup, showAbout, showMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_NUMBER_OF_POINTS_IN_SHORT_LINE
public static final double ANGLE_DIFFERENCE_LIMIT
public double _angleLimit
protected double _currentAngle
protected int _pointsInCurrentShortLine
public int _maxPointsInShortLine
protected byte _secondUsedDirection
protected CPointInt _startOfShortLinePoint
protected CPointInt _currentVectorDirection
protected PixelTypeCalculator _pixelTypeCalculatorNextPoint
protected CircleInterval _currentCircleInterval
protected CPointInt _firstPointInLine
protected byte _firstUsedDirection
protected LineType _currentLineType
Constructor Detail |
---|
public ShortLineBasedVectorizer()
Method Detail |
---|
protected void findMultiLine()
findMultiLine
in class BaseVectorizer
protected void findMultiLinePostProcess()
BaseVectorizer
findMultiLinePostProcess
in class BaseVectorizer
protected boolean findMultiLinePreProcess()
findMultiLinePreProcess
in class BaseVectorizer
protected byte handleProblematicPoints()
handleProblematicPoints
in class BaseVectorizer
public void newShortLine()
protected void resetShortLine()
public int getMaxSinceLast()
public void setMaxSinceLast(int maxSinceLast)
public void setAngleLimit(double angleLimit)
protected boolean lastPixelOk(byte newDirection)
lastPixelOk
in class BaseVectorizer
public double getAngleLimit()
protected void moveCurrentPointForwards(byte newDirection)
moveCurrentPointForwards
in class BaseVectorizer
protected void makeNewPoint()
protected void makeNewPointPostProcess()
protected void internalFactory()
internalFactory
in class BaseVectorizer
protected boolean findNextLinePoint()
protected void splitLine(CPointInt splitPoint)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |