org.shapelogic.imageprocessing
Class CircleFinder
java.lang.Object
org.shapelogic.imageprocessing.CircleFinder
- All Implemented Interfaces:
- Calc<MultiLine>, LazyCalc<MultiLine>, Improver<MultiLine>, ObjectAnnotator<MultiLine>
public class CircleFinder
- extends java.lang.Object
- implements ObjectAnnotator<MultiLine>
Class that can find a circle in MultiLine.
If it find a circle it will annotate the MultiLine as a circle
and set the circle center
What is the input and output?
I think that it should take a circle
This class do not really need a state so I build a state for no good reason
Should this still implement ShapeAnnotator or just have a static method?
I think that if I need to register a lot of them, then they need to
implement an interface.
- Author:
- Sami Badawi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CircleFinder
public CircleFinder()
CircleFinder
public CircleFinder(MultiLine input)
findAnnotations
public static boolean findAnnotations(MultiLine multiLine)
- For this no state is needed, so this does not build the state
- Returns:
- true if a circle was found
createdNewVersion
public boolean createdNewVersion()
- Specified by:
createdNewVersion
in interface Improver<MultiLine>
getInput
public MultiLine getInput()
- Specified by:
getInput
in interface Improver<MultiLine>
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interface LazyCalc<MultiLine>
setup
public void setup()
- Specified by:
setup
in interface LazyCalc<MultiLine>
calc
public MultiLine calc()
- Specified by:
calc
in interface Calc<MultiLine>
getCalcValue
public MultiLine getCalcValue()
- Description copied from interface:
Calc
- If dirty do calc() else return cached value.
This should maybe be moved up in the hierarchy
- Specified by:
getCalcValue
in interface Calc<MultiLine>
isAnnotationsFound
public boolean isAnnotationsFound()
- Description copied from interface:
ObjectAnnotator
- Try if there is anything that can be annotated.
return true if there is.
- Specified by:
isAnnotationsFound
in interface ObjectAnnotator<MultiLine>
setInput
public void setInput(MultiLine input)
- Specified by:
setInput
in interface Improver<MultiLine>
Copyright © 2007. All Rights Reserved.