MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraPMDCamBoardControllerTest.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============================================================================*/
12
13#include <mitkTestingMacros.h>
15
19int mitkToFCameraPMDCamBoardControllerTest(int /* argc */, char* /*argv*/[])
20{
21 MITK_TEST_BEGIN("ToFCameraPMDCamBoardController");
22
23 mitk::ToFCameraPMDCamBoardController::Pointer testObject = mitk::ToFCameraPMDCamBoardController::New();
24 MITK_TEST_CONDITION_REQUIRED(!testObject.GetPointer()==nullptr,"Testing initialzation!");
25 MITK_TEST_CONDITION_REQUIRED(testObject->GetCaptureHeight()== 200 ,"Testing initialization of CaptureHeight");
26 MITK_TEST_CONDITION_REQUIRED(testObject->GetCaptureWidth()== 200 ,"Testing initialization of CaptureWidth");
27 MITK_TEST_CONDITION_REQUIRED(testObject->OpenCameraConnection(),"Testing opening of camera connection!");
28 MITK_TEST_CONDITION_REQUIRED(testObject->UpdateCamera(),"Testing UpdateCamera()");
29 MITK_TEST_CONDITION_REQUIRED(testObject->SetDistanceOffset(0.5f),"Testing SetDistanceOffset()");
30 MITK_TEST_OUTPUT(<<"Call GetDistanceOffset()");
31 MITK_INFO<<testObject->GetDistanceOffset();
32 MITK_TEST_CONDITION_REQUIRED(testObject->SetRegionOfInterest(3,5,200,201),"Testing SetRegionOfInterest()");
33 MITK_TEST_OUTPUT(<<"Call GetRegionOfInterest()");
34 MITK_INFO<<testObject->GetRegionOfInterest();
35 MITK_TEST_CONDITION_REQUIRED(testObject->SetFieldOfView(35.7f),"Testing SetFieldOfView()");
36 MITK_TEST_CONDITION_REQUIRED(testObject->CloseCameraConnection(),"Testing closing of camera connection!");
37
38 MITK_TEST_END();
39
40}
int mitkToFCameraPMDCamBoardControllerTest(int, char *[])