Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found 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>
21 #include <mitkIGTLDeviceSource.h>
26 
27 
28 namespace itk {
29  template<class T> class SmartPointer;
30 }
31 
32 namespace 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
mitkNewMacro5Param
#define mitkNewMacro5Param(classname, typea, typeb, typec, typed, typee)
Definition: mitkCommon.h:120
itk::SmartPointer
Definition: mitkIFileReader.h:30
mitkUSProbe.h
mitkIGTLClient.h
mitk::USDevice
A device holds information about it's model, make and the connected probes. It is the common super cl...
Definition: mitkUSDevice.h:75
mitkUSVideoDeviceCustomControls.h
mitk::USIGTLDevice
A mitk::USIGTLDevice is a USDevice to receive images over an OpenIGTLink connection....
Definition: mitkUSIGTLDevice.h:44
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitkIGTLMessageToUSImageFilter.h
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitkCommon.h
mitkUSDevice.h
mitkIGTLTrackingDataDeviceSource.h
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
mitkIGTL2DImageDeviceSource.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitkIGTLDeviceSource.h