Class PrincipalAxisOrientation

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

public class PrincipalAxisOrientation
extends SpecificAxisBase
An element from orientation of a principal-axis (as defined by Image Moments).
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    PrincipalAxisOrientation()  
  • Method Summary

    Modifier and Type Method Description
    protected double calculateFromSpecificMoment​(org.anchoranalysis.math.statistics.moment.EigenvalueAndVector moment)
    Calculates the result for the specific moment identified by index.
    protected String errorMessageIfTooFewPixels()
    Generates an error message when there are too few pixels to calculate moments.
    String getAxis()
    Which axis to read from (x,y,z)
    void setAxis​(String axis)
    Which axis to read from (x,y,z)

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

    calculateFromAllMoments, getIndex, setIndex

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

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

    • calculateFromSpecificMoment

      protected double calculateFromSpecificMoment​(org.anchoranalysis.math.statistics.moment.EigenvalueAndVector moment) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Description copied from class: SpecificAxisBase
      Calculates the result for the specific moment identified by index.
      Specified by:
      calculateFromSpecificMoment in class SpecificAxisBase
      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
    • errorMessageIfTooFewPixels

      protected String errorMessageIfTooFewPixels() throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Description copied from class: ImageMomentsBase
      Generates an error message when there are too few pixels to calculate moments.
      Specified by:
      errorMessageIfTooFewPixels in class ImageMomentsBase
      Returns:
      the error message as a String
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if generating the error message fails
    • getAxis

      public String getAxis()
      Which axis to read from (x,y,z)
    • setAxis

      public void setAxis​(String axis)
      Which axis to read from (x,y,z)