MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitkUSDeviceReaderXML.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
14#ifndef mitkUSDeviceReaderXML_h
15#define mitkUSDeviceReaderXML_h
16
17#include <MitkUSExports.h>
18
19#include <mitkAbstractFileReader.h>
20#include <mitkUSProbe.h>
21
22namespace tinyxml2 {
23 class XMLElement;
24}
25
26namespace mitk {
27
28 class MITKUS_EXPORT USDeviceReaderXML : public AbstractFileReader
29 {
30 public:
32 ~USDeviceReaderXML() override;
33
34 using AbstractFileReader::Read;
35
36 bool ReadUltrasoundDeviceConfiguration();
37
38 void SetFilename(std::string filename);
39
40 typedef struct USDeviceConfigData_
41 {
43 std::string deviceType;
44 std::string deviceName;
45 std::string manufacturer;
46 std::string model;
47 std::string comment;
48 std::string host;
49 int port;
50 bool server;
52
60
61 std::vector <mitk::USProbe::Pointer> probes;
62
64 : fileversion(0), deviceType("Unknown"), deviceName("Unknown"),
65 manufacturer("Unknown"), comment(""), host("localhost"),
66 port(18944), server(false), numberOfImageStreams(1),
67 useGreyscale(true), useResolutionOverride(true),
68 resolutionWidth(640), resolutionHeight(480), sourceID(0),
69 filepathVideoSource(""), opencvPort(0)
70 { };
71
72 }USDeviceConfigData;
73
74 USDeviceConfigData &GetUSDeviceConfigData();
75
76 protected:
77 std::vector<itk::SmartPointer<BaseData>> DoRead() override;
78
80 mitk::USDeviceReaderXML* Clone() const override;
81
85 void ExtractAttributeInformationOfUltrasoundDeviceTag(const tinyxml2::XMLElement *element);
86
90 void ExtractAttributeInformationOfGeneralSettingsTag(const tinyxml2::XMLElement *element);
91
95 void ExtractProbe(const tinyxml2::XMLElement *element);
96
97 private:
98 std::string m_Filename;
99 USDeviceConfigData m_DeviceConfig;
100 };
101
102} // namespace mitk
103
104#endif
IGT Exceptions.
std::vector< mitk::USProbe::Pointer > probes