PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
LinearObjectBuffer.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 LINEAROBJECTBUFFER_H
8 #define LINEAROBJECTBUFFER_H
9 
10 #include "LinearObject.h"
11 #include "Reference.h"
12 #include "Point.h"
13 #include "Line.h"
14 #include "Plane.h"
15 
16 #include <string>
17 #include <sstream>
18 #include <vector>
19 #include <cmath>
20 
21 #include "vnl/vnl_matrix.h"
22 #include "vnl/algo/vnl_matrix_inverse.h"
23 
24 // This class stores a vector of values and a string label
26 {
27 private:
28  std::vector<LinearObject*> objects;
29 
30 public:
32  virtual ~LinearObjectBuffer();
33 
34  int Size() const;
35  LinearObject* GetLinearObject( int index ) const;
36  LinearObject* GetLinearObject( std::string name ) const;
37  void AddLinearObject( LinearObject* newObject );
38  void Concatenate( LinearObjectBuffer* catBuffer );
39 
40  void Translate( std::vector<double> vector );
41 
42  void CalculateSignature( LinearObjectBuffer* refBuffer );
43 
44  LinearObjectBuffer* GetMatches( LinearObjectBuffer* candidates, double matchingThreshold );
45 
46  std::vector<double> CalculateCentroid();
47 
48  std::string ToXMLString() const;
49  void FromXMLElement( vtkXMLDataElement* element );
50 
51 };
52 
53 #endif
std::vector< double > CalculateCentroid()
void AddLinearObject(LinearObject *newObject)
void CalculateSignature(LinearObjectBuffer *refBuffer)
void Translate(std::vector< double > vector)
void FromXMLElement(vtkXMLDataElement *element)
void Concatenate(LinearObjectBuffer *catBuffer)
LinearObject * GetLinearObject(int index) const
LinearObjectBuffer * GetMatches(LinearObjectBuffer *candidates, double matchingThreshold)
std::string ToXMLString() const