Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKUSDevicePersistence_H_HEADER_INCLUDED_
18 #define MITKUSDevicePersistence_H_HEADER_INCLUDED_
19 
20 // MITK
21 #include <mitkCommon.h>
22 #include <mitkUSVideoDevice.h>
23 #include <mitkUSProbe.h>
24 
25 // ITK
26 #include <itkObjectFactory.h>
27 
28 // QT
29 #include <QSettings>
30 
31 namespace mitk {
36  class USDevicePersistence : public itk::Object
37  {
38  public:
40  itkFactorylessNewMacro(Self)
41  itkCloneMacro(Self)
42 
43  void StoreCurrentDevices();
44 
45  std::vector<mitk::USDevice::Pointer> RestoreLastDevices();
46 
47  protected:
48 
51 
56 
57  QSettings m_devices;
58 
59  void split(std::string& text, std::string& separators, std::vector<std::string>& words);
60  double spacingToDouble(std::string s);
61  int depthToInt(std::string s);
62  };
63 } // namespace mitk
64 
65 #endif
mitk::USProbe::Pointer StringToUSProbe(std::string s)
QString USVideoDeviceToString(mitk::USVideoDevice::Pointer d)
std::vector< mitk::USDevice::Pointer > RestoreLastDevices()
itk::SmartPointer< Self > Pointer
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)