PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
PointObservationBuffer.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef POINTOBSERVATIONBUFFER_H
8 #define POINTOBSERVATIONBUFFER_H
9 
10 #include "PointObservation.h"
11 #include "LinearObject.h"
12 #include "Point.h"
13 #include "Line.h"
14 #include "Plane.h"
15 #include "Reference.h"
16 
17 #include <string>
18 #include <sstream>
19 #include <vector>
20 #include <cmath>
21 
22 #include "vnl/vnl_matrix.h"
23 #include "vnl/algo/vnl_symmetric_eigensystem.h"
24 #include "vnl/algo/vnl_svd.h"
25 
26 
28 {
29 private:
30  typedef std::vector<PointObservation*> PointObservationVector;
31  PointObservationVector observations;
32 
33 public:
34 
37 
38  PointObservationVector::size_type Size() const;
39  PointObservation* GetObservation( int index ) const;
40 
41  void AddObservation( PointObservation* newObservation );
42  void Clear();
43 
44  void Translate( std::vector<double> translation );
45 
47  void Filter( LinearObject* object, int filterWidth );
48 
49  vnl_matrix<double>* SphericalRegistration( PointObservationBuffer* fromPoints );
50  vnl_matrix<double>* TranslationalRegistration( std::vector<double> toCentroid, std::vector<double> fromCentroid, vnl_matrix<double>* rotation );
51 
52  std::vector<PointObservationBuffer*> ExtractLinearObjects( int collectionFrames, double extractionThreshold, std::vector<int>* dof );
53 
54  std::string ToXMLString() const;
55  void FromXMLElement( vtkXMLDataElement* element );
56 
57 private:
58  std::vector<double> CalculateCentroid();
59  vnl_matrix<double>* CovarianceMatrix( std::vector<double> centroid );
60 
61 };
62 
63 #endif
64 
65 //ETX
void Filter(LinearObject *object, int filterWidth)
vnl_matrix< double > * SphericalRegistration(PointObservationBuffer *fromPoints)
LinearObject * LeastSquaresLinearObject(int dof)
void AddObservation(PointObservation *newObservation)
PointObservation * GetObservation(int index) const
void Translate(std::vector< double > translation)
void FromXMLElement(vtkXMLDataElement *element)
PointObservationVector::size_type Size() const
std::vector< PointObservationBuffer * > ExtractLinearObjects(int collectionFrames, double extractionThreshold, std::vector< int > *dof)
vnl_matrix< double > * TranslationalRegistration(std::vector< double > toCentroid, std::vector< double > fromCentroid, vnl_matrix< double > *rotation)