BiiGOptitrackControl
..
|
#include <OptitrackTool.h>
Public Types | |
enum | OPTITRACK_TOOL_STATE { STATE_TOOL_NoState = -1, STATE_TOOL_Idle = 0, STATE_TOOL_Configurated = 1, STATE_TOOL_Attached = 2, STATE_TOOL_AttemptingToReadTxtFile = 10, STATE_TOOL_AttemptingToGetIDnext = 11, STATE_TOOL_AttemptingToDettachTrackable = 12, STATE_TOOL_AttemptingToEnableTrackable = 13, STATE_TOOL_AttemptingToDisableTrackable = 14, STATE_TOOL_AttemptingToAttachTrackable = 15, STATE_TOOL_AttemptingToUpdateTrackable = 16, STATE_TOOL_AttemptingToReadXmlFile = 17 } |
Definition of the states for the machine behaviour. More... | |
enum | OPTITRACK_TOOL_EVENT { EVENT_TOOL_NoEvent = -1 } |
Events that the class can launch NOT USED. More... | |
Public Member Functions | |
BiiGOptitrackControlClassMacro (Optitrack::OptitrackTool, itk::Object) | |
itkNewMacro (Self) | |
ResultType | ConfigureToolByTxtFile (std::string nameFile) |
Different options for the result of the functions. More... | |
ResultType | ConfigureToolByXmlFile (std::string nameFile) |
Tool configuration by .xml file. More... | |
int | GetIDnext (void) |
ResultType | AttachTrackable (void) |
Trackable attachment. More... | |
ResultType | DettachTrackable (void) |
Trackable detachment. More... | |
vnl_vector_fixed< double, 3 > | GetPosition (void) |
Get tool position. More... | |
vnl_quaternion< double > | GetOrientation (void) |
Get tool orientation. More... | |
vnl_matrix< double > | GetTransformMatrix (void) |
Get tool transformation matrix. More... | |
bool | IsTracked (void) |
Check if a tool is being tracked. More... | |
bool | IsDataValid (void) const |
Returns true if the current position data is valid(no error during tracking, tracking error below threshold, ...) More... | |
void | SetDataValid (bool validate) |
Set data validity. More... | |
ResultType | UpdateTool (void) |
Update tool. More... | |
itkSetMacro (ToolName, std::string) | |
Sets the tool Name. More... | |
itkGetMacro (ToolName, std::string) | |
Gets the tool Name. More... | |
itkSetMacro (NumberOfMarkers, unsigned int) | |
Sets the tool NumberOfMarkers. More... | |
itkGetMacro (NumberOfMarkers, unsigned int) | |
Gets the tool NumberOfMarkers. More... | |
itkSetMacro (NumberOfSeenMarkers, unsigned int) | |
Sets the tool NumberOfSeenMarkers. More... | |
itkGetMacro (NumberOfSeenMarkers, unsigned int) | |
Gets the tool NumberOfSeenMarkers. More... | |
itkSetMacro (FileConfiguration, std::string) | |
Sets the tool FileConfiguration. More... | |
itkGetMacro (FileConfiguration, std::string) | |
Gets the tool FileConfiguration. More... | |
itkGetMacro (OptitrackID, int) | |
Gets the tool m_OptitrackID. More... | |
OPTITRACK_TOOL_STATE | GetState (void) |
Gets the tool State. More... | |
Protected Member Functions | |
OptitrackTool () | |
~OptitrackTool () | |
OptitrackTool (const OptitrackTool &) | |
const OptitrackTool & | operator= (const OptitrackTool &) |
void | SetState (OPTITRACK_TOOL_STATE state_) |
Sets the tool State. More... | |
ResultType | SetPosition (vnl_vector_fixed< double, 3 > position) |
Set tool position. More... | |
ResultType | SetOrientation (vnl_quaternion< double > orientation) |
Set tool orientation. More... | |
ResultType | SetTransformMatrix (vnl_matrix< double > transform) |
Set tool transformation matrix. More... | |
bool | IsIndeterminateValue (const float pV) |
Check indetermination. More... | |
bool | IsInfiniteValue (const float pV) |
Check infinite value. More... | |
void | ConvertMatrix (vnl_matrix< double > &R, vnl_vector_fixed< double, 3 > position, vnl_quaternion< double > orientation) |
Creates tool transformation matrix. More... | |
Friends | |
class | OptitrackTracker |
Definition of the states for the machine behaviour.
|
protected |
|
protected |
|
protected |
ResultType Optitrack::OptitrackTool::AttachTrackable | ( | void | ) |
Trackable attachment.
This function adds an individual rigid body from the list of tracked rigid bodies.
Optitrack::OptitrackTool::BiiGOptitrackControlClassMacro | ( | Optitrack::OptitrackTool | , |
itk::Object | |||
) |
ResultType Optitrack::OptitrackTool::ConfigureToolByTxtFile | ( | std::string | nameFile | ) |
Different options for the result of the functions.
Tool configuration by .txt file.
typedef enum { FAILURE = 0, SUCCESS = 1 } ResultType;
This function configures a tool from a given ".txt" file.
nameFile | the .txt configuration file path. |
ResultType Optitrack::OptitrackTool::ConfigureToolByXmlFile | ( | std::string | nameFile | ) |
Tool configuration by .xml file.
This function configures a tool from a given ".xml" file.
nameFile | [: the .xml configuration file path. |
|
protected |
Creates tool transformation matrix.
This function creates the tool transformation matrix from position and orientation data.
R | [vnl_matrix<double>]: transformation matrix. |
position | [vnl_vector_fixed<double, 3>]: position of the tool. |
orientation | [vnl_quaternion<double>]: orientation of the tool. |
ResultType Optitrack::OptitrackTool::DettachTrackable | ( | void | ) |
Trackable detachment.
This function removes an individual rigid body from the list of tracked rigid bodies.
int Optitrack::OptitrackTool::GetIDnext | ( | void | ) |
vnl_quaternion< double > Optitrack::OptitrackTool::GetOrientation | ( | void | ) |
Get tool orientation.
This function gets the tool orientation.
vnl_vector_fixed< double, 3 > Optitrack::OptitrackTool::GetPosition | ( | void | ) |
Get tool position.
This function gets the tool position.
OptitrackTool::OPTITRACK_TOOL_STATE Optitrack::OptitrackTool::GetState | ( | void | ) |
Gets the tool State.
Get OptiTrack tool state..
This function gets the state of a tool.
vnl_matrix< double > Optitrack::OptitrackTool::GetTransformMatrix | ( | void | ) |
Get tool transformation matrix.
This function gets the tool transformation matrix.
bool Optitrack::OptitrackTool::IsDataValid | ( | void | ) | const |
Returns true if the current position data is valid(no error during tracking, tracking error below threshold, ...)
Check if tool data is valid.
This function checks if tool data is valid.
|
protected |
Check indetermination.
This function checks if a given float number is an indeterminate value.
|
protected |
Check infinite value.
This function checks if a given float number is an infinite value.
bool Optitrack::OptitrackTool::IsTracked | ( | void | ) |
Check if a tool is being tracked.
This function returns information about whether the selected rigid body is found in the current frame.
Optitrack::OptitrackTool::itkGetMacro | ( | ToolName | , |
std::string | |||
) |
Gets the tool Name.
Optitrack::OptitrackTool::itkGetMacro | ( | NumberOfMarkers | , |
unsigned | int | ||
) |
Gets the tool NumberOfMarkers.
Optitrack::OptitrackTool::itkGetMacro | ( | NumberOfSeenMarkers | , |
unsigned | int | ||
) |
Gets the tool NumberOfSeenMarkers.
Optitrack::OptitrackTool::itkGetMacro | ( | FileConfiguration | , |
std::string | |||
) |
Gets the tool FileConfiguration.
Optitrack::OptitrackTool::itkGetMacro | ( | OptitrackID | , |
int | |||
) |
Gets the tool m_OptitrackID.
Optitrack::OptitrackTool::itkNewMacro | ( | Self | ) |
Optitrack::OptitrackTool::itkSetMacro | ( | ToolName | , |
std::string | |||
) |
Sets the tool Name.
Optitrack::OptitrackTool::itkSetMacro | ( | NumberOfMarkers | , |
unsigned | int | ||
) |
Sets the tool NumberOfMarkers.
Optitrack::OptitrackTool::itkSetMacro | ( | NumberOfSeenMarkers | , |
unsigned | int | ||
) |
Sets the tool NumberOfSeenMarkers.
Optitrack::OptitrackTool::itkSetMacro | ( | FileConfiguration | , |
std::string | |||
) |
Sets the tool FileConfiguration.
|
protected |
void Optitrack::OptitrackTool::SetDataValid | ( | bool | validate | ) |
Set data validity.
This function sets tool data validity.
validate | [bool]: boolean indicating data validity to be set. |
|
protected |
Set tool orientation.
This function sets a given orientation to the tool.
|
protected |
Set tool position.
This function sets a given position to the tool.
|
protected |
Sets the tool State.
Set OptiTrack tool state.
This function sets a given state to the tool.
|
protected |
Set tool transformation matrix.
This function sets a given transformation matrix to the tool.
ResultType Optitrack::OptitrackTool::UpdateTool | ( | void | ) |
Update tool.
This function updates the tool: getting the position, orientation, and setting the transformation matrix.
|
friend |