IGSTK
Public Types | Public Member Functions | Protected Member Functions | List of all members
igstk::PivotCalibrationFLTKWidget Class Reference

This class is a user interface (FLTK-based) for the pivot calibration class. More...

#include <igstkPivotCalibrationFLTKWidget.h>

Public Types

typedef PivotCalibrationFLTKWidget Self
typedef Fl_Group Superclass

Public Member Functions

virtual const char * GetNameOfClass () const
void SetLogger (LoggerType *logger)
 PivotCalibrationFLTKWidget (int x, int y, int w, int h, const char *label="")
 Constructor creating the widget at the specified x,y location with the given width, w, and height, h.
virtual ~PivotCalibrationFLTKWidget (void)
 Destructor for the widget.
void RequestInitialize (unsigned int n, igstk::TrackerTool::Pointer trackerTool)
 This method sets the number of transformations required for performing the pivot calibration, and the tool information.
void RequestSetDelay (unsigned int delayInSeconds)
 This method sets the delay in seconds between the moment the "Calibrate" button is pressed and the beginning of data acquisition.
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 overdetermined equation system used to perform pivot calibration.
unsigned long AddObserver (const itk::EventObject &event, itk::Command *command)
 Add an observer so that an outside class is notified of events.
unsigned long AddObserver (const itk::EventObject &event, itk::Command *command) const
void RemoveObserver (unsigned long observerID)

Protected Member Functions

LoggerType * GetLogger () const
 Set up variables, types and methods related to the Logger.

Detailed Description

This class is a user interface (FLTK-based) for the pivot calibration class.

This class provides a UI for performing pivot calibration (tool tip calibration). The class is responsible for acquisition of tracking data and computation of the pivot calibration. You set the specific tool and number of required transformations using the RequestInitialize() method. You can also set a delay before data acquisition starts using the RequestSetDelay() method. The class expects the tracker to be in tracking state. Once initialized pressing the "Calibrate" button will start data acquisition (after a user set delay) and perform calibration. Corresponding events are also generated for interested observers: PivotCalibration::InitializationSuccessEvent PivotCalibration::InitializationFailureEvent PivotCalibration::DataAcquisitionStartEvent PivotCalibration::DataAcquisitionEvent - contains the percentage of data acquired PivotCalibration::DataAcquisitionEndEvent PivotCalibration::CalibrationSuccessEvent PivotCalibration::CalibrationFailureEvent igstk::CoordinateSystemTransformToEvent - contains the calibration transform igstk::PointEvent - contains the pivot point igstk::DoubleTypeEvent - contains the calibration root mean square error

NOTE: DataAcquisitionEvent is a descendant of DoubleTypeEvent so if you are observing both of them with the same observer you need to carefully identify them (when checking which event occurred check for DataAcquisitionEvent and only after that for DoubleTypeEvent, similar to the situation encountered when catching multiple exceptions from the same inheritance hierarchy).

Definition at line 71 of file igstkPivotCalibrationFLTKWidget.h.

Member Typedef Documentation

Definition at line 75 of file igstkPivotCalibrationFLTKWidget.h.

Definition at line 76 of file igstkPivotCalibrationFLTKWidget.h.

Constructor & Destructor Documentation

igstk::PivotCalibrationFLTKWidget::PivotCalibrationFLTKWidget ( int  x,
int  y,
int  w,
int  h,
const char *  label = "" 
)

Constructor creating the widget at the specified x,y location with the given width, w, and height, h.

An optional label argument for the widget can also be given.

virtual igstk::PivotCalibrationFLTKWidget::~PivotCalibrationFLTKWidget ( void  )
virtual

Destructor for the widget.

Member Function Documentation

virtual const char* igstk::PivotCalibrationFLTKWidget::GetNameOfClass ( ) const
virtual
LoggerType* igstk::PivotCalibrationFLTKWidget::GetLogger ( ) const
protected

Set up variables, types and methods related to the Logger.

void igstk::PivotCalibrationFLTKWidget::SetLogger ( LoggerType *  logger)
void igstk::PivotCalibrationFLTKWidget::RequestInitialize ( unsigned int  n,
igstk::TrackerTool::Pointer  trackerTool 
)

This method sets the number of transformations required for performing the pivot calibration, and the tool information.

It is assumed that the tracker is already in tracking mode. If the initialization fails a message box will be displayed. The method generates two events: InitializationSuccessEvent and InitializationFailureEvent.

void igstk::PivotCalibrationFLTKWidget::RequestSetDelay ( unsigned int  delayInSeconds)

This method sets the delay in seconds between the moment the "Calibrate" button is pressed and the beginning of data acquisition.

void igstk::PivotCalibrationFLTKWidget::RequestCalibrationTransform ( )

This method is used to request the calibration transformation.

The method should only be invoked after a successful calibration. It generates two events: CoordinateSystemTransformToEvent, and TransformNotAvailableEvent, respectively denoting that a calibration transform is and isn't available.

void igstk::PivotCalibrationFLTKWidget::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::PivotCalibrationFLTKWidget::RequestCalibrationRMSE ( )

This method is used to request the Root Mean Square Error (RMSE) of the overdetermined equation system used to perform pivot calibration.

It generates two events: DoubleTypeEvent, and InvalidRequestErrorEvent, respectively denoting that the RMSE is and isn't available.

See Also
PivotCalibrationAlgorithm
unsigned long igstk::PivotCalibrationFLTKWidget::AddObserver ( const itk::EventObject &  event,
itk::Command *  command 
)

Add an observer so that an outside class is notified of events.

unsigned long igstk::PivotCalibrationFLTKWidget::AddObserver ( const itk::EventObject &  event,
itk::Command *  command 
) const
void igstk::PivotCalibrationFLTKWidget::RemoveObserver ( unsigned long  observerID)

The documentation for this class was generated from the following file: