Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPointSetStatisticsCalculator.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 _MITK_PointSetSTATISTICSCALCULATOR_H
19 #define _MITK_PointSetSTATISTICSCALCULATOR_H
20 
21 #include <itkObject.h>
23 #include <mitkPointSet.h>
24 
25 namespace mitk
26 {
27 
32 {
33 public:
34 
36  itkFactorylessNewMacro(Self)
37  itkCloneMacro(Self)
38 
40 
42  void SetPointSet(mitk::PointSet::Pointer pSet);
43 
45  mitk::Point3D GetPositionMean();
46 
48  mitk::Vector3D GetPositionStandardDeviation();
49 
51  mitk::Vector3D GetPositionSampleStandardDeviation();
52 
54  double GetPositionErrorMean();
55 
57  double GetPositionErrorStandardDeviation();
58 
60  double GetPositionErrorSampleStandardDeviation();
61 
63  double GetPositionErrorRMS();
64 
66  double GetPositionErrorMedian();
67 
69  double GetPositionErrorMax();
70 
72  double GetPositionErrorMin();
73 
74  //#####################################################################################################
75 
76  //this both methods are used by another class an so they are public... perhaps we want to move them
77  //out of this class because they have nothing to do with point sets.
78 
80  double GetStabw(std::vector<double> list);
81 
83  double GetSampleStabw(std::vector<double> list);
84 
85  //#####################################################################################################
86 
87 
88 protected:
89 
93 
94  // TODO: Remove the std::vector<mitk::Point3D> data structure and use mitk::PointSet everywhere
95 
97  std::vector<double> GetErrorList(std::vector<mitk::Point3D> list);
98 
100  mitk::Point3D GetMean(std::vector<mitk::Point3D> list);
101 
103  std::vector<mitk::Point3D> PointSetToVector(mitk::PointSet::Pointer pSet);
104 
106  bool CheckIfAllPositionsAreEqual();
107 
109 
110  double GetMean(std::vector<double> list);
111 
112  double GetMedian(std::vector<double> list);
113 
114  double GetMax(std::vector<double> list);
115 
116  double GetMin(std::vector<double> list);
117 
118 };
119 
120 }
121 
122 #endif // #define _MITK_PointSetSTATISTICSCALCULATOR_H
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
std::vector< mitk::Point3D > PointSetToVector(const mitk::PointSet::Pointer &mps)
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKIMAGESTATISTICS_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
Class for calculating statistics (like standard derivation, RMS, mean, etc.) for a PointSet...