PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusDeviceFactory.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 __vtkPlusDeviceFactory_h
8 #define __vtkPlusDeviceFactory_h
9 
10 // Local includes
11 #include "igsioCommon.h"
12 #include "vtkPlusDataCollectionExport.h"
13 
14 // VTK includes
15 #include <vtkObject.h>
16 
17 class vtkPlusDevice;
18 
27 class vtkPlusDataCollectionExport vtkPlusDeviceFactory : public vtkObject
28 {
29 public:
31  typedef vtkPlusDevice* (*PointerToDevice)();
32 
33 public:
34  static vtkPlusDeviceFactory* New();
35  vtkTypeMacro(vtkPlusDeviceFactory, vtkObject);
36  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
37 
39  virtual void PrintAvailableDevices(ostream& os, vtkIndent indent);
40 
42  PlusStatus CreateInstance(const char* aDeviceType, vtkPlusDevice*& aDevice, const std::string& aDeviceId);
43 
45  virtual PlusStatus GetDeviceClassName(const std::string& deviceTypeName, std::string& classNameOut) const;
46 
48  virtual PlusStatus GetDeviceTypeName(const std::string& deviceClassName, std::string& typeNameOut) const;
49 
51  void RegisterDevice(const std::string& deviceTypeName, const std::string& deviceClassName, PointerToDevice constructionMethod);
52 
53 protected:
55  virtual ~vtkPlusDeviceFactory(void);
56 
58  std::map<std::string, PointerToDevice> DeviceTypes;
60  std::map<std::string, std::string> DeviceTypeClassNames;
61 
62 private:
64  void operator=(const vtkPlusDeviceFactory&);
65 };
66 
67 #endif
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
igsioStatus PlusStatus
Definition: PlusCommon.h:40
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
std::map< std::string, std::string > DeviceTypeClassNames
Factory class of supported devices.
std::map< std::string, PointerToDevice > DeviceTypes
const char ** deviceClassName
Definition: phidget22.h:1312