public class DistancePhysical extends UnitValueDistance
UnitValueDistance
that specifies a value in physical units, as
described by particular recognized strings.
See SpatialUnits
for the recognized strings.
Constructor and Description |
---|
DistancePhysical() |
Modifier and Type | Method and Description |
---|---|
String |
getUnitType()
A string indicating type of units to use, as per
SpatialUnits . |
double |
getValue()
The value in units of type
unitType . |
double |
resolve(Optional<UnitConverter> unitConverter,
DirectionVector direction)
Resolves the distance using a
DirectionVector . |
void |
setUnitType(String unitType)
A string indicating type of units to use, as per
SpatialUnits . |
void |
setValue(double value)
The value in units of type
unitType . |
resolve, resolve, resolveForAxis
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public double resolve(Optional<UnitConverter> unitConverter, DirectionVector direction) throws OperationFailedException
UnitValueDistance
DirectionVector
.
The magnitude of the vector is ignored, using only the direction.
resolve
in class UnitValueDistance
unitConverter
- converts to/from voxels to physical units.direction
- the direction-vector.OperationFailedException
- if the resolution cannot successfully complete.public double getValue()
unitType
.public void setValue(double value)
unitType
.public String getUnitType()
SpatialUnits
.public void setUnitType(String unitType)
SpatialUnits
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.