PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusVirtualSwitcher.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 __vtkPlusVirtualSwitcher_h
8 #define __vtkPlusVirtualSwitcher_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 
12 #include "vtkPlusDevice.h"
13 #include "vtkPlusChannel.h"
14 
21 class vtkPlusDataCollectionExport vtkPlusVirtualSwitcher : public vtkPlusDevice
22 {
23 public:
24  static vtkPlusVirtualSwitcher *New();
26  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
27 
31  PlusStatus GetChannel(vtkPlusChannel* &aChannel) const;
32 
33  virtual double GetAcquisitionRate() const;
34 
36  virtual PlusStatus ReadConfiguration(vtkXMLDataElement*);
37 
38  virtual PlusStatus NotifyConfigured();
39 
40  vtkGetObjectConstMacro(OutputChannel, vtkPlusChannel);
41 
42  virtual bool IsTracker() const { return false; }
43  virtual bool IsVirtual() const { return true; }
44 
45 protected:
46  virtual PlusStatus InternalUpdate();
47 
48  PlusStatus SelectActiveChannel();
49 
50  PlusStatus CopyInputChannelToOutputChannel();
51 
53  virtual ~vtkPlusVirtualSwitcher();
54 
55  vtkGetObjectMacro(CurrentActiveInputChannel, vtkPlusChannel);
56  vtkSetObjectMacro(CurrentActiveInputChannel, vtkPlusChannel);
57 
58  vtkSetObjectMacro(OutputChannel, vtkPlusChannel);
59 
61  std::map<vtkPlusChannel*, double> LastRecordedTimestampMap;
63 
64  unsigned long FramesWhileInactive;
65 
66 private:
68  void operator=(const vtkPlusVirtualSwitcher&);
69 };
70 
71 #endif //__vtkPlusVirtualSwitcher_h
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual bool IsTracker() const
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual double GetAcquisitionRate() const
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
vtkPlusChannel * CurrentActiveInputChannel
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual bool IsVirtual() const
std::map< vtkPlusChannel *, double > LastRecordedTimestampMap
Contains an optional timestamped circular buffer containing the video images and a number of timestam...
virtual PlusStatus NotifyConfigured()
#define vtkGetObjectConstMacro(name, type)
Definition: vtkPlusMacro.h:14
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()