Class CalculateLevelBase

Object
AnchorBean<VoxelScore>
InitializableBean<VoxelScore, ImageInitialization>
ImageBean<VoxelScore>
VoxelScore
SingleChannel
CalculateLevelBase
Direct Known Subclasses:
CalculateLevel, DifferenceCalculateLevelStandardDeviation

public abstract class CalculateLevelBase extends SingleChannel
Base class for calculating a score based on a threshold level derived from a histogram.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    beforeCalcSetup(Histogram histogram, int level)
    Performs setup operations before calculation.
    protected abstract double
    calculateForVoxel(int voxelIntensity, int level)
    Calculates a score for a single voxel based on its intensity and the threshold level.
    protected double
    deriveScoreFromVoxel(int voxelIntensity)
    Derives a score from a single voxel intensity.
    CalculateLevel
    The method to calculate the threshold level.
    int
    The index of the histogram channel to use for calculations.
    void
    initialize(List<Histogram> histograms, Optional<Dictionary> dictionary)
     
    void
    setCalculateLevel(CalculateLevel calculateLevel)
    The method to calculate the threshold level.
    void
    setHistogramChannelIndex(int histogramChannelIndex)
    The index of the histogram channel to use for calculations.

    Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.score.SingleChannel

    calculate, getEnergyChannelIndex, setEnergyChannelIndex

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

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

    • CalculateLevelBase

      public CalculateLevelBase()
  • Method Details

    • initialize

      public void initialize(List<Histogram> histograms, Optional<Dictionary> dictionary) throws InitializeException
      Overrides:
      initialize in class VoxelScore
      Throws:
      InitializeException
    • deriveScoreFromVoxel

      protected double deriveScoreFromVoxel(int voxelIntensity)
      Description copied from class: SingleChannel
      Derives a score from a single voxel intensity.
      Specified by:
      deriveScoreFromVoxel in class SingleChannel
      Parameters:
      voxelIntensity - the intensity of the voxel in the specified energy channel
      Returns:
      the calculated score for the voxel
    • beforeCalcSetup

      protected abstract void beforeCalcSetup(Histogram histogram, int level) throws OperationFailedException
      Performs setup operations before calculation.
      Parameters:
      histogram - the Histogram to use for setup
      level - the calculated threshold level
      Throws:
      OperationFailedException - if the setup operation fails
    • calculateForVoxel

      protected abstract double calculateForVoxel(int voxelIntensity, int level)
      Calculates a score for a single voxel based on its intensity and the threshold level.
      Parameters:
      voxelIntensity - the intensity of the voxel
      level - the threshold level
      Returns:
      a score for the voxel
    • getCalculateLevel

      public CalculateLevel getCalculateLevel()
      The method to calculate the threshold level.
    • setCalculateLevel

      public void setCalculateLevel(CalculateLevel calculateLevel)
      The method to calculate the threshold level.
    • getHistogramChannelIndex

      public int getHistogramChannelIndex()
      The index of the histogram channel to use for calculations.
    • setHistogramChannelIndex

      public void setHistogramChannelIndex(int histogramChannelIndex)
      The index of the histogram channel to use for calculations.