MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraMESASR4000Device.cpp
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============================================================================*/
14#include "mitkRealTimeClock.h"
15
16#include "itkMultiThreader.h"
17
18
19namespace mitk
20{
22 {
23 m_Controller = ToFCameraMESASR4000Controller::New();
24 }
25
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}
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
bool GetBoolProperty(const char *propertyKey, bool &boolValue)
get a bool from the property list
ToFCameraMESAController::Pointer m_Controller
corresponding CameraController
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
Interface to the Time-of-Flight (ToF) camera MESA Swissranger 4000.
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.
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
IGT Exceptions.
int strcmp(const String &s1, const String &s2)
Definition relates.cpp:14