MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSVideoDevice.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 mitkUSVideoDevice_h
14#define mitkUSVideoDevice_h
15
16#include <MitkUSExports.h>
17#include <mitkCommon.h>
18#include "mitkUSDevice.h"
20#include "mitkUSProbe.h"
21#include <itkObjectFactory.h>
22
23namespace itk {
24 template<class T> class SmartPointer;
25}
26
27namespace mitk {
28 class USVideoDeviceCustomControls;
29 class USAbstractControlInterface;
30
40 class MITKUS_EXPORT USVideoDevice : public mitk::USDevice
41 {
42 public:
44 // To open a device (DeviceID, Manufacturer, Model)
45 mitkNewMacro3Param(Self, int, std::string, std::string);
46 // To open A VideoFile (Path, Manufacturer, Model)
47 mitkNewMacro3Param(Self, std::string, std::string, std::string);
48 // To open a device (DeviceID, Metadata)
49 mitkNewMacro2Param(Self, int, mitk::USImageMetadata::Pointer);
50 // To open A VideoFile (Path, Metadata)
51 mitkNewMacro2Param(Self, std::string, mitk::USImageMetadata::Pointer);
52
56 std::string GetDeviceClass() override;
57
65 static std::string GetDeviceClassStatic();
66
73 itk::SmartPointer<USAbstractControlInterface> GetControlInterfaceCustom() override;
74
81 void UnregisterOnService();
82
86 USImageSource::Pointer GetUSImageSource() override;
87
93 std::vector<mitk::USProbe::Pointer> GetAllProbes() override;
94
98 void DeleteAllProbes() override;
99
105 mitk::USProbe::Pointer GetCurrentProbe() override;
106
110 void AddNewProbe(mitk::USProbe::Pointer probe) override;
111
116 mitk::USProbe::Pointer GetProbeByName(std::string name) override;
117
121 void RemoveProbeByName(std::string name) override;
122
126 bool GetIsSourceFile();
127
132 void SetDefaultProbeAsCurrentProbe() override;
133
137 void SetCurrentProbe( std::string probename ) override;
138
142 void SetSpacing( double xSpacing, double ySpacing ) override;
143
144 itkGetMacro(ImageVector, std::vector<mitk::Image::Pointer>);
145 itkGetMacro(DeviceID, int);
146 itkGetMacro(FilePath, std::string);
147 protected:
148
154 USVideoDevice(int videoDeviceNumber, std::string manufacturer, std::string model);
158 USVideoDevice(std::string videoFilePath, std::string manufacturer, std::string model);
164 USVideoDevice(int videoDeviceNumber, mitk::USImageMetadata::Pointer metadata);
168 USVideoDevice(std::string videoFilePath, mitk::USImageMetadata::Pointer metadata);
169
170 ~USVideoDevice() override;
171
175 void Init();
176
181 bool OnInitialization() override;
182
187 bool OnConnection() override;
188
193 bool OnDisconnection() override;
194
198 bool OnActivation() override;
199
203 bool OnDeactivation() override;
204
209 void GenerateData() override;
210
214 mitk::USImageVideoSource::Pointer m_Source;
215
220
225
229 std::string m_FilePath;
230
235
239 std::vector < mitk::USProbe::Pointer > m_Probes;
240
244 mitk::USProbe::Pointer m_CurrentProbe;
245 };
246} // namespace mitk
247
248#endif
A device holds information about it's model, make and the connected probes. It is the common super cl...
A mitk::USVideoDevice is the common class for video only devices. They capture video input either fro...
bool m_SourceIsFile
True, if this source plays back a file, false if it recieves data from a device.
int m_DeviceID
The device id to connect to. Undefined, if m_SourceIsFile == true;.
mitkNewMacro3Param(Self, int, std::string, std::string)
itk::SmartPointer< USVideoDeviceCustomControls > m_ControlInterfaceCustom
custom control interface for us video device
mitk::USImageVideoSource::Pointer m_Source
The image source that we use to aquire data.
std::vector< mitk::USProbe::Pointer > m_Probes
probes for this USVideoDevice
itkGetMacro(DeviceID, int)
mitkNewMacro3Param(Self, std::string, std::string, std::string)
mitkNewMacro2Param(Self, std::string, mitk::USImageMetadata::Pointer)
itkGetMacro(FilePath, std::string)
mitk::USProbe::Pointer m_CurrentProbe
probe that is currently in use
mitkNewMacro2Param(Self, int, mitk::USImageMetadata::Pointer)
itkGetMacro(ImageVector, std::vector< mitk::Image::Pointer >)
std::string m_FilePath
The Filepath id to connect to. Undefined, if m_SourceIsFile == false;.
mitkClassMacro(USVideoDevice, mitk::USDevice)
IGT Exceptions.