IGSTK
igstkTrackerToolObserverToOpenIGTLinkRelay.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkTrackerToolObserverToOpenIGTLinkRelay.h,v $
5  Language: C++
6  Date: $Date: 2010-12-01 15:08:27 $
7  Version: $Revision: 1.4 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __igstkTrackerToolObserverToOpenIGTLinkRelay_h
19 #define __igstkTrackerToolObserverToOpenIGTLinkRelay_h
20 
21 #include "igstkObject.h"
22 #include "igstkMacros.h"
23 #include "igstkStateMachine.h"
24 #include "igstkTrackerTool.h"
25 
26 #include "igtlOSUtil.h"
27 #include "igtlTransformMessage.h"
28 #include "igtlClientSocket.h"
29 
30 
31 namespace igstk
32 {
41 {
42 
43 public:
44 
47 
48 public:
49 
50  void RequestSetPort( int port );
51 
52  void RequestSetHostName( const char * hostname );
53 
54  void RequestSetDeviceName( const char * devicename );
55 
56  void RequestSetTrackerTool( const TrackerTool * tracker );
57 
58  void RequestStart();
59 
60 protected:
61 
65 
67 
69  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
70 
72  itk::Object * caller, const itk::EventObject & event );
73 
74  typedef itk::MemberCommand< TrackerToolObserverToOpenIGTLinkRelay >
76 
77 
78 private:
79 
80  ObserverType::Pointer m_Observer;
81 
82  TrackerTool::ConstPointer m_TrackerTool;
83 
84  vtkMatrix4x4 * m_Matrix;
85 
86  unsigned int m_Tag;
87 
88  int m_Port;
89 
90  std::string m_HostName;
91 
92  igtl::ClientSocket::Pointer m_Socket;
93 
94  igtl::TransformMessage::Pointer m_TransformMessage;
95 
96 };
97 
98 } // end of namespace igstk
99 
100 #endif //__igstk_TrackerToolObserverToOpenIGTLinkRelay_h_