Class NumberNeighboringVoxels
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.OutlineKernelBase
org.anchoranalysis.plugin.image.feature.bean.object.single.energy.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 NumberNeighboringVoxels() -
Method Summary
Modifier and Type Method Description protected doublecalculateWithParameters(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters parameters, org.anchoranalysis.core.functional.checked.CheckedSupplier<org.anchoranalysis.feature.energy.EnergyStack,org.anchoranalysis.feature.calculate.FeatureCalculationException> energyStack)Calculates the feature value using the specified parameters.intgetEnergyIndex()Index of which channel in the energy-stack to selectvoidsetEnergyIndex(int energyIndex)Index of which channel in the energy-stack to selectMethods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.single.OutlineKernelBase
calculate, isDo3D, isIgnoreAtThreshold, isOutsideAtThreshold, setDo3D, setIgnoreAtThreshold, setOutsideAtThresholdMethods 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
-
NumberNeighboringVoxels
public NumberNeighboringVoxels()
-
-
Method Details
-
calculateWithParameters
protected double calculateWithParameters(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters parameters, org.anchoranalysis.core.functional.checked.CheckedSupplier<org.anchoranalysis.feature.energy.EnergyStack,org.anchoranalysis.feature.calculate.FeatureCalculationException> energyStack) throws org.anchoranalysis.feature.calculate.FeatureCalculationExceptionDescription copied from class:OutlineKernelBaseCalculates the feature value using the specified parameters.- Specified by:
calculateWithParametersin classOutlineKernelBase- Parameters:
object- theObjectMaskto calculate the feature onparameters- theKernelApplicationParametersfor applying the kernelenergyStack- a supplier for theEnergyStack- 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 -
setEnergyIndex
public void setEnergyIndex(int energyIndex)Index of which channel in the energy-stack to select
-