32 if (pSet.IsNull())
return;
38 std::vector<mitk::Point3D> returnValue = std::vector<mitk::Point3D>();
39 for (
int i=0; i<pSet->GetSize(); i++) returnValue.push_back(pSet->GetPoint(i));
45 if (list.empty())
return 0;
46 std::sort(list.begin(), list.end());
47 return list.at(list.size()-1);
52 if (list.empty())
return 0;
53 std::sort(list.begin(), list.end());
59 if (list.empty())
return 0;
60 double returnValue = 0;
62 for(std::vector<double>::size_type i=0; i<list.size(); i++)
64 returnValue += pow((list.at(i)-mean),2);
67 returnValue /= list.size();
68 returnValue = sqrt(returnValue);
74 if (list.empty())
return 0;
75 double returnValue = 0;
77 for(std::vector<double>::size_type i=0; i<list.size(); i++)
79 returnValue += pow((list.at(i)-mean),2);
82 returnValue /= (list.size()-1);
83 returnValue = sqrt(returnValue);
89 if (list.empty())
return 0;
91 for(std::vector<double>::size_type i=0; i<list.size(); i++)
101 if (list.empty())
return 0;
102 std::sort(list.begin(), list.end());
103 if (list.size() % 2 == 0.)
105 double element1 = list.at(list.size()/2);
106 double element2 = list.at(list.size()/2);
107 return ((element1+element2)/2.0);
111 return list.at((list.size())/2);
128 for (std::vector<mitk::Point3D>::size_type i=0; i<list.size(); i++)
130 mean[0] += list.at(i)[0];
131 mean[1] += list.at(i)[1];
132 mean[2] += list.at(i)[2];
135 mean[0] /= list.size();
136 mean[1] /= list.size();
137 mean[2] /= list.size();
144 double returnValue = 0.0;
150 if (pSet.empty())
return 0;
154 for(std::vector<mitk::Point3D>::size_type i=0; i<pSet.size(); i++)
156 returnValue += mean.EuclideanDistanceTo(pSet.at(i));
158 returnValue /= pSet.size();
176 double returnValue = 0.0;
182 if(pSet.empty())
return 0;
186 for(std::vector<mitk::Point3D>::size_type i=0; i<pSet.size(); i++)
188 returnValue += pow(mean.EuclideanDistanceTo(pSet.at(i)),2);
190 returnValue /= pSet.size();
191 returnValue = sqrt(returnValue);
213 std::vector<double> errorList = std::vector<double>();
216 else for(std::vector<mitk::Point3D>::size_type i=0; i<list.size(); i++) {errorList.push_back(mean.EuclideanDistanceTo(list.at(i)));}
233 std::vector<double> listX = std::vector<double>();
234 std::vector<double> listY = std::vector<double>();
235 std::vector<double> listZ = std::vector<double>();
236 for (std::vector<mitk::Point3D>::size_type i=0; i<pSet.size(); i++)
238 listX.push_back(pSet.at(i)[0]);
239 listY.push_back(pSet.at(i)[1]);
240 listZ.push_back(pSet.at(i)[2]);
261 std::vector<double> listX = std::vector<double>();
262 std::vector<double> listY = std::vector<double>();
263 std::vector<double> listZ = std::vector<double>();
264 for (std::vector<mitk::Point3D>::size_type i=0; i<pSet.size(); i++)
266 listX.push_back(pSet.at(i)[0]);
267 listY.push_back(pSet.at(i)[1]);
268 listZ.push_back(pSet.at(i)[2]);
289 if((
m_PointSet->GetPoint(i)[0]!=lastPoint[0])||(
m_PointSet->GetPoint(i)[1]!=lastPoint[1])||(
m_PointSet->GetPoint(i)[2]!=lastPoint[2]))
return false;
double GetMin(std::vector< double > list)
double GetMax(std::vector< double > list)
mitk::Vector3D GetPositionStandardDeviation()
double GetPositionErrorMedian()
double GetPositionErrorMax()
~PointSetStatisticsCalculator() override
std::vector< mitk::Point3D > PointSetToVector(mitk::PointSet::Pointer pSet)
Converts a point set to a vector of Point3D.
bool CheckIfAllPositionsAreEqual()
double GetPositionErrorStandardDeviation()
double GetPositionErrorSampleStandardDeviation()
PointSetStatisticsCalculator()
double GetPositionErrorRMS()
double GetMedian(std::vector< double > list)
mitk::Point3D GetPositionMean()
mitk::PointSet::Pointer m_PointSet
mitk::Vector3D GetPositionSampleStandardDeviation()
double GetPositionErrorMin()
mitk::Point3D GetMean(std::vector< mitk::Point3D > list)
double GetStabw(std::vector< double > list)
double GetPositionErrorMean()
std::vector< double > GetErrorList(std::vector< mitk::Point3D > list)
void SetPointSet(mitk::PointSet::Pointer pSet)
Sets the point set which will be analysed.
double GetSampleStabw(std::vector< double > list)