MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraMESASR4000DeviceFactory.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef mitkToFCameraMESASR4000DeviceFactory_h
13#define mitkToFCameraMESASR4000DeviceFactory_h
14
15#include <MitkMESASR4000ModuleExports.h>
20#include <mitkToFConfig.h>
21
22namespace mitk
23{
30 class MITKMESASR4000_EXPORT ToFCameraMESASR4000DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
31
32 public:
43 std::string GetFactoryName()
44 {
45 return std::string("MESA SR4000 Factory");
46 }
47
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...
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.
std::string GetCurrentDeviceName()
GetCurrentDeviceName Get the name of the current MESA SR4000. First device is named "MESA SR4000",...
IGT Exceptions.
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...