Class BoundingBoxAlongAxisBase
- Direct Known Subclasses:
BoundingBoxExtentAlongAxis
,BoundingBoxMaximumAlongAxis
,BoundingBoxMinimumAlongAxis
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 TypeMethodDescriptiondouble
Calculates a value for some input.A human-readable description of the parameterization of the bean.protected abstract ReadableTuple3i
Extracts aReadableTuple3i
from the givenBoundingBox
.getAxis()
The axis along which to calculate the feature value ("x", "y", or "z").void
The axis along which to calculate the feature value ("x", "y", or "z").Methods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
inputType
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods 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 Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputSingleObject>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
extractTupleForBoundingBox
Extracts aReadableTuple3i
from the givenBoundingBox
.- Parameters:
box
- theBoundingBox
to extract from- Returns:
- the extracted
ReadableTuple3i
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<FeatureInputSingleObject>
- Returns:
- the description.
-
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").
-