Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkToFCameraMESASR4000DeviceFactory.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 __mitkToFCameraMESASR4000DeviceFactory_h
17 #define __mitkToFCameraMESASR4000DeviceFactory_h
18 
19 #include <MitkMESASR4000ModuleExports.h>
22 #include <mitkCameraIntrinsics.h>
24 #include <mitkToFConfig.h>
25 
26 namespace mitk
27 {
34  class MITKMESASR4000_EXPORT ToFCameraMESASR4000DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
35 
36  public:
42  {
43  }
47  std::string GetFactoryName()
48  {
49  return std::string("MESA SR4000 Factory");
50  }
51 
57  std::string GetCurrentDeviceName()
58  {
59  return std::string("MESA SR4000");
60  }
61 
62  private:
67  ToFCameraDevice::Pointer CreateToFCameraDevice()
68  {
70 
71  //Set default camera intrinsics for the Mesa-SR4000-camera.
73  std::string pathToDefaulCalibrationFile(MITK_TOF_DATA_DIR);
74 
75  pathToDefaulCalibrationFile.append("/CalibrationFiles/Mesa-SR4000_Camera.xml");
76  cameraIntrinsics->FromXMLFile(pathToDefaulCalibrationFile);
77  device->SetProperty("CameraIntrinsics", mitk::CameraIntrinsicsProperty::New(cameraIntrinsics));
78 
79  device->SetBoolProperty("HasRGBImage", false);
80  device->SetBoolProperty("HasAmplitudeImage", true);
81  device->SetBoolProperty("HasIntensityImage", true);
82 
83  return device.GetPointer();
84  }
85  };
86 }
87 #endif
itk::SmartPointer< Self > Pointer
ToFCameraMESASR4000DeviceFactory is an implementation of the factory pattern to generate MESASR4000De...
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
#define MITK_TOF_DATA_DIR
Definition: mitkToFConfig.h:7
DataCollection - Class to facilitate loading/accessing structured data.
std::string GetCurrentDeviceName()
GetCurrentDeviceName Get the name of the current MESA SR4000. First device is named "MESA SR4000"...
static Pointer New()
ToFCameraMESASR4000DeviceFactory()
ToFCameraMESASR4000DeviceFactory Default contructor. This factory internally counts all MESA SR4000 d...
std::string GetFactoryName()
Get the name of the factory, here for the ToFPMDCamCube.