Class NumberNeighboringVoxels

Object
AnchorBean<Feature<FeatureInputSingleObject>>
InitializableBean<Feature<FeatureInputSingleObject>, FeatureInitialization>
Feature<FeatureInputSingleObject>
FeatureSingleObject
OutlineKernelBase
NumberNeighboringVoxels

public class NumberNeighboringVoxels extends OutlineKernelBase
Calculates the number of voxels on the object that have a neighbor.

What possible neighbors are specified by a binary-mask from an energy-channel. This should have with 255 high, and 0 low, and indicate all possible neighbor voxels. The region on the binary-mask coinciding with the object is irrelevant and be set to any value.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    calculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack)
    Calculates the feature value using the specified parameters.
    int
    Index of which channel in the energy-stack to select
    void
    setEnergyIndex(int energyIndex)
    Index of which channel in the energy-stack to select

    Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.single.OutlineKernelBase

    calculate, isDo3D, isIgnoreAtThreshold, isOutsideAtThreshold, setDo3D, setIgnoreAtThreshold, setOutsideAtThreshold

    Methods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject

    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

    • NumberNeighboringVoxels

      public NumberNeighboringVoxels()
  • Method Details

    • calculateWithParameters

      protected double calculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack) throws FeatureCalculationException
      Description copied from class: OutlineKernelBase
      Calculates the feature value using the specified parameters.
      Specified by:
      calculateWithParameters in class OutlineKernelBase
      Parameters:
      object - the ObjectMask to calculate the feature on
      parameters - the KernelApplicationParameters for applying the kernel
      energyStack - a supplier for the EnergyStack
      Returns:
      the calculated feature value
      Throws:
      FeatureCalculationException - if the calculation fails
    • getEnergyIndex

      public int getEnergyIndex()
      Index of which channel in the energy-stack to select
    • setEnergyIndex

      public void setEnergyIndex(int energyIndex)
      Index of which channel in the energy-stack to select