Class IntensityMeanShellBase

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.intensity.FeatureEnergyChannel
org.anchoranalysis.plugin.image.feature.bean.object.single.intensity.IntensityMeanShellBase
Direct Known Subclasses:
IntensityMeanShell, IntensityMeanShellMaxSlice

public abstract class IntensityMeanShellBase
extends FeatureEnergyChannel
Constructs a shell around an object-mask using a standard dilation and erosion process.
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    IntensityMeanShellBase()  
  • Method Summary

    Modifier and Type Method Description
    protected double calculateForChannel​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input, org.anchoranalysis.image.core.channel.Channel channel)
    Calculates the feature value for a specific channel in the energy stack.
    protected abstract double calculateForShell​(org.anchoranalysis.image.voxel.object.ObjectMask shell, org.anchoranalysis.image.core.channel.Channel channel)
    Calculates the feature value for the given shell and channel.
    void checkMisconfigured​(org.anchoranalysis.bean.BeanInstanceMap defaultInstances)  
    String describeParameters()  
    double getEmptyValue()
    The value to return when the resulting object is empty.
    int getEnergyIndexMask()
    A channel of the energyStack that is used as an additional mask using default byte values for on and off.
    MorphologicalIterations getIterations()
    The number of dilations and erosions to apply and whether to do in the Z dimension.
    boolean isInverse()
    If true, calculates instead on the inverse of the object-mask (what's left when the shell is removed).
    boolean isInverseMask()
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • checkMisconfigured

      public void checkMisconfigured​(org.anchoranalysis.bean.BeanInstanceMap defaultInstances) throws org.anchoranalysis.bean.exception.BeanMisconfiguredException
      Overrides:
      checkMisconfigured in class org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>>
      Throws:
      org.anchoranalysis.bean.exception.BeanMisconfiguredException
    • describeParameters

      public String describeParameters()
      Overrides:
      describeParameters in class org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>
    • calculateForChannel

      protected double calculateForChannel​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input, org.anchoranalysis.image.core.channel.Channel channel) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Description copied from class: FeatureEnergyChannel
      Calculates the feature value for a specific channel in the energy stack.
      Specified by:
      calculateForChannel in class FeatureEnergyChannel
      Parameters:
      input - the FeatureCalculationInput containing the FeatureInputSingleObject
      channel - the Channel from the energy stack to calculate the feature on
      Returns:
      the calculated feature value
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails
    • calculateForShell

      protected abstract double calculateForShell​(org.anchoranalysis.image.voxel.object.ObjectMask shell, org.anchoranalysis.image.core.channel.Channel channel) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Calculates the feature value for the given shell and channel.
      Parameters:
      shell - the ObjectMask representing the shell
      channel - the Channel to calculate the feature on
      Returns:
      the calculated feature value
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails
    • getIterations

      public MorphologicalIterations getIterations()
      The number of dilations and erosions to apply and whether to do in the Z dimension.
    • setIterations

      public void setIterations​(MorphologicalIterations iterations)
      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.