Class FeatureCalculatorFromProvider<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>
Object
org.anchoranalysis.plugin.image.task.feature.calculator.FeatureCalculatorFromProvider<T>
- Type Parameters:
T- feature-input-type extendingFeatureInputEnergy
public class FeatureCalculatorFromProvider<T extends org.anchoranalysis.feature.input.FeatureInputEnergy> extends Object
Calculates feature or feature values.
Optionally, an energy-stack is added from either provider or the input-stack.
-
Constructor Summary
Constructors Constructor Description FeatureCalculatorFromProvider(org.anchoranalysis.image.io.stack.input.ProvidesStackInput stackInput, Optional<org.anchoranalysis.image.bean.provider.stack.StackProvider> stackEnergy, org.anchoranalysis.io.output.outputter.InputOutputContext context)Creates a newFeatureCalculatorFromProvider. -
Method Summary
Modifier and Type Method Description org.anchoranalysis.feature.calculate.bound.FeatureCalculatorMulti<T>calculatorForAll(org.anchoranalysis.feature.bean.list.FeatureList<T> features)Calculates all image-features in the feature-store.org.anchoranalysis.feature.calculate.bound.FeatureCalculatorSingle<T>calculatorSingleFromProvider(org.anchoranalysis.feature.bean.list.FeatureListProvider<T> provider, String providerName)Calculates a single-feature that comes from a provider (but can reference the other features from the store).org.anchoranalysis.feature.energy.EnergyStackgetEnergyStack()The energy stack used for feature calculations.
-
Constructor Details
-
FeatureCalculatorFromProvider
public FeatureCalculatorFromProvider(org.anchoranalysis.image.io.stack.input.ProvidesStackInput stackInput, Optional<org.anchoranalysis.image.bean.provider.stack.StackProvider> stackEnergy, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.core.exception.OperationFailedExceptionCreates a newFeatureCalculatorFromProvider.- Parameters:
stackInput- provides the input stackstackEnergy- optional provider for the energy stackcontext- the input-output context- Throws:
org.anchoranalysis.core.exception.OperationFailedException- if the initialization or energy stack creation fails
-
-
Method Details
-
calculatorSingleFromProvider
public org.anchoranalysis.feature.calculate.bound.FeatureCalculatorSingle<T> calculatorSingleFromProvider(org.anchoranalysis.feature.bean.list.FeatureListProvider<T> provider, String providerName) throws org.anchoranalysis.core.exception.OperationFailedExceptionCalculates a single-feature that comes from a provider (but can reference the other features from the store).- Parameters:
provider- the feature list providerproviderName- the name of the provider- Returns:
- a
FeatureCalculatorSinglefor the specified feature - Throws:
org.anchoranalysis.core.exception.OperationFailedException- if the feature calculation fails
-
calculatorForAll
public org.anchoranalysis.feature.calculate.bound.FeatureCalculatorMulti<T> calculatorForAll(org.anchoranalysis.feature.bean.list.FeatureList<T> features) throws org.anchoranalysis.core.exception.InitializeExceptionCalculates all image-features in the feature-store.- Parameters:
features- the list of features to calculate- Returns:
- a
FeatureCalculatorMultifor the specified features - Throws:
org.anchoranalysis.core.exception.InitializeException- if the calculator initialization fails
-
getEnergyStack
public org.anchoranalysis.feature.energy.EnergyStack getEnergyStack()The energy stack used for feature calculations.
-