MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkAbstractUltrasoundTrackerDevice.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 mitkAbstractUltrasoundTrackerDevice_h
14#define mitkAbstractUltrasoundTrackerDevice_h
15
16#include <MitkUSNavigationExports.h>
17#include "mitkUSDevice.h"
18#include "mitkImageSource.h"
20
21// Microservices
22#include <mitkServiceInterface.h>
23#include <usServiceRegistration.h>
24#include <usGetModuleContext.h>
25#include <usModule.h>
26#include <usServiceProperties.h>
27#include <usModuleContext.h>
28
29namespace itk {
30 template<class T> class SmartPointer;
31}
32
33namespace mitk {
34 class NavigationDataSmoothingFilter;
35 class NavigationDataDelayFilter;
36 class NavigationDataDisplacementFilter;
37
50 class MITKUSNAVIGATION_EXPORT AbstractUltrasoundTrackerDevice : public mitk::ImageSource
51 {
52 public:
53
54 static const std::string DeviceClassIdentifier;
55 static const char* DefaultProbeIdentifier;
56 static const char* ProbeAndDepthSeperator;
57 static const std::string US_INTERFACE_NAME;
58 static const std::string US_PROPKEY_DEVICENAME;
59 static const std::string US_PROPKEY_CLASS;
60 static const std::string US_PROPKEY_ID;
61
62
65
70
71 itkGetMacro(IsTrackedUltrasoundActive, bool);
72
78 AffineTransform3D::Pointer GetCalibration();
79
86 AffineTransform3D::Pointer GetCalibration(std::string depth);
87
95 AffineTransform3D::Pointer GetCalibration(std::string depth, std::string probe);
96
98 virtual AffineTransform3D::Pointer GetUSPlaneTransform();
99
105 void SetCalibration(AffineTransform3D::Pointer calibration);
106
111 bool RemoveCalibration();
112
119 bool RemoveCalibration(std::string depth);
120
128 bool RemoveCalibration(std::string depth, std::string probe);
129
133 std::string GetDeviceClass();
134
138 USImageSource::Pointer GetUSImageSource();
139
140 itk::SmartPointer<mitk::NavigationDataSource> GetNavigationDataSource();
141
145 bool GetIsCalibratedForCurrentStatus();
146
150 bool GetContainsAtLeastOneCalibration();
151
158 std::string SerializeCalibration();
159
168 void DeserializeCalibration(const std::string &xmlString, bool clearPreviousCalibrations = true);
169
170 void SetNumberOfSmoothingValues(unsigned int numberOfSmoothingValues);
171
172 void SetDelayCount(unsigned int delayCount);
173
180 void UnregisterOnService();
181
182 virtual void RegisterAsMicroservice();
183
187 virtual itk::SmartPointer<USAbstractControlInterface> GetControlInterfaceCustom();
188
192 virtual itk::SmartPointer<USControlInterfaceBMode> GetControlInterfaceBMode();
193
197 virtual itk::SmartPointer<USControlInterfaceProbes> GetControlInterfaceProbes();
198
202 virtual itk::SmartPointer<USControlInterfaceDoppler> GetControlInterfaceDoppler();
203
209 virtual void SetIsFreezed(bool freeze);
210
214 virtual bool GetIsFreezed();
215
221 virtual void OnFreeze(bool) { }
222
223 protected:
224 AbstractUltrasoundTrackerDevice( USDevice::Pointer usDevice,
226 bool trackedUltrasoundActive );
228
229
235 void GenerateData() override;
236
237 std::string GetIdentifierForCurrentCalibration();
238 std::string GetIdentifierForCurrentProbe();
239 std::string GetCurrentDepthValue();
240
241 void RebuildFilterPipeline();
242
243 USDevice::Pointer m_UltrasoundDevice;
245 std::map<std::string, AffineTransform3D::Pointer> m_Calibrations;
246
251
253 unsigned int m_DelayCount;
254
258 us::ServiceRegistration<Self> m_ServiceRegistration;
259
263 us::ServiceProperties m_ServiceProperties;
264
265 private:
266
267 bool m_IsFreezed;
268 bool m_IsTrackedUltrasoundActive;
269 };
270
271} // namespace mitk
272
273MITK_DECLARE_SERVICE_INTERFACE(mitk::AbstractUltrasoundTrackerDevice, "org.mitk.services.AbstractUltrasoundTrackerDevice")
274
275#endif
Abstract class for an easy handling of a combination of an USDevice and a NavigationDataSource....
itk::SmartPointer< mitk::NavigationDataDisplacementFilter > m_DisplacementFilter
std::map< std::string, AffineTransform3D::Pointer > m_Calibrations
mitkNewMacro3Param(AbstractUltrasoundTrackerDevice, USDevice::Pointer, itk::SmartPointer< NavigationDataSource >, bool)
itkGetMacro(IsTrackedUltrasoundActive, bool)
itk::SmartPointer< mitk::NavigationDataDelayFilter > m_DelayFilter
itkGetMacro(TrackingDeviceDataSource, itk::SmartPointer< NavigationDataSource >)
us::ServiceProperties m_ServiceProperties
Properties of the device's Microservice.
virtual void OnFreeze(bool)
Called when mitk::AbstractUltrasoundTrackerDevice::SetIsFreezed() is called. Subclasses can overwrite...
us::ServiceRegistration< Self > m_ServiceRegistration
The device's ServiceRegistration object that allows to modify it's Microservice registraton details.
itkGetMacro(UltrasoundDevice, itk::SmartPointer< USDevice >)
itk::SmartPointer< mitk::NavigationDataSource > m_LastFilterOfIGTPipeline
itkSetMacro(UltrasoundDevice, itk::SmartPointer< USDevice >)
itk::SmartPointer< NavigationDataSource > m_TrackingDeviceDataSource
mitkClassMacro(AbstractUltrasoundTrackerDevice, mitk::ImageSource)
itkSetMacro(TrackingDeviceDataSource, itk::SmartPointer< NavigationDataSource >)
itk::SmartPointer< mitk::NavigationDataSmoothingFilter > m_SmoothingFilter
IGT Exceptions.