Class IntensityMeanShellBase
- Direct Known Subclasses:
IntensityMeanShell
,IntensityMeanShellMaxSlice
Constructs a shell around an object-mask using a standard dilation and erosion process.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculateForChannel
(FeatureCalculationInput<FeatureInputSingleObject> input, Channel channel) Calculates the feature value for a specific channel in the energy stack.protected abstract double
calculateForShell
(ObjectMask shell, Channel channel) Calculates the feature value for the given shell and channel.void
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.A human-readable description of the parameterization of the bean.double
The value to return when the resulting object is empty.int
A channel of the energyStack that is used as an additional mask using default byte values for on and off.The number of dilations and erosions to apply and whether to do in the Z dimension.boolean
If true, calculates instead on the inverse of the object-mask (what's left when the shell is removed).boolean
If true, uses the inverse of the passed mask.void
setEmptyValue
(double emptyValue) The value to return when the resulting object is empty.void
setEnergyIndexMask
(int energyIndexMask) A channel of the energyStack that is used as an additional mask using default byte values for on and off.void
setInverse
(boolean inverse) If true, calculates instead on the inverse of the object-mask (what's left when the shell is removed).void
setInverseMask
(boolean inverseMask) If true, uses the inverse of the passed mask.void
setIterations
(MorphologicalIterations iterations) The number of dilations and erosions to apply and whether to do in the Z dimension.Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.single.intensity.FeatureEnergyChannel
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, 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
describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
IntensityMeanShellBase
public IntensityMeanShellBase()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<Feature<FeatureInputSingleObject>>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<FeatureInputSingleObject>
- Returns:
- the description.
-
calculateForChannel
protected double calculateForChannel(FeatureCalculationInput<FeatureInputSingleObject> input, Channel channel) throws FeatureCalculationException Description copied from class:FeatureEnergyChannel
Calculates the feature value for a specific channel in the energy stack.- Specified by:
calculateForChannel
in classFeatureEnergyChannel
- Parameters:
input
- theFeatureCalculationInput
containing theFeatureInputSingleObject
channel
- theChannel
from the energy stack to calculate the feature on- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if the calculation fails
-
calculateForShell
protected abstract double calculateForShell(ObjectMask shell, Channel channel) throws FeatureCalculationException Calculates the feature value for the given shell and channel.- Parameters:
shell
- theObjectMask
representing the shellchannel
- theChannel
to calculate the feature on- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if the calculation fails
-
getIterations
The number of dilations and erosions to apply and whether to do in the Z dimension. -
setIterations
The number of dilations and erosions to apply and whether to do in the Z dimension. -
isInverse
public boolean isInverse()If true, calculates instead on the inverse of the object-mask (what's left when the shell is removed). -
setInverse
public void setInverse(boolean inverse) If true, calculates instead on the inverse of the object-mask (what's left when the shell is removed). -
getEnergyIndexMask
public int getEnergyIndexMask()A channel of the energyStack that is used as an additional mask using default byte values for on and off. -
setEnergyIndexMask
public void setEnergyIndexMask(int energyIndexMask) A channel of the energyStack that is used as an additional mask using default byte values for on and off. -
isInverseMask
public boolean isInverseMask()If true, uses the inverse of the passed mask. -
setInverseMask
public void setInverseMask(boolean inverseMask) If true, uses the inverse of the passed mask. -
getEmptyValue
public double getEmptyValue()The value to return when the resulting object is empty. -
setEmptyValue
public void setEmptyValue(double emptyValue) The value to return when the resulting object is empty.
-