Medical Imaging Interaction Toolkit  2022.04.99-e36380da
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
mitkCameraIntrinsics.h
mitk::CameraIntrinsicsProperty::New
static Pointer New()
mitk::ToFCameraMESASR4000DeviceFactory::GetFactoryName
std::string GetFactoryName()
Get the name of the factory, here for the ToFPMDCamCube.
Definition: mitkToFCameraMESASR4000DeviceFactory.h:43
mitk::ToFCameraMESASR4000DeviceFactory::GetCurrentDeviceName
std::string GetCurrentDeviceName()
GetCurrentDeviceName Get the name of the current MESA SR4000. First device is named "MESA SR4000",...
Definition: mitkToFCameraMESASR4000DeviceFactory.h:53
MITK_TOF_DATA_DIR
#define MITK_TOF_DATA_DIR
Definition: mitkToFConfig.h:7
mitkToFConfig.h
mitkCameraIntrinsicsProperty.h
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::CameraIntrinsics::New
static Pointer New()
mitkAbstractToFDeviceFactory.h
mitk::ToFCameraMESASR4000DeviceFactory::ToFCameraMESASR4000DeviceFactory
ToFCameraMESASR4000DeviceFactory()
ToFCameraMESASR4000DeviceFactory Default contructor. This factory internally counts all MESA SR4000 d...
Definition: mitkToFCameraMESASR4000DeviceFactory.h:37
mitk::ToFCameraMESASR4000Device::New
static Pointer New()
mitkToFCameraMESASR4000Device.h
mitk::ToFCameraMESASR4000DeviceFactory
ToFCameraMESASR4000DeviceFactory is an implementation of the factory pattern to generate MESASR4000De...
Definition: mitkToFCameraMESASR4000DeviceFactory.h:30
mitk::AbstractToFDeviceFactory
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
Definition: mitkAbstractToFDeviceFactory.h:32