Class UnitsWithinRange<T extends FeatureInputWithResolution>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
WithResolutionBase<T>
UnitsWithinRange<T>
- Type Parameters:
T
- feature input-type
Checks if a value lies within a range defined by units (a minimum and maximum boundary)
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculateWithResolution
(double value, Resolution resolution) Calculates the feature value using the provided value and resolution.A human-readable description of the parameterization of the bean.getMax()
Maximum-boundary for acceptable rangegetMin()
Minimum-boundary for acceptable rangedouble
Returned as a constant if a value lies otside the rangedouble
Returned as a constant if a value lies within the rangevoid
setMax
(UnitValueExtent max) Maximum-boundary for acceptable rangevoid
setMin
(UnitValueExtent min) Minimum-boundary for acceptable rangevoid
setOutside
(double outside) Returned as a constant if a value lies otside the rangevoid
setWithin
(double within) Returned as a constant if a value lies within the rangeMethods inherited from class org.anchoranalysis.image.feature.bean.physical.WithResolutionBase
calculate, isAcceptMissingResolution, setAcceptMissingResolution
Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItem
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, 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
-
UnitsWithinRange
public UnitsWithinRange()
-
-
Method Details
-
calculateWithResolution
protected double calculateWithResolution(double value, Resolution resolution) throws FeatureCalculationException Description copied from class:WithResolutionBase
Calculates the feature value using the provided value and resolution.- Specified by:
calculateWithResolution
in classWithResolutionBase<T extends FeatureInputWithResolution>
- Parameters:
value
- the input value to be used in the calculationresolution
- the resolution to be used in the calculation- Returns:
- the calculated feature value
- Throws:
FeatureCalculationException
- if an error occurs during calculation
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<T extends FeatureInputWithResolution>
- Returns:
- the description.
-
getWithin
public double getWithin()Returned as a constant if a value lies within the range -
setWithin
public void setWithin(double within) Returned as a constant if a value lies within the range -
getOutside
public double getOutside()Returned as a constant if a value lies otside the range -
setOutside
public void setOutside(double outside) Returned as a constant if a value lies otside the range -
getMin
Minimum-boundary for acceptable rangeWe default to volume as units, but it could also be area. It's arbitrary for 0-value.
-
setMin
Minimum-boundary for acceptable rangeWe default to volume as units, but it could also be area. It's arbitrary for 0-value.
-
getMax
Maximum-boundary for acceptable rangeWe default to volume as units, but it could also be area. It's arbitrary for infinity-value.
-
setMax
Maximum-boundary for acceptable rangeWe default to volume as units, but it could also be area. It's arbitrary for infinity-value.
-