Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkToFCameraPMDCamCubeDevice.cpp
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 ============================================================================*/
13 #include "mitkRealTimeClock.h"
14 
15 #include "itkMultiThreader.h"
16 
17 
18 namespace mitk
19 {
21  {
23  }
24 
26  {
27  }
28 
29  void ToFCameraPMDCamCubeDevice::SetProperty( const char *propertyKey, BaseProperty* propertyValue )
30  {
31  ToFCameraPMDDevice::SetProperty(propertyKey,propertyValue);
32  this->m_PropertyList->SetProperty(propertyKey, propertyValue);
33 
34  ToFCameraPMDCamCubeController::Pointer myController = dynamic_cast<mitk::ToFCameraPMDCamCubeController*>(this->m_Controller.GetPointer());
35 
36  bool boolValue = false;
37  GetBoolProperty(propertyKey, boolValue);
38  if (strcmp(propertyKey, "SetFPNCalibration") == 0)
39  {
40  myController->SetFPNCalibration(boolValue);
41  }
42  else if (strcmp(propertyKey, "SetFPPNCalibration") == 0)
43  {
44  myController->SetFPPNCalibration(boolValue);
45  }
46  else if (strcmp(propertyKey, "SetLinearityCalibration") == 0)
47  {
48  myController->SetLinearityCalibration(boolValue);
49  }
50  else if (strcmp(propertyKey, "SetLensCalibration") == 0)
51  {
52  myController->SetLensCalibration(boolValue);
53  }
54  else if (strcmp(propertyKey, "SetExposureMode") == 0)
55  {
56  if (boolValue)
57  {
58  myController->SetExposureMode(1);
59  }
60  else
61  {
62  myController->SetExposureMode(0);
63  }
64  }
65  }
66 
67 }
bool GetBoolProperty(const char *propertyKey, bool &boolValue)
get a bool from the property list
DataCollection - Class to facilitate loading/accessing structured data.
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
ToFCameraPMDController::Pointer m_Controller
corresponding CameraController
Abstract base class for properties.
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
Interface to the Time-of-Flight (ToF) camera PMD CamCube.