MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraPMDCamCubeControllerTest.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 mitkToFCameraPMDCamCubeControllerTest(int /* argc */, char* /*argv*/[])
20{
21
22 MITK_TEST_BEGIN("ToFCameraPMDCamCubeController");
23 mitk::ToFCameraPMDCamCubeController::Pointer camCubeController = mitk::ToFCameraPMDCamCubeController::New();
24 try
25 {
26
27 MITK_TEST_CONDITION_REQUIRED(camCubeController.IsNotNull(),"Testing initialzation!");
28 MITK_TEST_CONDITION_REQUIRED(camCubeController->GetCaptureHeight()== 200 ,"Testing initialization of CaptureHeight");
29 MITK_TEST_CONDITION_REQUIRED(camCubeController->GetCaptureWidth()== 200 ,"Testing initialization of CaptureWidth");
30 MITK_TEST_CONDITION_REQUIRED(camCubeController->OpenCameraConnection(),"Testing opening of camera connection!");
31 MITK_TEST_CONDITION_REQUIRED(camCubeController->UpdateCamera(),"Testing UpdateCamera()");
32 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetDistanceOffset(0.5f),"Testing SetDistanceOffset()");
33 MITK_TEST_OUTPUT(<<"Call GetDistanceOffset()");
34 MITK_INFO<<camCubeController->GetDistanceOffset();
35 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetRegionOfInterest(3,5,200,201),"Testing SetRegionOfInterest()");
36 MITK_TEST_OUTPUT(<<"Call GetRegionOfInterest()");
37 MITK_INFO<<camCubeController->GetRegionOfInterest();
38 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetExposureMode(0),"Testing SetExposureMode()");
39 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetFieldOfView(35.7f),"Testing SetFieldOfView()");
40 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetFPNCalibration(true),"Testing SetFPNCalibration()");
41 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetFPPNCalibration(true),"Testing SetFPPNCalibration()");
42 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetLinearityCalibration(true),"Testing SetLinearityCalibration()");
43 MITK_TEST_CONDITION_REQUIRED(camCubeController->SetLensCalibration(true),"Testing SetLensCalibration()");
44 MITK_TEST_CONDITION_REQUIRED(camCubeController->CloseCameraConnection(),"Testing closing of camera connection!");
45 }
46 catch(std::exception &e)
47 {
48 MITK_INFO << e.what();
49 }
50
51 MITK_TEST_END();
52}
int mitkToFCameraPMDCamCubeControllerTest(int, char *[])