Class SpecificAxisBase
- Direct Known Subclasses:
PrincipalAxisLength,PrincipalAxisOrientation
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculateFromAllMoments(ImageMoments moments) Calculates the feature value from theImageMoments.protected abstract doubleCalculates 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, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
SpecificAxisBase
public SpecificAxisBase()
-
-
Method Details
-
calculateFromAllMoments
Description 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:
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- theEigenvalueAndVectorfor 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.)
-