PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusSpacingCalibAlgo.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 __vtkPlusSpacingCalibAlgo_h
8 #define __vtkPlusSpacingCalibAlgo_h
9 
10 #include "PlusConfigure.h"
11 #include "vtkPlusCalibrationExport.h"
12 
13 #include "vtkObject.h"
14 #include "vtkIGSIOTrackedFrameList.h"
15 #include "vtkTable.h"
17 
19 
25 class vtkPlusCalibrationExport vtkPlusSpacingCalibAlgo : public vtkObject
26 {
27 public:
28  static vtkPlusSpacingCalibAlgo* New();
29  vtkTypeMacro(vtkPlusSpacingCalibAlgo , vtkObject);
30  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
31 
36  virtual PlusStatus GenerateReport(vtkPlusHTMLGenerator* htmlReport);
37 
44  virtual void SetInputs(vtkIGSIOTrackedFrameList* trackedFrameList, const std::vector<PlusNWire>& nWires);
45 
47  vtkGetObjectMacro(ReportTable, vtkTable);
48 
50  virtual PlusStatus GetSpacing(double spacing[2]);
51 
53  virtual PlusStatus GetError(double& mean, double& stdev);
54 
55 protected:
57  virtual ~vtkPlusSpacingCalibAlgo();
58 
60  virtual PlusStatus Update();
61 
63  virtual PlusStatus ConstructLinearEquationForCalibration(std::vector<vnl_vector<double> >& aMatrix, std::vector<double>& bVector);
64 
66  PlusStatus AddNewColumnToReportTable(const char* columnName);
67 
69  virtual PlusStatus UpdateReportTable(
70  const std::vector<vnl_vector<double> >& aMatrix,
71  const std::vector<double>& bVector,
72  const vnl_vector<double>& resultVector);
73 
75  vtkSetObjectMacro(TrackedFrameList, vtkIGSIOTrackedFrameList);
77  vtkGetObjectMacro(TrackedFrameList, vtkIGSIOTrackedFrameList);
78 
80  vtkSetObjectMacro(ReportTable, vtkTable);
81 
83  vtkSetVector2Macro(Spacing, double);
84 
86  double Spacing[2];
87 
89  vtkIGSIOTrackedFrameList* TrackedFrameList;
90 
92  std::vector<PlusNWire> NWires;
93 
95  vtkTable* ReportTable;
96 
98  double ErrorMean;
99 
101  double ErrorStdev;
102 
104  vtkTimeStamp UpdateTime;
105 
106 };
107 
108 #endif
igsioStatus PlusStatus
Definition: PlusCommon.h:40
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
vtkIGSIOTrackedFrameList * TrackedFrameList
std::vector< PlusNWire > NWires
class for generating basic html tags
Calculates ultrasound image spacing from phantom definition file.