MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSIGTLDevice.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkUSIGTLDevice_h
14#define mitkUSIGTLDevice_h
15
16#include <mitkCommon.h>
17#include <MitkUSExports.h>
18#include <mitkUSDevice.h>
19#include <mitkUSProbe.h>
20#include <mitkIGTLClient.h>
26
27
28namespace itk {
29 template<class T> class SmartPointer;
30}
31
32namespace mitk
33{
34 class USVideoDeviceCustomControls;
35 class USAbstractControlInterface;
44 class MITKUS_EXPORT USIGTLDevice : public mitk::USDevice
45 {
46 public:
48 // To open a device (Manufacturer, Model, Hostname, Port, IsServer)
49 mitkNewMacro5Param(Self, std::string, std::string, std::string, int, bool);
50
51 std::string GetDeviceClass() override;
52 USImageSource::Pointer GetUSImageSource() override;
53
54 USIGTLDevice(std::string manufacturer, std::string model, std::string host,
55 int port, bool server);
56
63 itk::SmartPointer<USAbstractControlInterface> GetControlInterfaceCustom() override;
64
68 void UnregisterOnService();
69
70 // Neu hinzugefĆ¼gt:
76 std::vector<mitk::USProbe::Pointer> GetAllProbes() override;
77
81 void DeleteAllProbes() override;
82
88 mitk::USProbe::Pointer GetCurrentProbe() override;
89
93 void AddNewProbe(mitk::USProbe::Pointer probe) override;
94
99 mitk::USProbe::Pointer GetProbeByName(std::string name) override;
100
104 void RemoveProbeByName(std::string name) override;
105
110 void SetDefaultProbeAsCurrentProbe() override;
111
115 void SetCurrentProbe(std::string probename) override;
116
120 void SetSpacing(double xSpacing, double ySpacing) override;
121
122
123 protected:
124 bool OnInitialization() override;
125 bool OnConnection() override;
126 bool OnDisconnection() override;
127 bool OnActivation() override;
128 bool OnDeactivation() override;
129
134 void GenerateData() override;
135
136 private:
137 std::string m_Host;
138 int m_Port;
139 mitk::IGTLDevice::Pointer m_Device;
140 mitk::IGTL2DImageDeviceSource::Pointer m_DeviceSource;
141 mitk::IGTLTrackingDataDeviceSource::Pointer m_TransformDeviceSource;
142 mitk::IGTLMessageToUSImageFilter::Pointer m_Filter;
143
147 itk::SmartPointer<USVideoDeviceCustomControls> m_ControlInterfaceCustom;
148
152 std::vector < mitk::USProbe::Pointer > m_Probes;
153
157 mitk::USProbe::Pointer m_CurrentProbe;
158 };
159} // namespace mitk
160
161#endif
A device holds information about it's model, make and the connected probes. It is the common super cl...
A mitk::USIGTLDevice is a USDevice to receive images over an OpenIGTLink connection....
mitkClassMacro(USIGTLDevice, mitk::USDevice)
mitkNewMacro5Param(Self, std::string, std::string, std::string, int, bool)
IGT Exceptions.