Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkNavigationToolReader.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 NAVIGATIONTOOLREADER_H_INCLUDED
14 #define NAVIGATIONTOOLREADER_H_INCLUDED
15 
16 //itk headers
17 #include <itkObjectFactory.h>
18 
19 //mitk headers
20 #include <mitkCommon.h>
21 #include "mitkNavigationTool.h"
22 #include "mitkDataStorage.h"
24 #include <MitkIGTExports.h>
25 
26 namespace mitk {
34  class MITKIGT_EXPORT NavigationToolReader : public itk::Object
35  {
37  public:
39  itkFactorylessNewMacro(Self);
40  itkCloneMacro(Self);
41 
49  mitk::NavigationTool::Pointer DoRead(std::string filename);
50 
51  itkGetMacro(ErrorMessage,std::string);
52 
53  protected:
55  ~NavigationToolReader() override;
56 
57  std::string m_ErrorMessage;
58 
59  std::string m_ToolfilePath; //This path is used to store the toolfiles. It must be available through the whole MITK run.
60 
61  mitk::NavigationTool::Pointer ConvertDataNodeToNavigationTool(mitk::DataNode::Pointer node, std::string toolPath);
62 
63  //################### protected help methods ########################
64  std::string GetFileWithoutPath(std::string FileWithPath);
65  mitk::PointSet::Pointer ConvertStringToPointSet(std::string string);
66  mitk::Point3D ConvertStringToPoint(std::string string);
67  mitk::Quaternion ConvertStringToQuaternion(std::string string);
68  void split(std::string& text, std::string& separators, std::vector<std::string>& words);
69 
70  };
71 } // namespace mitk
72 #endif //NAVIGATIONTOOLREADER
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKIGT_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
vnl_quaternion< ScalarType > Quaternion
This class offers methods to load an object of the class NavigationToolStorage from the harddisc...
This class offers methods to read objects of the class NavigationTool from the harddisc. The tools have to be saved in a special format by the class NavigationToolWriter to be loadable.