Class NumberTouchingVoxelFaces
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<org.anchoranalysis.feature.bean.Feature<T>,org.anchoranalysis.feature.initialization.FeatureInitialization>
org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputPairObjects>
org.anchoranalysis.image.feature.bean.object.pair.FeaturePairObjects
org.anchoranalysis.plugin.image.feature.bean.object.pair.touching.TouchingVoxels
org.anchoranalysis.plugin.image.feature.bean.object.pair.touching.NumberTouchingVoxelFaces
public class NumberTouchingVoxelFaces extends TouchingVoxels
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 Constructor Description NumberTouchingVoxelFaces() -
Method Summary
Modifier and Type Method Description protected doublecalculateWithIntersection(org.anchoranalysis.image.voxel.object.ObjectMask object1, org.anchoranalysis.image.voxel.object.ObjectMask object2, org.anchoranalysis.spatial.box.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, setDo3DMethods 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, isInitialized
-
Constructor Details
-
NumberTouchingVoxelFaces
public NumberTouchingVoxelFaces()
-
-
Method Details
-
calculateWithIntersection
protected double calculateWithIntersection(org.anchoranalysis.image.voxel.object.ObjectMask object1, org.anchoranalysis.image.voxel.object.ObjectMask object2, org.anchoranalysis.spatial.box.BoundingBox boxIntersect) throws org.anchoranalysis.feature.calculate.FeatureCalculationExceptionDescription copied from class:TouchingVoxelsCalculates the feature value for the intersection of two objects.- Specified by:
calculateWithIntersectionin classTouchingVoxels- Parameters:
object1- the firstObjectMaskobject2- the secondObjectMaskboxIntersect- theBoundingBoxof the intersection- Returns:
- the calculated feature value
- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException- if the calculation fails
-