org.shapelogic.imageprocessing
Class LineVectorizer

java.lang.Object
  extended by org.shapelogic.imageprocessing.BaseVectorizer
      extended by org.shapelogic.imageprocessing.ShortLineBasedVectorizer
          extended by org.shapelogic.imageprocessing.LineVectorizer
All Implemented Interfaces:
ij.plugin.filter.PlugInFilter, IPixelTypeFinder, PixelJumperByte
Direct Known Subclasses:
LineVectorizer_

public class LineVectorizer
extends ShortLineBasedVectorizer
implements ij.plugin.filter.PlugInFilter

LineVectorizer is a vectorizer using short line of default length 5. You do a sequence of small lines, if 2 consecutive lines are close in direction you can merge them. But if they are far away in angle you create a new line. Also you can only have 2 direction within the same line, they are stored by cycle index.

Author:
Sami Badawi

Field Summary
 
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
LineVectorizer()
           
 
Method Summary
protected  boolean multiLineHasGlobalFitness()
          Test that the current direction is close to the last direction.
 
Methods inherited from class org.shapelogic.imageprocessing.ShortLineBasedVectorizer
findMultiLine, findMultiLinePostProcess, findMultiLinePreProcess, findNextLinePoint, getAngleLimit, getMaxSinceLast, handleProblematicPoints, internalFactory, lastPixelOk, makeNewPoint, makeNewPointPostProcess, moveCurrentPointForwards, newShortLine, 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
 

Constructor Detail

LineVectorizer

public LineVectorizer()
Method Detail

multiLineHasGlobalFitness

protected boolean multiLineHasGlobalFitness()
Test that the current direction is close to the last direction.

Returns:
true if a new point should be created


Copyright © 2007. All Rights Reserved.