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 doublecalculateFromAllMoments(org.anchoranalysis.math.statistics.moment.ImageMoments moments)Calculates the feature value from theImageMoments.protected abstract doublecalculateFromSpecificMoment(org.anchoranalysis.math.statistics.moment.EigenvalueAndVector moment)Calculates the result for the specific moment identified by index.intgetIndex()Specifies which principal-axis to use for calculations (0=largest eigenvalue, 1=second-largest eigenvalue etc.)voidsetIndex(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, setValueIfTooFewVoxelsMethods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
inputTypeMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
-
Constructor Details
-
SpecificAxisBase
public SpecificAxisBase()
-
-
Method Details
-
calculateFromAllMoments
protected double calculateFromAllMoments(org.anchoranalysis.math.statistics.moment.ImageMoments moments) throws org.anchoranalysis.feature.calculate.FeatureCalculationExceptionDescription copied from class:ImageMomentsBaseCalculates the feature value from theImageMoments.- Specified by:
calculateFromAllMomentsin classImageMomentsBase- Parameters:
moments- theImageMomentsto 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.FeatureCalculationExceptionCalculates the result for the specific moment identified by index.- Parameters:
moment- theEigenvalueAndVectorfor 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.)
-