Medical Imaging Interaction Toolkit  2016.11.0
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,
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 ===================================================================*/
17 #include "mitkRealTimeClock.h"
18 
19 #include "itkMultiThreader.h"
20 
21 
22 namespace mitk
23 {
25  {
27  }
28 
30  {
31  }
32 
33  void ToFCameraPMDCamCubeDevice::SetProperty( const char *propertyKey, BaseProperty* propertyValue )
34  {
35  ToFCameraPMDDevice::SetProperty(propertyKey,propertyValue);
36  this->m_PropertyList->SetProperty(propertyKey, propertyValue);
37 
38  ToFCameraPMDCamCubeController::Pointer myController = dynamic_cast<mitk::ToFCameraPMDCamCubeController*>(this->m_Controller.GetPointer());
39 
40  bool boolValue = false;
41  GetBoolProperty(propertyKey, boolValue);
42  if (strcmp(propertyKey, "SetFPNCalibration") == 0)
43  {
44  myController->SetFPNCalibration(boolValue);
45  }
46  else if (strcmp(propertyKey, "SetFPPNCalibration") == 0)
47  {
48  myController->SetFPPNCalibration(boolValue);
49  }
50  else if (strcmp(propertyKey, "SetLinearityCalibration") == 0)
51  {
52  myController->SetLinearityCalibration(boolValue);
53  }
54  else if (strcmp(propertyKey, "SetLensCalibration") == 0)
55  {
56  myController->SetLensCalibration(boolValue);
57  }
58  else if (strcmp(propertyKey, "SetExposureMode") == 0)
59  {
60  if (boolValue)
61  {
62  myController->SetExposureMode(1);
63  }
64  else
65  {
66  myController->SetExposureMode(0);
67  }
68  }
69  }
70 
71 }
itk::SmartPointer< Self > Pointer
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.