PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusPhantomLinearObjectRegistrationAlgo.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 __vtkPlusPhantomLinearObjectRegistrationAlgo_h
8 #define __vtkPlusPhantomLinearObjectRegistrationAlgo_h
9 
10 #include "vtkPlusCalibrationExport.h"
11 
12 #include "Plane.h"
13 #include "Planes.h"
14 #include "Reference.h"
15 #include "References.h"
16 #include "PlusConfigure.h"
17 #include "vtkDoubleArray.h"
18 #include "vtkMatrix4x4.h"
19 #include "vtkObject.h"
20 #include "vtkPoints.h"
21 
22 //class vtkIGSIOTransformRepository;
23 class vtkXMLDataElement;
24 
25 //-----------------------------------------------------------------------------
26 
32 class vtkPlusCalibrationExport vtkPlusPhantomLinearObjectRegistrationAlgo : public vtkObject
33 {
34 public:
37 
38 public:
43  PlusStatus LinearObjectRegister(vtkIGSIOTransformRepository* aTransformRepository = NULL);
44 
49  PlusStatus ReadConfiguration(vtkXMLDataElement* aConfig);
50 
56  std::string GetDefinedPlaneName(int aIndex) { return this->DefinedPlaneNames[aIndex]; };
57 
58  Planes* GetDefinedPlanesFromXML();
59 
60  Planes* GetUserRecordedPlanes();
61 
62  PlusStatus InsertNextCalibrationPoint(vtkMatrix4x4* aMarkerToReferenceTransformMatrix);
63 
64  PlusStatus Initialize();
65 
68 
69 public:
70 
71  vtkGetMacro(RegistrationError, double);
72 
73  vtkGetObjectMacro(PhantomToReferenceTransformMatrix, vtkMatrix4x4);
74  vtkSetObjectMacro(PhantomToReferenceTransformMatrix, vtkMatrix4x4);
75 
76  vtkGetObjectMacro(RecordedPoints, vtkPoints);
77 
78  vtkGetStringMacro(PhantomCoordinateFrame);
79  vtkGetStringMacro(ReferenceCoordinateFrame);
80  vtkGetStringMacro(StylusTipCoordinateFrame);
81 
82 protected:
84  PlusStatus ComputeError();
85 
86  /*Sets the planes that are described in the configuration file (defined in the phantom coordinate system)*/
87  void SetDefinedPlanesFromXML(Planes* planes);
88 
90  void SetRecordedPlanes(Planes* planes);
91 
92 protected:
94  vtkSetObjectMacro(RecordedPoints, vtkPoints);
95 
96  vtkSetObjectMacro(MarkerToReferenceTransformMatrixArray, vtkDoubleArray);
97 
98  vtkSetStringMacro(PhantomCoordinateFrame);
99  vtkSetStringMacro(ReferenceCoordinateFrame);
100  vtkSetStringMacro(StylusTipCoordinateFrame);
101 
102 protected:
105 
106 protected:
107  /*Names of the planes defined in the configuration file*/
108  std::vector<std::string> DefinedPlaneNames;
109 
112 
115 
116  /*Names of the references defined in the configuration file*/
117  std::vector<std::string> DefinedReferenceNames;
118 
121 
124 
126  vtkPoints* RecordedPoints;
127 
130 
133 
136 
139 
142 
144  static std::string ConfigurationElementName;
145 
148 
149 };
150 
151 #endif
igsioStatus PlusStatus
Definition: PlusCommon.h:40
Definition: Planes.h:13
Landmark registration to determine the Phantom pose relative to the attached marker (PhantomReference...