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 TypeMethodDescriptiondoubleCalculates a value for some input.protected abstract doublecalculateWithIntersection(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) Calculates the feature value for the intersection of two objects.protected CountKernelcreateCountKernelMask(ObjectMask object2Relative) Creates aCountKernelfor the given object mask.protected KernelApplicationParametersCreatesKernelApplicationParametersbased on the current configuration.booleanisDo3D()Whether to perform calculations in 3D (true) or 2D (false).voidsetDo3D(boolean do3D) Whether to perform calculations in 3D (true) or 2D (false).Methods inherited from class org.anchoranalysis.image.feature.bean.object.pair.FeaturePairObjects
inputTypeMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, 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
-
TouchingVoxels
public TouchingVoxels()
-
-
Method Details
-
calculate
public double calculate(FeatureCalculationInput<FeatureInputPairObjects> input) throws FeatureCalculationException Description copied from class:FeatureCalculates a value for some input.- Specified by:
calculatein 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 firstObjectMaskobject2- the secondObjectMaskboxIntersect- theBoundingBoxof the intersection- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException- if the calculation fails
-
createCountKernelMask
Creates aCountKernelfor the given object mask.- Parameters:
object2Relative- theObjectMaskto create the kernel for- Returns:
- the created
CountKernel
-
createParameters
CreatesKernelApplicationParametersbased 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).
-