Class OutlineKernelBase
- Direct Known Subclasses:
NumberNeighboringVoxels
,NumberVoxelsAtBorder
Base class for features that apply a kernel to the outline of an object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
Calculates a value for some input.protected abstract double
calculateWithParameters
(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack) Calculates the feature value using the specified parameters.boolean
isDo3D()
If true, applies the kernel in 3D; otherwise, applies it in 2D.boolean
If true, ignores voxels at the threshold when applying the kernel.boolean
If true, considers voxels outside the object at the threshold as part of the object.void
setDo3D
(boolean do3D) If true, applies the kernel in 3D; otherwise, applies it in 2D.void
setIgnoreAtThreshold
(boolean ignoreAtThreshold) If true, ignores voxels at the threshold when applying the kernel.void
setOutsideAtThreshold
(boolean outsideAtThreshold) If true, considers voxels outside the object at the threshold as part of the object.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
-
OutlineKernelBase
public OutlineKernelBase()
-
-
Method Details
-
calculate
protected double calculate(FeatureCalculationInput<FeatureInputSingleObject> input) throws FeatureCalculationException Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputSingleObject>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
calculateWithParameters
protected abstract double calculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack) throws FeatureCalculationExceptionCalculates the feature value using the specified parameters.- Parameters:
object
- theObjectMask
to calculate the feature onparameters
- theKernelApplicationParameters
for applying the kernelenergyStack
- a supplier for theEnergyStack
- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if the calculation fails
-
isOutsideAtThreshold
public boolean isOutsideAtThreshold()If true, considers voxels outside the object at the threshold as part of the object. -
setOutsideAtThreshold
public void setOutsideAtThreshold(boolean outsideAtThreshold) If true, considers voxels outside the object at the threshold as part of the object. -
isIgnoreAtThreshold
public boolean isIgnoreAtThreshold()If true, ignores voxels at the threshold when applying the kernel. -
setIgnoreAtThreshold
public void setIgnoreAtThreshold(boolean ignoreAtThreshold) If true, ignores voxels at the threshold when applying the kernel. -
isDo3D
public boolean isDo3D()If true, applies the kernel in 3D; otherwise, applies it in 2D. -
setDo3D
public void setDo3D(boolean do3D) If true, applies the kernel in 3D; otherwise, applies it in 2D.
-