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
    double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> input)  
    protected abstract double calculateWithIntersection​(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.CountKernel createCountKernelMask​(org.anchoranalysis.image.voxel.object.ObjectMask object2Relative)
    Creates a CountKernel for the given object mask.
    protected org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters createParameters()
    Creates KernelApplicationParameters based on the current configuration.
    boolean isDo3D()
    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

  • 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:
      calculate in class org.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.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:
      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 a CountKernel for the given object mask.
      Parameters:
      object2Relative - the ObjectMask to create the kernel for
      Returns:
      the created CountKernel
    • createParameters

      protected org.anchoranalysis.image.voxel.kernel.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).