Medical Imaging Interaction Toolkit  2016.11.0
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,
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 ===================================================================*/
18 #include "mitkRealTimeClock.h"
19 
20 #include "itkMultiThreader.h"
21 
22 
23 namespace mitk
24 {
26  {
28  }
29 
31  {
32  }
33 
34  void ToFCameraMESASR4000Device::SetRegionOfInterest(unsigned int leftUpperCornerX, unsigned int leftUpperCornerY, unsigned int width, unsigned int height)
35  {
36  //if (m_Controller.IsNotNull())
37  //{
38  // dynamic_cast<ToFCameraMESASR4000Controller*>(m_Controller.GetPointer())->SetRegionOfInterest(leftUpperCornerX,leftUpperCornerY,width,height);
39  //}
40  }
41 
42  void ToFCameraMESASR4000Device::SetProperty( const char *propertyKey, BaseProperty* propertyValue )
43  {
44  ToFCameraMESADevice::SetProperty(propertyKey,propertyValue);
45  this->m_PropertyList->SetProperty(propertyKey, propertyValue);
46 
47  ToFCameraMESASR4000Controller::Pointer myController = dynamic_cast<mitk::ToFCameraMESASR4000Controller*>(this->m_Controller.GetPointer());
48 
49  bool boolValue = false;
50  GetBoolProperty(propertyKey, boolValue);
51  if (strcmp(propertyKey, "SetFPN") == 0)
52  {
53  myController->SetFPN(boolValue);
54  }
55  else if (strcmp(propertyKey, "SetConvGray") == 0)
56  {
57  myController->SetConvGray(boolValue);
58  }
59  else if (strcmp(propertyKey, "SetMedian") == 0)
60  {
61  myController->SetMedian(boolValue);
62  }
63  else if (strcmp(propertyKey, "SetANF") == 0)
64  {
65  myController->SetANF(boolValue);
66  }
67  }
68 
69 }
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
itk::SmartPointer< Self > Pointer
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...