Medical Imaging Interaction Toolkit  2016.11.0
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,
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 NAVIGATIONTOOLREADER_H_INCLUDED
18 #define NAVIGATIONTOOLREADER_H_INCLUDED
19 
20 //itk headers
21 #include <itkObjectFactory.h>
22 
23 //mitk headers
24 #include <mitkCommon.h>
25 #include "mitkNavigationTool.h"
26 #include "mitkDataStorage.h"
28 #include <MitkIGTExports.h>
29 
30 namespace mitk {
38  class MITKIGT_EXPORT NavigationToolReader : public itk::Object
39  {
41  public:
43  itkFactorylessNewMacro(Self)
44  itkCloneMacro(Self)
45 
53  mitk::NavigationTool::Pointer DoRead(std::string filename);
54 
55  itkGetMacro(ErrorMessage,std::string);
56 
57  protected:
59  ~NavigationToolReader();
60 
62 
63  std::string m_ToolfilePath; //This path is used to store the toolfiles. It must be available through the whole MITK run.
64 
65  mitk::NavigationTool::Pointer ConvertDataNodeToNavigationTool(mitk::DataNode::Pointer node, std::string toolPath);
66 
67  //################### protected help methods ########################
68  std::string GetFileWithoutPath(std::string FileWithPath);
69  mitk::PointSet::Pointer ConvertStringToPointSet(std::string string);
70  mitk::Point3D ConvertStringToPoint(std::string string);
71  mitk::Quaternion ConvertStringToQuaternion(std::string string);
72  void split(std::string& text, std::string& separators, std::vector<std::string>& words);
73 
74  };
75 } // namespace mitk
76 #endif //NAVIGATIONTOOLREADER
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
An object of this class represents a navigation tool in the view of the software. A few informations ...
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:79
static const std::string filename
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
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.
static std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66