This class implements the pivot calibration algorithm, locating a tools tip relative to a tracked coordinate system. More...
#include <igstkPivotCalibrationAlgorithm.h>
Public Types | |
typedef std::vector < TransformType > | TransformContainerType |
Public Member Functions | |
void | RequestAddTransform (const TransformType &t) |
This method adds the given transform to those used to perform the pivot calibration. | |
void | RequestAddTransforms (std::vector< TransformType > &t) |
This method adds the given transforms to those used to perform the pivot calibration. | |
void | RequestResetCalibration () |
This method resets the class to its initial state prior to computing a calibration (all user provided transformations are removed). | |
void | RequestComputeCalibration () |
This method performs the calibration. | |
void | RequestCalibrationTransform () |
This method is used to request the calibration transformation. | |
void | RequestPivotPoint () |
This method is used to request the pivot point, given in the coordinate system in which the user supplied transforms were given. | |
void | RequestCalibrationRMSE () |
This method is used to request the Root Mean Square Error (RMSE) of the linear equation system used to compute the pivot point and calibration transformation (RMSE of the vector Ax-b, see class description for more details). | |
void | RequestSetSingularValueThreshold (double threshold) |
This method sets the tolerance for the singular values of the matrix A below which they are considered to be zero. | |
igstkEventMacro (CalibrationFailureEvent, IGSTKEvent) | |
This event is generated if the pivot calibration computation fails. | |
igstkEventMacro (CalibrationSuccessEvent, IGSTKEvent) | |
This event is generated if the pivot calibration computation succeeds. | |
Public Attributes | |
igstkStandardClassTraitsMacro(PivotCalibrationAlgorithm, Object) typedef itk typedef igstk::Transform | TransformType |
Macro with standard traits declarations (Self, SuperClass, State Machine etc. | |
Static Public Attributes | |
static const double | DEFAULT_SINGULAR_VALUE_THRESHOLD |
Default threshold value under which singular values are considered to be zero. | |
Protected Member Functions | |
PivotCalibrationAlgorithm (void) | |
virtual | ~PivotCalibrationAlgorithm (void) |
void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Print the object information in a stream. |
This class implements the pivot calibration algorithm, locating a tools tip relative to a tracked coordinate system.
We are interested in the location of a tool's tip relative to a tracked coordinate system. By rotating the tool while its tip location remains fixed we compute both the tip location relative to the tracked coordinate system and the fixed point's coordinates in the tracker's coordinate system. Every transformation acquired by the tracker during the rotation yields three equations in six unknowns,
, with the unknown 3x1 vectors
and
. The solution is obtained in a least squares manner by acquiring multiple transformation while rotating the tool around its tip resulting in the following overdetermined equation system:
$ Which is solved using the pseudoinverse (singular value decomposition).
Definition at line 69 of file igstkPivotCalibrationAlgorithm.h.
typedef std::vector<TransformType> igstk::PivotCalibrationAlgorithm::TransformContainerType |
Definition at line 80 of file igstkPivotCalibrationAlgorithm.h.
igstk::PivotCalibrationAlgorithm::PivotCalibrationAlgorithm | ( | void | ) | [protected] |
virtual igstk::PivotCalibrationAlgorithm::~PivotCalibrationAlgorithm | ( | void | ) | [protected, virtual] |
void igstk::PivotCalibrationAlgorithm::RequestAddTransform | ( | const TransformType & | t | ) |
This method adds the given transform to those used to perform the pivot calibration.
The method should only be invoked before calibration is performed or after it has been reset or it will generate an InvalidRequestErrorEvent. NOTE: The transform is assumed to be valid.
void igstk::PivotCalibrationAlgorithm::RequestAddTransforms | ( | std::vector< TransformType > & | t | ) |
This method adds the given transforms to those used to perform the pivot calibration.
The method should only be invoked before calibration is performed or after it has been reset or it will generate an InvalidRequestErrorEvent. NOTE: The transforms are assumed to be valid.
void igstk::PivotCalibrationAlgorithm::RequestResetCalibration | ( | ) |
This method resets the class to its initial state prior to computing a calibration (all user provided transformations are removed).
void igstk::PivotCalibrationAlgorithm::RequestComputeCalibration | ( | ) |
This method performs the calibration.
It generates two events: CalibrationSuccessEvent, and CalibrationFailureEvent, denoting success or failure of the computation. Note that invoking this method prior to setting transfromations is considered valid, it will simply generate a CalibraitonFaliureEvent. In this way all sets of degenerate transformations are treated alike (empty set, data with low variability for example the same transform repeated many times).
void igstk::PivotCalibrationAlgorithm::RequestCalibrationTransform | ( | ) |
This method is used to request the calibration transformation.
The method should only be invoked after a successful calibration. It generates two events: CoordinateSystemTransformToResult, and TransformNotAvailableEvent, respectively denoting that a calibration transform is and isn't available.
void igstk::PivotCalibrationAlgorithm::RequestPivotPoint | ( | ) |
This method is used to request the pivot point, given in the coordinate system in which the user supplied transforms were given.
It generates two events: PointEvent, and InvalidRequestErrorEvent, respectively denoting that the pivot point is and isn't available.
void igstk::PivotCalibrationAlgorithm::RequestCalibrationRMSE | ( | ) |
This method is used to request the Root Mean Square Error (RMSE) of the linear equation system used to compute the pivot point and calibration transformation (RMSE of the vector Ax-b, see class description for more details).
It generates two events: DoubleTypeEvent, and InvalidRequestErrorEvent, respectively denoting that the RMSE is and isn't available.
void igstk::PivotCalibrationAlgorithm::RequestSetSingularValueThreshold | ( | double | threshold | ) |
This method sets the tolerance for the singular values of the matrix A below which they are considered to be zero.
The default setting is PivotCalibrationAlgorithm::DEFAULT_SINGULAR_VALUE_THRESHOLD . The solution exists only if rank(A)=6 (columns are linearly independent). The rank is evaluated using SVD(A) = USV^T, after zeroing out all singular values (diagonal entries of S) that are less than the tolerance.
igstk::PivotCalibrationAlgorithm::igstkEventMacro | ( | CalibrationFailureEvent | , | |
IGSTKEvent | ||||
) |
This event is generated if the pivot calibration computation fails.
igstk::PivotCalibrationAlgorithm::igstkEventMacro | ( | CalibrationSuccessEvent | , | |
IGSTKEvent | ||||
) |
This event is generated if the pivot calibration computation succeeds.
void igstk::PivotCalibrationAlgorithm::PrintSelf | ( | std::ostream & | os, | |
itk::Indent | indent | |||
) | const [protected, virtual] |
Print the object information in a stream.
Reimplemented from igstk::Object.
igstkStandardClassTraitsMacro ( PivotCalibrationAlgorithm, Object ) typedef itk typedef igstk::Transform igstk::PivotCalibrationAlgorithm::TransformType |
Macro with standard traits declarations (Self, SuperClass, State Machine etc.
).
Definition at line 76 of file igstkPivotCalibrationAlgorithm.h.
const double igstk::PivotCalibrationAlgorithm::DEFAULT_SINGULAR_VALUE_THRESHOLD [static] |
Default threshold value under which singular values are considered to be zero.
Definition at line 147 of file igstkPivotCalibrationAlgorithm.h.