Medical Imaging Interaction Toolkit  2021.02.99-b1c7fb9e
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef __mitkToFCameraMESASR4000DeviceFactory_h
13 #define __mitkToFCameraMESASR4000DeviceFactory_h
14 
15 #include <MitkMESASR4000ModuleExports.h>
18 #include <mitkCameraIntrinsics.h>
20 #include <mitkToFConfig.h>
21 
22 namespace mitk
23 {
30  class MITKMESASR4000_EXPORT ToFCameraMESASR4000DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
31 
32  public:
38  {
39  }
43  std::string GetFactoryName()
44  {
45  return std::string("MESA SR4000 Factory");
46  }
47 
53  std::string GetCurrentDeviceName()
54  {
55  return std::string("MESA SR4000");
56  }
57 
58  private:
63  ToFCameraDevice::Pointer CreateToFCameraDevice()
64  {
65  ToFCameraMESASR4000Device::Pointer device = ToFCameraMESASR4000Device::New();
66 
67  //Set default camera intrinsics for the Mesa-SR4000-camera.
68  mitk::CameraIntrinsics::Pointer cameraIntrinsics = mitk::CameraIntrinsics::New();
69  std::string pathToDefaulCalibrationFile(MITK_TOF_DATA_DIR);
70 
71  pathToDefaulCalibrationFile.append("/CalibrationFiles/Mesa-SR4000_Camera.xml");
72  cameraIntrinsics->FromXMLFile(pathToDefaulCalibrationFile);
73  device->SetProperty("CameraIntrinsics", mitk::CameraIntrinsicsProperty::New(cameraIntrinsics));
74 
75  device->SetBoolProperty("HasRGBImage", false);
76  device->SetBoolProperty("HasAmplitudeImage", true);
77  device->SetBoolProperty("HasIntensityImage", true);
78 
79  return device.GetPointer();
80  }
81  };
82 }
83 #endif
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.