Class BoundingBoxAlongAxisBase
Object
AnchorBean<Feature<FeatureInputSingleObject>>
InitializableBean<Feature<FeatureInputSingleObject>, FeatureInitialization>
Feature<FeatureInputSingleObject>
FeatureSingleObject
BoundingBoxAlongAxisBase
- Direct Known Subclasses:
BoundingBoxExtentAlongAxis,BoundingBoxMaximumAlongAxis,BoundingBoxMinimumAlongAxis
public abstract class BoundingBoxAlongAxisBase
extends FeatureSingleObject
Base class for features that calculate a value along a specific axis of an object's bounding box.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculate(FeatureCalculationInput<FeatureInputSingleObject> input) protected abstract ReadableTuple3iextractTupleForBoundingBox(BoundingBox box) Extracts aReadableTuple3ifrom the givenBoundingBox.getAxis()The axis along which to calculate the feature value ("x", "y", or "z").voidThe axis along which to calculate the feature value ("x", "y", or "z").Methods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
inputTypeMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
BoundingBoxAlongAxisBase
public BoundingBoxAlongAxisBase()
-
-
Method Details
-
calculate
public double calculate(FeatureCalculationInput<FeatureInputSingleObject> input) throws FeatureCalculationException - Specified by:
calculatein classFeature<FeatureInputSingleObject>- Throws:
FeatureCalculationException
-
extractTupleForBoundingBox
protected abstract ReadableTuple3i extractTupleForBoundingBox(BoundingBox box) Extracts aReadableTuple3ifrom the givenBoundingBox.- Parameters:
box- theBoundingBoxto extract from- Returns:
- the extracted
ReadableTuple3i
-
describeParameters
- Overrides:
describeParametersin classFeature<FeatureInputSingleObject>
-
getAxis
The axis along which to calculate the feature value ("x", "y", or "z"). -
setAxis
The axis along which to calculate the feature value ("x", "y", or "z").
-