Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkUSIGTLDevice.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKIGTLDevice_H_HEADER_INCLUDED_
18 #define MITKIGTLDevice_H_HEADER_INCLUDED_
19 
20 #include <mitkCommon.h>
21 #include <MitkUSExports.h>
22 #include <mitkUSDevice.h>
23 #include <mitkIGTLClient.h>
24 #include <mitkIGTLDeviceSource.h>
28 
29 namespace mitk
30 {
39  class MITKUS_EXPORT USIGTLDevice : public mitk::USDevice
40  {
41  public:
43  // To open a device (Manufacturer, Model, Hostname, Port, IsServer)
44  mitkNewMacro5Param(Self, std::string, std::string, std::string, int, bool);
45 
46  virtual std::string GetDeviceClass();
47  virtual USImageSource::Pointer GetUSImageSource();
48 
49  USIGTLDevice(std::string manufacturer, std::string model, std::string host,
50  int port, bool server);
51 
52  protected:
53  virtual bool OnInitialization();
54  virtual bool OnConnection();
55  virtual bool OnDisconnection();
56  virtual bool OnActivation();
57  virtual bool OnDeactivation();
58 
59  private:
60  std::string m_Host;
61  int m_Port;
64  mitk::IGTLTransformDeviceSource::Pointer m_TransformDeviceSource;
66  };
67 } // namespace mitk
68 
69 #endif // MITKIGTLDevice_H_HEADER_INCLUDED_
A device holds information about it's model, make and the connected probes. It is the common super cl...
Definition: mitkUSDevice.h:77
itk::SmartPointer< Self > Pointer
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
A mitk::USIGTLDevice is a USDevice to receive images over an OpenIGTLink connection. It registers an OIGTL device as a Microservice to receive image messages and transforms them to mitk::Images. It can act both as a server (listening for incoming connections) and as a client (connecting to an existing OIGTL server).
#define mitkNewMacro5Param(classname, typea, typeb, typec, typed, typee)
Definition: mitkCommon.h:128