Class FromDimensionsBase<T extends org.anchoranalysis.feature.input.FeatureInputDimensions>

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<T>
org.anchoranalysis.plugin.image.feature.bean.dimensions.FromDimensionsBase<T>
Type Parameters:
T - feature-input-type that extends FeatureInputDimensions
Direct Known Subclasses:
Area, ForSpecificAxis, Volume

public abstract class FromDimensionsBase<T extends org.anchoranalysis.feature.input.FeatureInputDimensions>
extends org.anchoranalysis.feature.bean.Feature<T>
Base class for features that are calculated from Dimensions.
  • Constructor Summary

    Constructors 
    Constructor Description
    FromDimensionsBase()  
  • Method Summary

    Modifier and Type Method Description
    double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<T> input)  
    protected abstract double calculateFromDimensions​(org.anchoranalysis.image.core.dimensions.Dimensions dimensions)
    Calculates a feature value from the given dimensions.
    Class<? extends org.anchoranalysis.feature.input.FeatureInput> 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

    • calculate

      public double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<T> input) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Specified by:
      calculate in class org.anchoranalysis.feature.bean.Feature<T extends org.anchoranalysis.feature.input.FeatureInputDimensions>
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException
    • inputType

      public Class<? extends org.anchoranalysis.feature.input.FeatureInput> inputType()
      Specified by:
      inputType in class org.anchoranalysis.feature.bean.Feature<T extends org.anchoranalysis.feature.input.FeatureInputDimensions>
    • calculateFromDimensions

      protected abstract double calculateFromDimensions​(org.anchoranalysis.image.core.dimensions.Dimensions dimensions) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Calculates a feature value from the given dimensions.
      Parameters:
      dimensions - the Dimensions to calculate from
      Returns:
      the calculated feature value
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails