Class TouchingVoxels
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
- Direct Known Subclasses:
HasTouchingVoxels,NumberTouchingVoxelFaces,NumberTouchingVoxels
public abstract class TouchingVoxels
extends org.anchoranalysis.image.feature.bean.object.pair.FeaturePairObjects
Base class for features that calculate touching with a dilated bounding box intersection.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description TouchingVoxels() -
Method Summary
Modifier and Type Method Description doublecalculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> input)protected abstract 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.protected org.anchoranalysis.image.voxel.kernel.count.CountKernelcreateCountKernelMask(org.anchoranalysis.image.voxel.object.ObjectMask object2Relative)Creates aCountKernelfor the given object mask.protected org.anchoranalysis.image.voxel.kernel.KernelApplicationParameterscreateParameters()CreatesKernelApplicationParametersbased 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, isInitialized
-
Constructor Details
-
TouchingVoxels
public TouchingVoxels()
-
-
Method Details
-
calculate
public double calculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> input) throws org.anchoranalysis.feature.calculate.FeatureCalculationException- Specified by:
calculatein classorg.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputPairObjects>- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException
-
calculateWithIntersection
protected abstract 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.FeatureCalculationExceptionCalculates the feature value for the intersection of two objects.- Parameters:
object1- the firstObjectMaskobject2- the secondObjectMaskboxIntersect- theBoundingBoxof the intersection- Returns:
- the calculated feature value
- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException- if the calculation fails
-
createCountKernelMask
protected org.anchoranalysis.image.voxel.kernel.count.CountKernel createCountKernelMask(org.anchoranalysis.image.voxel.object.ObjectMask object2Relative)Creates aCountKernelfor the given object mask.- Parameters:
object2Relative- theObjectMaskto create the kernel for- Returns:
- the created
CountKernel
-
createParameters
protected org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters 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).
-