PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusAscension3DGTrackerBase.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 #include "vtkPlusDataCollectionExport.h"
8 
9 #include "vtkPlusDevice.h"
10 
19 class vtkPlusDataCollectionExport vtkPlusAscension3DGTrackerBase : public vtkPlusDevice
20 {
21 public:
22 
25  void PrintSelf(ostream& os, vtkIndent indent);
26 
27  virtual bool IsTracker() const { return true; }
28 
31 
34 
36  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
37 
39  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
40 
45  PlusStatus Probe();
46 
53 
54  vtkGetMacro(NumberOfSensors, int);
55 
56  vtkGetMacro(FilterAcWideNotch, int);
57  vtkGetMacro(FilterAcNarrowNotch, int);
58  vtkGetMacro(FilterDcAdaptive, double);
59  vtkGetMacro(FilterLargeChange, int);
60  vtkGetMacro(FilterAlpha, bool);
61  vtkGetMacro(Hemisphere, int);
62 
64  static std::string GetHemisphereTypeAsString(int type);
66  static int GetHemisphereTypeFromString(const char* typeStr);
67 
68 protected:
69  vtkSetMacro(FilterAcWideNotch, int);
70  vtkSetMacro(FilterAcNarrowNotch, int);
71  vtkSetMacro(FilterDcAdaptive, double);
72  vtkSetMacro(FilterLargeChange, int);
73  vtkSetMacro(FilterAlpha, bool);
74  vtkSetMacro(Hemisphere, int);
75 
76 protected:
79 
85 
88 
89 private: // Definitions.
90  enum {TRANSMITTER_OFF = -1};
91 
92 private: // Functions.
94  void operator=(const vtkPlusAscension3DGTrackerBase&);
95 
97  PlusStatus CheckReturnStatus(int status);
98 
103  PlusStatus QualityToolTimeStampedUpdate(const char* qualityToolPortName, unsigned int sensorStartIndex, const std::vector<unsigned short>& qualityValues, double unfilteredTimestamp);
104 
106  bool IsQualityPortName(const char* name);
107  bool IsQualityPortName(const std::string& name);
108 
109 
110 private: // Variables.
111  std::vector< bool > SensorSaturated;
112  std::vector< bool > SensorAttached;
113  std::vector< bool > SensorInMotion;
114 
115  void* AscensionRecordBuffer;
116 
117  bool TransmitterAttached;
118 
119  unsigned int FrameNumber;
120  int NumberOfSensors;
121 
123  int Hemisphere;
124 
126  int FilterAcWideNotch;
127 
129  int FilterAcNarrowNotch;
130 
132  double FilterDcAdaptive;
133 
135  int FilterLargeChange;
136 
138  bool FilterAlpha;
139 };
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus InternalStopRecording()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual PlusStatus Probe()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
unsigned long FrameNumber
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus InternalStartRecording()
#define vtkPlusAscension3DGTrackerBase
Interface for the Ascension 3DG magnetic tracker.
virtual PlusStatus InternalDisconnect()
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()