Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkUSDevicePersistence.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 MITKUSDevicePersistence_H_HEADER_INCLUDED_
14 #define MITKUSDevicePersistence_H_HEADER_INCLUDED_
15 
16 // MITK
17 #include <mitkCommon.h>
18 #include <mitkUSVideoDevice.h>
19 #include <mitkUSProbe.h>
20 
21 // ITK
22 #include <itkObjectFactory.h>
23 
24 // QT
25 #include <QSettings>
26 
27 namespace mitk {
32  class USDevicePersistence : public itk::Object
33  {
34  public:
36  itkFactorylessNewMacro(Self);
37  itkCloneMacro(Self);
38 
39  void StoreCurrentDevices();
40 
41  std::vector<mitk::USDevice::Pointer> RestoreLastDevices();
42 
43  protected:
44 
46  ~USDevicePersistence() override{}
47 
50  QString USProbeToString(mitk::USProbe::Pointer p);
51  mitk::USProbe::Pointer StringToUSProbe(std::string s);
52 
53  QSettings m_devices;
54 
55  void split(std::string& text, std::string& separators, std::vector<std::string>& words);
56  double spacingToDouble(std::string s);
57  int depthToInt(std::string s);
58  };
59 } // namespace mitk
60 
61 #endif
mitk::USProbe::Pointer StringToUSProbe(std::string s)
QString USVideoDeviceToString(mitk::USVideoDevice::Pointer d)
std::vector< mitk::USDevice::Pointer > RestoreLastDevices()
DataCollection - Class to facilitate loading/accessing structured data.
mitkClassMacroItkParent(USDevicePersistence, itk::Object)
QString USProbeToString(mitk::USProbe::Pointer p)
void split(std::string &text, std::string &separators, std::vector< std::string > &words)
mitk::USVideoDevice::Pointer StringToUSVideoDevice(QString s)
double spacingToDouble(std::string s)