T
- feature-input type.public abstract class WithResolutionBase<T extends FeatureInputWithResolution> extends FeatureUnaryGeneric<T>
Modifier | Constructor and Description |
---|---|
|
WithResolutionBase() |
protected |
WithResolutionBase(Feature<T> feature) |
Modifier and Type | Method and Description |
---|---|
double |
calculate(FeatureCalculationInput<T> input)
Calculates a value for some input.
|
protected abstract double |
calculateWithResolution(double value,
Resolution resolution) |
boolean |
isAcceptMissingResolution()
Whether to throw an exception (if true) if image-resolution is missing, or return
Double.Nan (if false). |
void |
setAcceptMissingResolution(boolean acceptMissingResolution)
Whether to throw an exception (if true) if image-resolution is missing, or return
Double.Nan (if false). |
getItem, inputType, setItem
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
public final double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
Feature
calculate
in class Feature<T extends FeatureInputWithResolution>
input
- the input to the calculation.FeatureCalculationException
- if the calculation cannot successfully complete.protected abstract double calculateWithResolution(double value, Resolution resolution) throws FeatureCalculationException
FeatureCalculationException
public boolean isAcceptMissingResolution()
Double.Nan
(if false).public void setAcceptMissingResolution(boolean acceptMissingResolution)
Double.Nan
(if false).Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.