PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusAtracsysCommand.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusAtracsysCommand_h
8 #define __vtkPlusAtracsysCommand_h
9 
10 #include "vtkPlusServerExport.h"
11 #include "vtkPlusCommand.h"
12 
14 
21 class vtkPlusServerExport vtkPlusAtracsysCommand : public vtkPlusCommand
22 {
23 public:
24 
25  static vtkPlusAtracsysCommand* New();
27  virtual void PrintSelf(ostream& os, vtkIndent indent);
28  virtual vtkPlusCommand* Clone() { return New(); }
29 
31  virtual PlusStatus Execute();
32 
34  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* aConfig);
35 
37  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* aConfig);
38 
40  virtual void GetCommandNames(std::list<std::string>& cmdNames);
41 
43  virtual std::string GetDescription(const std::string& commandName);
44 
46  vtkGetStdStringMacro(AtracsysDeviceId);
47  vtkSetStdStringMacro(AtracsysDeviceId);
48 
49  void SetNameToSetUsParameter();
50 
51 protected:
52  vtkPlusAtracsysTracker* GetAtracsysDevice();
53 
55  virtual ~vtkPlusAtracsysCommand();
56 
57 protected:
58  std::string AtracsysDeviceId;
59 
60  // list of commands to execute
61  std::map<std::string, std::string> CommandList;
62 
63  // list of ToolId, geometry file pairs to add
64  std::map<std::string, std::string> Markers;
65 
66  // list of ToolIds to enable / disable
67  std::map<std::string, std::string> EnableDisableTools;
68 
69  // LED RGBF values to set
70  int LedR;
71  int LedG;
72  int LedB;
73  int LedFreq;
74 
75  // helper to convert string to boolean
76  PlusStatus StringToBool(std::string strVal, bool& boolVal);
77 
79  void operator=(const vtkPlusAtracsysCommand&);
80 };
81 
82 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual std::string GetDescription(const std::string &commandName)=0
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *aConfig)
std::map< std::string, std::string > Markers
virtual PlusStatus Execute()=0
This is an abstract superclass for commands in the OpenIGTLink network interface for Plus.
igsioStatus PlusStatus
Definition: PlusCommon.h:40
vtkGetStdStringMacro(Name)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig)
vtkSetStdStringMacro(Name)
virtual void GetCommandNames(std::list< std::string > &cmdNames)=0
std::map< std::string, std::string > CommandList
virtual vtkPlusCommand * Clone()
std::map< std::string, std::string > EnableDisableTools
This command allows OpenIGTLink commands to configure specific functionalities in the Atracsys device...
Interface to the Atracsys trackers This class talks with a Atracsys Tracker over the sTk Passive Trac...