Class SpecificAxisBase

Object
AnchorBean<Feature<FeatureInputSingleObject>>
InitializableBean<Feature<FeatureInputSingleObject>, FeatureInitialization>
Feature<FeatureInputSingleObject>
FeatureSingleObject
ImageMomentsBase
SpecificAxisBase
Direct Known Subclasses:
PrincipalAxisLength, PrincipalAxisOrientation

public abstract class SpecificAxisBase extends ImageMomentsBase
A feature based on one specific principal-axis as identified by image moments.

Principal axes are ordered by eigen-value, with 0 being the largest, 1 being the second-largest etc.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    calculateFromAllMoments(ImageMoments moments)
    Calculates the feature value from the ImageMoments.
    protected abstract double
    calculateFromSpecificMoment(EigenvalueAndVector moment)
    Calculates the result for the specific moment identified by index.
    int
    Specifies which principal-axis to use for calculations (0=largest eigenvalue, 1=second-largest eigenvalue etc.)
    void
    setIndex(int index)
    Specifies which principal-axis to use for calculations (0=largest eigenvalue, 1=second-largest eigenvalue etc.)

    Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.single.moments.ImageMomentsBase

    calculate, errorMessageIfTooFewPixels, getValueIfTooFewVoxels, isSuppressZ, setSuppressZ, setValueIfTooFewVoxels

    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, describeParameters, 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

    checkMisconfigured, 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

    • SpecificAxisBase

      public SpecificAxisBase()
  • Method Details

    • calculateFromAllMoments

      protected double calculateFromAllMoments(ImageMoments moments) throws FeatureCalculationException
      Description copied from class: ImageMomentsBase
      Calculates the feature value from the ImageMoments.
      Specified by:
      calculateFromAllMoments in class ImageMomentsBase
      Parameters:
      moments - the ImageMoments to use for calculation
      Returns:
      the calculated feature value
      Throws:
      FeatureCalculationException - if the calculation fails
    • calculateFromSpecificMoment

      protected abstract double calculateFromSpecificMoment(EigenvalueAndVector moment) throws FeatureCalculationException
      Calculates the result for the specific moment identified by index.
      Parameters:
      moment - the EigenvalueAndVector for the specific moment
      Returns:
      the calculated result as a Double
      Throws:
      FeatureCalculationException - if the calculation fails
    • getIndex

      public int getIndex()
      Specifies which principal-axis to use for calculations (0=largest eigenvalue, 1=second-largest eigenvalue etc.)
    • setIndex

      public void setIndex(int index)
      Specifies which principal-axis to use for calculations (0=largest eigenvalue, 1=second-largest eigenvalue etc.)