Class CalculateLevel

Direct Known Subclasses:
CalculateLevelListBase, CalculateLevelUnary, Constant, Otsu, OtsuWeighted, Quantile

public abstract class CalculateLevel extends NullParametersBean<CalculateLevel>
Calculates a threshold-level from a histogram.

A well-behaved CalculateLevel should implements equals(java.lang.Object) and hashCode(). If this is not possible, these methods should instead throw a run-time exception.

Author:
Owen Feehan
  • Constructor Details

    • CalculateLevel

      protected CalculateLevel()
  • Method Details

    • calculateLevel

      public abstract int calculateLevel(Histogram histogram) throws OperationFailedException
      Determines a voxel intensity that can be used for thresholding.
      Parameters:
      histogram - a histogram of voxel-intensities from which a threshold-level can be derived.
      Returns:
      the threshold-level.
      Throws:
      OperationFailedException - if a level cannot be successfully calculated.
    • equals

      public abstract boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object