Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkToFCameraMESASR4000Device.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 ============================================================================*/
14 #include "mitkRealTimeClock.h"
15 
16 #include "itkMultiThreader.h"
17 
18 
19 namespace mitk
20 {
22  {
24  }
25 
27  {
28  }
29 
30  void ToFCameraMESASR4000Device::SetRegionOfInterest(unsigned int leftUpperCornerX, unsigned int leftUpperCornerY, unsigned int width, unsigned int height)
31  {
32  //if (m_Controller.IsNotNull())
33  //{
34  // dynamic_cast<ToFCameraMESASR4000Controller*>(m_Controller.GetPointer())->SetRegionOfInterest(leftUpperCornerX,leftUpperCornerY,width,height);
35  //}
36  }
37 
38  void ToFCameraMESASR4000Device::SetProperty( const char *propertyKey, BaseProperty* propertyValue )
39  {
40  ToFCameraMESADevice::SetProperty(propertyKey,propertyValue);
41  this->m_PropertyList->SetProperty(propertyKey, propertyValue);
42 
43  ToFCameraMESASR4000Controller::Pointer myController = dynamic_cast<mitk::ToFCameraMESASR4000Controller*>(this->m_Controller.GetPointer());
44 
45  bool boolValue = false;
46  GetBoolProperty(propertyKey, boolValue);
47  if (strcmp(propertyKey, "SetFPN") == 0)
48  {
49  myController->SetFPN(boolValue);
50  }
51  else if (strcmp(propertyKey, "SetConvGray") == 0)
52  {
53  myController->SetConvGray(boolValue);
54  }
55  else if (strcmp(propertyKey, "SetMedian") == 0)
56  {
57  myController->SetMedian(boolValue);
58  }
59  else if (strcmp(propertyKey, "SetANF") == 0)
60  {
61  myController->SetANF(boolValue);
62  }
63  }
64 
65 }
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
Interface to the Time-of-Flight (ToF) camera MESA Swissranger 4000.
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
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
Abstract base class for properties.
ToFCameraMESAController::Pointer m_Controller
corresponding CameraController
void SetRegionOfInterest(unsigned int leftUpperCornerX, unsigned int leftUpperCornerY, unsigned int width, unsigned int height)
Setting the region of interest, the camera is configured to only output a certain area of the image...