29 CPPUNIT_TEST_SUITE(mitkSliceNavigationControllerTestSuite);
30 CPPUNIT_TEST(validateAxialViewDirection);
31 CPPUNIT_TEST(validateCoronalViewDirection);
32 CPPUNIT_TEST(validateSagittalViewDirection);
33 CPPUNIT_TEST_SUITE_END();
51 planeGeometry->InitializeStandardPlane(firstAxisVector, secondAxisVector, &spacing);
52 planeGeometry->SetOrigin(origin);
54 unsigned int numberOfSlices = 100U;
57 slicedGeometry3D->InitializeEvenlySpaced(planeGeometry, numberOfSlices);
60 m_Geometry3D->SetBounds(slicedGeometry3D->GetBounds());
61 m_Geometry3D->SetIndexToWorldTransform(slicedGeometry3D->GetIndexToWorldTransform());
64 void tearDown()
override
68 void validateAxialViewDirection()
72 sliceNavigationController->SetInputWorldGeometry3D(m_Geometry3D);
74 sliceNavigationController->Update();
88 std::cout <<
"Axial view direction" << std::endl;
89 CPPUNIT_ASSERT(this->validateGeometry(sliceNavigationController->GetCurrentGeometry3D(), origin, firstAxisVector, secondAxisVector, thirdAxisVector));
92 void validateCoronalViewDirection()
96 sliceNavigationController->SetInputWorldGeometry3D(m_Geometry3D);
98 sliceNavigationController->Update();
112 std::cout <<
"Coronal view direction" << std::endl;
113 CPPUNIT_ASSERT(this->validateGeometry(sliceNavigationController->GetCurrentGeometry3D(), origin, firstAxisVector, secondAxisVector, thirdAxisVector));
116 void validateSagittalViewDirection()
120 sliceNavigationController->SetInputWorldGeometry3D(m_Geometry3D);
122 sliceNavigationController->Update();
136 std::cout <<
"Sagittal view direction" << std::endl;
137 CPPUNIT_ASSERT(this->validateGeometry(sliceNavigationController->GetCurrentGeometry3D(), origin, firstAxisVector, secondAxisVector, thirdAxisVector));
145 std::cout <<
" Origin" << std::endl;
150 std::cout <<
" First axis vector" << std::endl;
155 std::cout <<
" Second axis vector" << std::endl;
160 std::cout <<
" Third axis vector" << std::endl;
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
Test fixture for parameterized tests.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
MITKCORE_EXPORT const ScalarType eps