Class CalculateObjectMask
- All Implemented Interfaces:
ResettableCalculation
- Direct Known Subclasses:
CalculateDilation
,CalculateErosion
public abstract class CalculateObjectMask
extends CalculationPart<ObjectMask,FeatureInputSingleObject>
Calculates an
ObjectMask
based on a specified number of iterations.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CalculateObjectMask
(int iterations, ResolvedPartMap<ObjectMask, FeatureInputSingleObject, Integer> map) Creates a newCalculateObjectMask
instance.protected
Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
protected ObjectMask
execute
(FeatureInputSingleObject input) This performs the actual calculation when needed.int
hashCode()
toString()
Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateObjectMask
Copy constructor.- Parameters:
source
- theCalculateObjectMask
to copy from
-
CalculateObjectMask
protected CalculateObjectMask(int iterations, ResolvedPartMap<ObjectMask, FeatureInputSingleObject, Integer> map) Creates a newCalculateObjectMask
instance.- Parameters:
iterations
- The number of iterations to perform.map
- A map to store and retrieve calculatedObjectMask
s.
-
-
Method Details
-
execute
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<ObjectMask,
FeatureInputSingleObject> - Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot be successfully completed.
-
toString
-
equals
- Specified by:
equals
in classCalculationPart<ObjectMask,
FeatureInputSingleObject>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classCalculationPart<ObjectMask,
FeatureInputSingleObject>
-