PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusCenterOfRotationCalibAlgo.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 __vtkPlusCenterOfRotationCalibAlgo_h
8 #define __vtkPlusCenterOfRotationCalibAlgo_h
9 
10 #include "PlusConfigure.h"
11 #include "vtkPlusCalibrationExport.h"
12 
13 #include "vtkObject.h"
14 #include "vtkTable.h"
15 #include "vtkIGSIOTrackedFrameList.h"
16 
18 
51 class vtkPlusCalibrationExport vtkPlusCenterOfRotationCalibAlgo : public vtkObject
52 {
53 public:
54 
56  vtkTypeMacro(vtkPlusCenterOfRotationCalibAlgo , vtkObject);
57  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
65  virtual void SetInputs(vtkIGSIOTrackedFrameList* trackedFrameList, std::vector<int>& indices, double spacing[2]);
66 
68  virtual PlusStatus GetCenterOfRotationPx(double centerOfRotationPx[2]);
69 
71  virtual PlusStatus GetError(double& mean, double& stdev);
72 
74  vtkGetObjectMacro(ReportTable, vtkTable);
75 
77  virtual PlusStatus GenerateReport(vtkPlusHTMLGenerator* htmlReport);
78 
87  static PlusStatus GenerateCenterOfRotationReport(int numberOfNWirePatterns,
88  vtkPlusHTMLGenerator* htmlReport,
89  vtkTable* reportTable,
90  double centerOfRotationPx[2]);
91 
92 protected:
95 
97  virtual void SetTrackedFrameListIndices(std::vector<int>& indices);
98 
100  int GetNumberOfNWirePatterns();
101 
103  vtkSetObjectMacro(TrackedFrameList, vtkIGSIOTrackedFrameList);
104 
106  vtkSetVector2Macro(Spacing, double);
107 
109  virtual PlusStatus Update();
110 
112  virtual PlusStatus ConstructLinearEquationForCalibration(std::vector<vnl_vector<double> >& aMatrix, std::vector<double>& bVector);
113 
115  PlusStatus AddNewColumnToReportTable(const char* columnName);
116 
118  virtual PlusStatus UpdateReportTable();
119 
121  vtkSetObjectMacro(ReportTable, vtkTable);
122 
124  vtkSetVector2Macro(CenterOfRotationPx, int);
125 
127  double CenterOfRotationPx[2];
128 
130  double Spacing[2];
131 
133  vtkIGSIOTrackedFrameList* TrackedFrameList;
134 
136  std::vector<int> TrackedFrameListIndices;
137 
139  vtkTable* ReportTable;
140 
142  double ErrorMean;
143 
145  double ErrorStdev;
146 
148  vtkTimeStamp UpdateTime;
149 };
150 
151 #endif
igsioStatus PlusStatus
Definition: PlusCommon.h:40
Algorithm for computing the center of in-plane rotation of ultrasound images of a calibration phantom...
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
class for generating basic html tags