Class SpecificEnergyChannelBase
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.FeatureInputSingleObject>
org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
org.anchoranalysis.plugin.image.feature.bean.object.single.energy.SpecificEnergyChannelBase
- Direct Known Subclasses:
CountEqual
public abstract class SpecificEnergyChannelBase
extends org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
A base class for features that operate on a specific channel from the energy stack.
-
Constructor Summary
Constructors Constructor Description SpecificEnergyChannelBase() -
Method Summary
Modifier and Type Method Description doublecalculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input)protected abstract doublecalculateWithChannel(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.core.channel.Channel channel)Calculates the feature value for a specific object and channel.intgetEnergyIndex()Index of which channel in the energy-stack to select.voidsetEnergyIndex(int energyIndex)Index of which channel in the energy-stack to select.Methods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
inputTypeMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
-
Constructor Details
-
SpecificEnergyChannelBase
public SpecificEnergyChannelBase()
-
-
Method Details
-
calculate
public double calculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input) throws org.anchoranalysis.feature.calculate.FeatureCalculationException- Specified by:
calculatein classorg.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException
-
calculateWithChannel
protected abstract double calculateWithChannel(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.core.channel.Channel channel) throws org.anchoranalysis.feature.calculate.FeatureCalculationExceptionCalculates the feature value for a specific object and channel.- Parameters:
object- theObjectMaskrepresenting the object of interestchannel- theChannelfrom the energy stack to calculate the feature on- Returns:
- the calculated feature value
- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException- if the calculation fails
-
getEnergyIndex
public int getEnergyIndex()Index of which channel in the energy-stack to select. 0 represents the first channel, 1 the second, and so on. -
setEnergyIndex
public void setEnergyIndex(int energyIndex)Index of which channel in the energy-stack to select. 0 represents the first channel, 1 the second, and so on.
-