public class NumberTouchingVoxelFaces extends TouchingVoxels
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.
Constructor and Description |
---|
NumberTouchingVoxelFaces() |
Modifier and Type | Method and Description |
---|---|
protected double |
calculateWithIntersection(ObjectMask object1,
ObjectMask object2,
BoundingBox boxIntersect) |
calculate, createCountKernelMask, createParameters, isDo3D, setDo3D
inputType
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
protected double calculateWithIntersection(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect) throws FeatureCalculationException
calculateWithIntersection
in class TouchingVoxels
FeatureCalculationException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.