Class SpecificAxisBase

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.moments.ImageMomentsBase
org.anchoranalysis.plugin.image.feature.bean.object.single.moments.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
    SpecificAxisBase()  
  • Method Summary

    Modifier and Type Method Description
    protected double calculateFromAllMoments​(org.anchoranalysis.math.statistics.moment.ImageMoments moments)
    Calculates the feature value from the ImageMoments.
    protected abstract double calculateFromSpecificMoment​(org.anchoranalysis.math.statistics.moment.EigenvalueAndVector moment)
    Calculates the result for the specific moment identified by index.
    int getIndex()
    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

  • Method Details

    • calculateFromAllMoments

      protected double calculateFromAllMoments​(org.anchoranalysis.math.statistics.moment.ImageMoments moments) throws org.anchoranalysis.feature.calculate.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:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails
    • calculateFromSpecificMoment

      protected abstract double calculateFromSpecificMoment​(org.anchoranalysis.math.statistics.moment.EigenvalueAndVector moment) throws org.anchoranalysis.feature.calculate.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:
      org.anchoranalysis.feature.calculate.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.)