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 doubleCalculates a value for some input.protected abstract doublecalculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack) Calculates the feature value using the specified parameters.booleanisDo3D()If true, applies the kernel in 3D; otherwise, applies it in 2D.booleanIf true, ignores voxels at the threshold when applying the kernel.booleanIf true, considers voxels outside the object at the threshold as part of the object.voidsetDo3D(boolean do3D) If true, applies the kernel in 3D; otherwise, applies it in 2D.voidsetIgnoreAtThreshold(boolean ignoreAtThreshold) If true, ignores voxels at the threshold when applying the kernel.voidsetOutsideAtThreshold(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
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, isInitializedMethods 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:FeatureCalculates a value for some input.- Specified by:
calculatein 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- theObjectMaskto calculate the feature onparameters- theKernelApplicationParametersfor 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.
-