Class TouchingVoxels

Object
AnchorBean<Feature<FeatureInputPairObjects>>
InitializableBean<Feature<FeatureInputPairObjects>, FeatureInitialization>
Feature<FeatureInputPairObjects>
FeaturePairObjects
TouchingVoxels
Direct Known Subclasses:
HasTouchingVoxels, NumberTouchingVoxelFaces, NumberTouchingVoxels

public abstract class TouchingVoxels extends FeaturePairObjects
Base class for features that calculate touching with a dilated bounding box intersection.
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    calculate(FeatureCalculationInput<FeatureInputPairObjects> input)
     
    protected abstract double
    calculateWithIntersection(ObjectMask object1, ObjectMask object2, BoundingBox boxIntersect)
    Calculates the feature value for the intersection of two objects.
    protected CountKernel
    createCountKernelMask(ObjectMask object2Relative)
    Creates a CountKernel for the given object mask.
    protected KernelApplicationParameters
    Creates KernelApplicationParameters based on the current configuration.
    boolean
    Whether to perform calculations in 3D (true) or 2D (false).
    void
    setDo3D(boolean do3D)
    Whether to perform calculations in 3D (true) or 2D (false).

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TouchingVoxels

      public TouchingVoxels()
  • Method Details

    • calculate

      public double calculate(FeatureCalculationInput<FeatureInputPairObjects> input) throws FeatureCalculationException
      Specified by:
      calculate in class Feature<FeatureInputPairObjects>
      Throws:
      FeatureCalculationException
    • 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 first ObjectMask
      object2 - the second ObjectMask
      boxIntersect - the BoundingBox of the intersection
      Returns:
      the calculated feature value
      Throws:
      FeatureCalculationException - if the calculation fails
    • createCountKernelMask

      protected CountKernel createCountKernelMask(ObjectMask object2Relative)
      Creates a CountKernel for the given object mask.
      Parameters:
      object2Relative - the ObjectMask to create the kernel for
      Returns:
      the created CountKernel
    • createParameters

      protected KernelApplicationParameters createParameters()
      Creates KernelApplicationParameters based 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).