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
ConstructorsModifierConstructorDescriptionprotectedCalculateObjectMask(int iterations, ResolvedPartMap<ObjectMask, FeatureInputSingleObject, Integer> map) Creates a newCalculateObjectMaskinstance.protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanprotected ObjectMaskexecute(FeatureInputSingleObject input) This performs the actual calculation when needed.inthashCode()toString()Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateObjectMask
Copy constructor.- Parameters:
source- theCalculateObjectMaskto copy from
-
CalculateObjectMask
protected CalculateObjectMask(int iterations, ResolvedPartMap<ObjectMask, FeatureInputSingleObject, Integer> map) Creates a newCalculateObjectMaskinstance.- Parameters:
iterations- The number of iterations to perform.map- A map to store and retrieve calculatedObjectMasks.
-
-
Method Details
-
execute
Description copied from class:CalculationPartThis performs the actual calculation when needed. It should only be called once, untilCalculationPart.invalidate()is called.- Specified by:
executein 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:
equalsin classCalculationPart<ObjectMask,FeatureInputSingleObject>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCodein classCalculationPart<ObjectMask,FeatureInputSingleObject>
-