Class TouchingVoxels
- Direct Known Subclasses:
HasTouchingVoxels
,NumberTouchingVoxelFaces
,NumberTouchingVoxels
Base class for features that calculate touching with a dilated bounding box intersection.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Calculates a value for some input.protected abstract double
calculateWithIntersection
(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) Calculates the feature value for the intersection of two objects.protected CountKernel
createCountKernelMask
(ObjectMask object2Relative) Creates aCountKernel
for the given object mask.protected KernelApplicationParameters
CreatesKernelApplicationParameters
based on the current configuration.boolean
isDo3D()
Whether to perform calculations in 3D (true) or 2D (false).void
setDo3D
(boolean do3D) Whether to perform calculations in 3D (true) or 2D (false).Methods inherited from class org.anchoranalysis.image.feature.bean.object.pair.FeaturePairObjects
inputType
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, 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
-
TouchingVoxels
public TouchingVoxels()
-
-
Method Details
-
calculate
public double calculate(FeatureCalculationInput<FeatureInputPairObjects> input) throws FeatureCalculationException Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputPairObjects>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
calculateWithIntersection
protected abstract double calculateWithIntersection(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) throws FeatureCalculationException Calculates the feature value for the intersection of two objects.- Parameters:
object1
- the firstObjectMask
object2
- the secondObjectMask
boxIntersect
- theBoundingBox
of the intersection- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if the calculation fails
-
createCountKernelMask
Creates aCountKernel
for the given object mask.- Parameters:
object2Relative
- theObjectMask
to create the kernel for- Returns:
- the created
CountKernel
-
createParameters
CreatesKernelApplicationParameters
based on the current configuration.- Returns:
- the created
KernelApplicationParameters
-
isDo3D
public boolean isDo3D()Whether to perform calculations in 3D (true) or 2D (false). -
setDo3D
public void setDo3D(boolean do3D) Whether to perform calculations in 3D (true) or 2D (false).
-