Class CalculateEllipseLeastSquares
- All Implemented Interfaces:
ResettableCalculation
public class CalculateEllipseLeastSquares
extends CalculationPart<ObjectWithEllipse,FeatureInputSingleObject>
Calculates the best-fit ellipse for an
ObjectMask
using linear least squares.
This class fits an Ellipse
to the center of gravity slice of the input object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
protected ObjectWithEllipse
execute
(FeatureInputSingleObject input) This performs the actual calculation when needed.int
hashCode()
Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateEllipseLeastSquares
public CalculateEllipseLeastSquares()Creates a new instance ofCalculateEllipseLeastSquares
.
-
-
Method Details
-
execute
protected ObjectWithEllipse execute(FeatureInputSingleObject input) throws FeatureCalculationException Description copied from class:CalculationPart
This performs the actual calculation when needed. It should only be called once, untilCalculationPart.invalidate()
is called.- Specified by:
execute
in classCalculationPart<ObjectWithEllipse,
FeatureInputSingleObject> - Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot be successfully completed.
-
equals
- Specified by:
equals
in classCalculationPart<ObjectWithEllipse,
FeatureInputSingleObject>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classCalculationPart<ObjectWithEllipse,
FeatureInputSingleObject>
-