Class UnitValueDistance

Object
AnchorBean<UnitValueDistance>
UnitValueDistance
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DistancePhysical, DistanceVoxels

public abstract class UnitValueDistance extends AnchorBean<UnitValueDistance> implements Serializable
Base class for methods to specify a distance along a vector in an image.
Author:
Owen Feehan
See Also:
  • Constructor Details

    • UnitValueDistance

      public UnitValueDistance()
  • Method Details

    • resolve

      public double resolve(Optional<UnitConverter> unitConverter, Point3d point1, Point3d point2) throws OperationFailedException
      Resolves the distance using the direction between two points of type Point3d.

      The magnitude of the distance between the two points is ignored, only the direction.

      See resolve(Optional, Point3i, Point3i) for a Point3i equivalent.

      Parameters:
      unitConverter - converts to/from voxels to physical units.
      point1 - the first point for the direction.
      point2 - the second point for the direction.
      Returns:
      the distance in units of voxels.
      Throws:
      OperationFailedException - if the resolution cannot successfully complete.
    • resolve

      public double resolve(Optional<UnitConverter> unitConverter, Point3i point1, Point3i point2) throws OperationFailedException
      Resolves the distance using the direction between two points of type Point3i.

      The magnitude of the distance between the two points is ignored, only the direction.

      See resolve(Optional, Point3d, Point3d) for a Point3d equivalent.

      Parameters:
      unitConverter - converts to/from voxels to physical units.
      point1 - the first point for the direction.
      point2 - the second point for the direction.
      Returns:
      the distance in units of voxels.
      Throws:
      OperationFailedException - if the resolution cannot successfully complete.
    • resolve

      public abstract double resolve(Optional<UnitConverter> unitConverter, DirectionVector direction) throws OperationFailedException
      Resolves the distance using a DirectionVector.

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

      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.
    • resolveForAxis

      public double resolveForAxis(Optional<UnitConverter> unitConverter, Axis axis) throws OperationFailedException
      Resolves the distance in a direction aligned to a particular axis.
      Parameters:
      unitConverter - converts to/from voxels to physical units.
      axis - axis to indicate direction.
      Returns:
      the distance in the direction of the axis in units of voxels.
      Throws:
      OperationFailedException - if the resolution cannot successfully complete.