Class NumberTouchingVoxelFaces
A scheme for counting the touching voxels by intersection of object-masks
Specifically, one of the object-masks is dilated, and count the number of intersecting pixels with another object.
However, intersection(a*,b)!=intersection(a,b*) where * is the dilation operator. Different counts occur as a single-voxel can have multiple edges with the neighbor.
So it's better if we can iterate with a kernel over the edge pixels, and count the number of neighbors
We do this only where the bounding-boxes (dilated by 1 pixels) intersection. So as not to waste computation-time in useless areas.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculateWithIntersection
(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) Calculates the feature value for the intersection of two objects.Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.pair.touching.TouchingVoxels
calculate, createCountKernelMask, createParameters, isDo3D, setDo3D
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
-
NumberTouchingVoxelFaces
public NumberTouchingVoxelFaces()
-
-
Method Details
-
calculateWithIntersection
protected double calculateWithIntersection(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) throws FeatureCalculationException Description copied from class:TouchingVoxels
Calculates the feature value for the intersection of two objects.- Specified by:
calculateWithIntersection
in classTouchingVoxels
- Parameters:
object1
- the firstObjectMask
object2
- the secondObjectMask
boxIntersect
- theBoundingBox
of the intersection- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if the calculation fails
-