Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkToFCameraPMDCamBoardDeviceFactory.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkToFCameraPMDCamBoardDeviceFactory_h
17 #define __mitkToFCameraPMDCamBoardDeviceFactory_h
18 
19 #include "mitkPMDModuleExports.h"
22 #include <mitkCameraIntrinsics.h>
24 #include <mitkToFConfig.h>
25 
26 // Microservices
27 #include <usServiceRegistration.h>
28 #include <usModuleContext.h>
29 #include <usGetModuleContext.h>
30 #include <usModule.h>
31 #include <usModuleResource.h>
32 #include <usModuleResourceStream.h>
33 
34 namespace mitk
35 {
43 class MITKPMD_EXPORT ToFCameraPMDCamBoardDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
44 
45 public:
47  {
48  }
52  std::string GetFactoryName()
53  {
54  return std::string("PMD CamBoard Factory");
55  }
56 
60  std::string GetDeviceNamePrefix()
61  {
62  return std::string("PMD CamBoard");
63  }
64 
65 private:
66 
70  ToFCameraDevice::Pointer CreateToFCameraDevice()
71  {
73 
74  device->SetBoolProperty("HasRGBImage", false);
75  device->SetBoolProperty("HasAmplitudeImage", true);
76  device->SetBoolProperty("HasIntensityImage", true);
77 
78  return device.GetPointer();
79  }
80 
81  us::ModuleResource GetIntrinsicsResource()
82  {
84  return module->GetResource("CalibrationFiles/PMDCamBoard_camera.xml");
85  }
86 };
87 }
88 #endif
itk::SmartPointer< Self > Pointer
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
DataCollection - Class to facilitate loading/accessing structured data.
std::string GetDeviceNamePrefix()
GetDeviceNamePrefix Main part of the device name.
Module * GetModule() const
ToFPMDCamBoardDeviceFactory is an implementation of the factory pattern to generate CamBoard devices...
ModuleResource GetResource(const std::string &path) const
Definition: usModule.cpp:267
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
std::string GetFactoryName()
Defining the Factorie´s Name, here for the ToFPMDCamBoard.