27 CPPUNIT_TEST_SUITE(mitkMatrixTypeConversionTestSuite);
32 CPPUNIT_TEST_SUITE_END();
46 template <
typename T1,
typename T2>
47 void TestForEquality(
const T1 &m1,
const T2 &m2)
49 for (
unsigned i = 0; i < 3; i++)
51 for (
unsigned j = 0; j < 3; j++)
54 ss <<
"element [" << i <<
"][" << j <<
"] equal for mitkMatrix and podMatrix";
56 CPPUNIT_ASSERT_EQUAL_MESSAGE(ss.str(),
true, (m1[i][j] == m2[i][j]));
62 void setUp(
void)
override
64 for (
unsigned i = 0; i < 3; i++)
65 for (
unsigned j = 0; j < 3; j++)
67 mitkMatrix3D[i][j] = i + j;
72 void tearDown(
void)
override {}
75 mitkMatrix3D.
ToArray(podMatrix3D);
77 TestForEquality(mitkMatrix3D, podMatrix3D);
84 TestForEquality(podMatrix3D, mitkMatrix3D);
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
void ToArray(MatrixType matrix) const
void FillMatrix(const ArrayType &array)
Test fixture for parameterized tests.