Class DistancePhysical
- All Implemented Interfaces:
Serializable
Implementation of
UnitValueDistance
that specifies a value in physical units, as
described by particular recognized strings.
See SpatialUnits
for the recognized strings.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA string indicating type of units to use, as perSpatialUnits
.double
getValue()
The value in units of typeunitType
.double
resolve
(Optional<UnitConverter> unitConverter, DirectionVector direction) Resolves the distance using aDirectionVector
.void
setUnitType
(String unitType) A string indicating type of units to use, as perSpatialUnits
.void
setValue
(double value) The value in units of typeunitType
.Methods inherited from class org.anchoranalysis.image.bean.unitvalue.distance.UnitValueDistance
resolve, resolve, resolveForAxis
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
DistancePhysical
public DistancePhysical()
-
-
Method Details
-
resolve
public double resolve(Optional<UnitConverter> unitConverter, DirectionVector direction) throws OperationFailedException Description copied from class:UnitValueDistance
Resolves the distance using aDirectionVector
.The magnitude of the vector is ignored, using only the direction.
- Specified by:
resolve
in classUnitValueDistance
- Parameters:
unitConverter
- converts to/from voxels to physical units.direction
- the direction-vector.- Returns:
- the distance in units of voxels.
- Throws:
OperationFailedException
- if the resolution cannot successfully complete.
-
getValue
public double getValue()The value in units of typeunitType
. -
setValue
public void setValue(double value) The value in units of typeunitType
. -
getUnitType
A string indicating type of units to use, as perSpatialUnits
. -
setUnitType
A string indicating type of units to use, as perSpatialUnits
.
-