Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkNavigationDataEvaluationFilter.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 
18 #ifndef MITKNavigationDataEvaluationFilter_H_HEADER_INCLUDED_
19 #define MITKNavigationDataEvaluationFilter_H_HEADER_INCLUDED_
20 
22 #include <mitkPointSet.h>
23 #include <itkQuaternionRigidTransform.h>
24 #include <itkTransform.h>
25 
26 
27 namespace mitk {
28 
36  {
37 
38  public:
39 
41  itkFactorylessNewMacro(Self)
42  itkCloneMacro(Self)
43 
44 
45  void ResetStatistic();
46 
48  int GetNumberOfAnalysedNavigationData(int input);
50  int GetNumberOfInvalidSamples(int input);
52  double GetPercentageOfInvalidSamples(int input);
54  mitk::Point3D GetPositionMean(int input);
56  mitk::Vector3D GetPositionStandardDeviation(int input);
58  mitk::Vector3D GetPositionSampleStandardDeviation(int input);
59 
61  mitk::Quaternion GetQuaternionMean(int input);
63  mitk::Quaternion GetQuaternionStandardDeviation(int input);
65  mitk::Vector3D GetEulerAnglesMean(int input);
67  double GetEulerAnglesRMS(int input);
69  double GetEulerAnglesRMSDegree(int input);
70 
72  double GetPositionErrorMean(int input);
74  double GetPositionErrorStandardDeviation(int input);
76  double GetPositionErrorSampleStandardDeviation(int input);
78  double GetPositionErrorRMS(int input);
80  double GetPositionErrorMedian(int input);
82  double GetPositionErrorMax(int input);
84  double GetPositionErrorMin(int input);
85 
87  mitk::Point3D GetLoggedPosition(unsigned int i, int input);
88 
90  mitk::Quaternion GetLoggedOrientation(unsigned int i, int input);
91 
92  protected:
93 
96 
102  virtual void GenerateData() override;
103 
105  void CreateMembersForAllInputs();
106 
107 
108  std::map<std::size_t,std::vector<mitk::Point3D> > m_LoggedPositions; //a map here, to have one list for every navigation data
109  std::map<std::size_t,std::vector<mitk::Quaternion> > m_LoggedQuaternions;
110  std::map<std::size_t,int> m_InvalidSamples;
111 
112  mitk::Quaternion GetMean(std::vector<mitk::Quaternion> list);
113 
114  mitk::PointSet::Pointer VectorToPointSet(std::vector<mitk::Point3D> pSet);
115 
116  mitk::PointSet::Pointer VectorToPointSet(std::vector<mitk::Vector3D> pSet);
117 
119  std::vector<mitk::Vector3D> QuaternionsToEulerAngles(std::vector<mitk::Quaternion> quaterions); //in radians
120  std::vector<mitk::Vector3D> QuaternionsToEulerAnglesGrad(std::vector<mitk::Quaternion> quaterions); //in degree
121 
122  };
123 } // namespace mitk
124 
125 #endif /* MITKNavigationDataEvaluationFilter_H_HEADER_INCLUDED_ */
std::map< std::vcl_size_t, std::vector< mitk::Quaternion > > m_LoggedQuaternions
NavigationDataToNavigationDataFilter is the base class of all filters that receive NavigationDatas as...
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
vnl_quaternion< ScalarType > Quaternion
std::map< std::vcl_size_t, std::vector< mitk::Point3D > > m_LoggedPositions
NavigationDataEvaluationFilter calculates statistical data (mean value, mean error, etc.) on the input navigation data. Input navigation data are set 1:1 on output navigation data.