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 double
calculateFromAllMoments
(ImageMoments moments) Calculates the feature value from theImageMoments
.protected abstract double
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
-
Constructor Details
-
SpecificAxisBase
public SpecificAxisBase()
-
-
Method Details
-
calculateFromAllMoments
Description copied from class:ImageMomentsBase
Calculates the feature value from theImageMoments
.- Specified by:
calculateFromAllMoments
in classImageMomentsBase
- Parameters:
moments
- theImageMoments
to 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
- theEigenvalueAndVector
for 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.)
-