Class BoundUnitless
- All Implemented Interfaces:
Serializable
A bound representing unitless values, where the minimum and maximum are not affected by
resolution.
This class extends BoundMinMax
to provide functionality for bounds that don't have a
specific unit or are not affected by image resolution.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with default minimum and maximum values.BoundUnitless
(double min, double max) Creates a new instance with specified minimum and maximum values.Creates a new instance by copying another BoundUnitless. -
Method Summary
Modifier and TypeMethodDescriptionA (maybe longer) description identifying the bean and perhaps its key parameters.Creates a duplicate of this bound.double
getMaxResolved
(Optional<Resolution> resolution, boolean do3D) Gets the resolved maximum value of the bound, considering resolution and dimensionality.double
getMinResolved
(Optional<Resolution> resolution, boolean do3D) Gets the resolved minimum value of the bound, considering resolution and dimensionality.double
size()
Calculates the size of the bound range.Methods inherited from class org.anchoranalysis.mpp.bean.bound.BoundMinMax
getDelegate, getMax, getMin, scale, setDelegate, setMax, setMin
Methods inherited from class org.anchoranalysis.mpp.bean.bound.MarkBounds
calculateMinMax
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
BoundUnitless
public BoundUnitless()Creates a new instance with default minimum and maximum values. -
BoundUnitless
public BoundUnitless(double min, double max) Creates a new instance with specified minimum and maximum values.- Parameters:
min
- the minimum valuemax
- the maximum value
-
BoundUnitless
Creates a new instance by copying another BoundUnitless.- Parameters:
src
- the source BoundUnitless to copy from
-
-
Method Details
-
describeBean
Description copied from class:AnchorBean
A (maybe longer) description identifying the bean and perhaps its key parameters.By default, it returns the same as
AnchorBean.getBeanName()
but beans can optionally override it- Overrides:
describeBean
in classBoundMinMax
- Returns:
- either the short-name of the bean, or a longer description
-
getMinResolved
Description copied from class:MarkBounds
Gets the resolved minimum value of the bound, considering resolution and dimensionality.- Specified by:
getMinResolved
in classMarkBounds
- Parameters:
resolution
- an optional resolution to consider when resolving the bounddo3D
- whether to consider 3D resolution (if available)- Returns:
- the resolved minimum value
-
getMaxResolved
Description copied from class:MarkBounds
Gets the resolved maximum value of the bound, considering resolution and dimensionality.- Specified by:
getMaxResolved
in classMarkBounds
- Parameters:
resolution
- an optional resolution to consider when resolving the bounddo3D
- whether to consider 3D resolution (if available)- Returns:
- the resolved maximum value
-
size
public double size()Calculates the size of the bound range.- Returns:
- the size of the range (max - min + 1)
-
duplicate
Description copied from class:Bound
Creates a duplicate of this bound.
-