Class CountEqual

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

public class CountEqual extends SpecificEnergyChannelBase
Counts the number of voxels in an object that have a specific intensity value in a channel.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    calculateWithChannel(ObjectMask object, Channel channel)
    Calculates the number of voxels in the object that have the specified intensity value in the channel.
    int
    The intensity value to count.
    void
    setValue(int value)
    The intensity value to count.

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

    calculate, getEnergyIndex, setEnergyIndex

    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

    • CountEqual

      public CountEqual()
  • Method Details

    • calculateWithChannel

      protected double calculateWithChannel(ObjectMask object, Channel channel) throws FeatureCalculationException
      Calculates the number of voxels in the object that have the specified intensity value in the channel.
      Specified by:
      calculateWithChannel in class SpecificEnergyChannelBase
      Parameters:
      object - the ObjectMask defining the region of interest
      channel - the Channel to analyze
      Returns:
      the count of voxels with the specified intensity value
      Throws:
      FeatureCalculationException - if the calculation fails
    • getValue

      public int getValue()
      The intensity value to count. Defaults to the 'on' value of BinaryValuesInt.
    • setValue

      public void setValue(int value)
      The intensity value to count. Defaults to the 'on' value of BinaryValuesInt.