Class CountEqual
Counts the number of voxels in an object that have a specific intensity value in a channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculateWithChannel
(ObjectMask object, Channel channel) Calculates the number of voxels in the object that have the specified intensity value in the channel.int
getValue()
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
-
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 classSpecificEnergyChannelBase
- Parameters:
object
- theObjectMask
defining the region of interestchannel
- theChannel
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 ofBinaryValuesInt
. -
setValue
public void setValue(int value) The intensity value to count. Defaults to the 'on' value ofBinaryValuesInt
.
-