16 #ifndef __mitkToFCameraPMDModuleActivator_h
17 #define __mitkToFCameraPMDModuleActivator_h
32 #ifdef MITK_USE_TOF_PMDCAMCUBE
37 #ifdef MITK_USE_TOF_PMDO3
41 #ifdef MITK_USE_TOF_PMDCAMBOARD
59 void Load(us::ModuleContext* context)
62 #ifdef MITK_USE_TOF_PMDCAMCUBE
64 ToFCameraPMDCamCubeDeviceFactory* toFCameraPMDCamCubeDeviceFactory =
new ToFCameraPMDCamCubeDeviceFactory();
66 camCubeFactoryProps[
"ToFFactoryName"] = toFCameraPMDCamCubeDeviceFactory->GetFactoryName();
67 context->RegisterService<IToFDeviceFactory>(toFCameraPMDCamCubeDeviceFactory,camCubeFactoryProps);
69 toFCameraPMDCamCubeDeviceFactory->ConnectToFDevice();
72 ToFCameraPMDRawDataCamCubeDeviceFactory* toFCameraPMDRawDataCamCubeDeviceFactory =
new ToFCameraPMDRawDataCamCubeDeviceFactory();
74 rawCamCubeFactoryProps[
"ToFFactoryName"] = toFCameraPMDRawDataCamCubeDeviceFactory->GetFactoryName();
75 context->RegisterService<IToFDeviceFactory>(toFCameraPMDRawDataCamCubeDeviceFactory,rawCamCubeFactoryProps);
77 toFCameraPMDRawDataCamCubeDeviceFactory->ConnectToFDevice();
79 m_Factories.push_back(toFCameraPMDCamCubeDeviceFactory);
80 m_Factories.push_back(toFCameraPMDRawDataCamCubeDeviceFactory);
84 #ifdef MITK_USE_TOF_PMDO3
86 ToFCameraPMDO3DeviceFactory* toFCameraPMDO3DeviceFactory =
new ToFCameraPMDO3DeviceFactory();
88 o3FactoryProps[
"ToFFactoryName"] = toFCameraPMDO3DeviceFactory->GetFactoryName();
89 context->RegisterService<IToFDeviceFactory>(toFCameraPMDO3DeviceFactory,o3FactoryProps);
91 toFCameraPMDO3DeviceFactory->ConnectToFDevice();
93 m_Factories.push_back(toFCameraPMDO3DeviceFactory);
97 #ifdef MITK_USE_TOF_PMDCAMBOARD
99 ToFCameraPMDCamBoardDeviceFactory* toFCameraPMDCamBoardDeviceFactory =
new ToFCameraPMDCamBoardDeviceFactory();
101 camBoardFactoryProps[
"ToFFactoryName"] = toFCameraPMDCamBoardDeviceFactory->GetFactoryName();
102 context->RegisterService<IToFDeviceFactory>(toFCameraPMDCamBoardDeviceFactory, camBoardFactoryProps);
104 toFCameraPMDCamBoardDeviceFactory->ConnectToFDevice();
108 ToFCameraPMDRawDataCamBoardDeviceFactory* toFCameraPMDRawDataCamBoardDeviceFactory =
new ToFCameraPMDRawDataCamBoardDeviceFactory();
110 rawCamBoardFactoryProps[
"ToFFactoryName"] = toFCameraPMDRawDataCamBoardDeviceFactory->GetFactoryName();
111 context->RegisterService<IToFDeviceFactory>(toFCameraPMDRawDataCamBoardDeviceFactory,rawCamBoardFactoryProps);
113 toFCameraPMDRawDataCamBoardDeviceFactory->ConnectToFDevice();
115 m_Factories.push_back(toFCameraPMDCamBoardDeviceFactory);
116 m_Factories.push_back(toFCameraPMDRawDataCamBoardDeviceFactory);
121 ToFCameraPMDPlayerDeviceFactory* toFCameraPMDPlayerDeviceFactory =
new ToFCameraPMDPlayerDeviceFactory();
123 pMDPlayerFactoryProps[
"ToFFactoryName"] = toFCameraPMDPlayerDeviceFactory->GetFactoryName();
124 context->RegisterService<IToFDeviceFactory>(toFCameraPMDPlayerDeviceFactory,pMDPlayerFactoryProps);
126 toFCameraPMDPlayerDeviceFactory->ConnectToFDevice();
128 m_Factories.push_back(toFCameraPMDPlayerDeviceFactory);
135 void Unload(us::ModuleContext* )
142 ~PMDModuleActivator()
144 if(m_Factories.size() > 0)
146 for(std::list< IToFDeviceFactory* >::iterator it = m_Factories.begin(); it != m_Factories.end(); ++it)
157 std::list< IToFDeviceFactory* > m_Factories;
DataCollection - Class to facilitate loading/accessing structured data.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)