Class DistancePhysical

All Implemented Interfaces:
Serializable

public class DistancePhysical
extends UnitValueDistance
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:
Serialized Form
  • Constructor Details

  • Method Details

    • resolve

      public double resolve​(Optional<UnitConverter> unitConverter, org.anchoranalysis.spatial.orientation.DirectionVector direction) throws OperationFailedException
      Description copied from class: UnitValueDistance
      Resolves the distance using a DirectionVector.

      The magnitude of the vector is ignored, using only the direction.

      Specified by:
      resolve in class UnitValueDistance
      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 type unitType.
    • setValue

      public void setValue​(double value)
      The value in units of type unitType.
    • getUnitType

      public String getUnitType()
      A string indicating type of units to use, as per SpatialUnits.
    • setUnitType

      public void setUnitType​(String unitType)
      A string indicating type of units to use, as per SpatialUnits.