22 #include <vtkCleanPolyData.h>
31 CPPUNIT_TEST_SUITE(mitkCovarianceMatrixCalculatorTestSuite);
32 MITK_TEST(testCovarianceMatrixCalculation_CM_PCA);
33 CPPUNIT_TEST_SUITE_END();
36 typedef itk::Matrix<double, 3, 3> CovarianceMatrix;
37 typedef std::vector<CovarianceMatrix> CovarianceMatrixList;
40 CovarianceMatrixList m_Reference;
48 CovarianceMatrix m1, m2, m3;
61 m_Reference.push_back(m1);
72 m_Reference.push_back(m2);
83 m_Reference.push_back(m3);
86 void tearDown()
override
92 void testCovarianceMatrixCalculation_CM_PCA()
95 matrixCalculator->SetInputSurface(m_Surface);
96 matrixCalculator->ComputeCovarianceMatrices();
97 CovarianceMatrixList result = matrixCalculator->GetCovarianceMatrices();
99 CPPUNIT_ASSERT_MESSAGE(
"mitkCovarianceMatrixCalculatorTestSuite test first matrix",
102 CPPUNIT_ASSERT_MESSAGE(
"mitkCovarianceMatrixCalculatorTestSuite test middle matrix",
105 CPPUNIT_ASSERT_MESSAGE(
"mitkCovarianceMatrixCalculatorTestSuite test last matrix",
static mitk::Surface::Pointer LoadSurface(const std::string &path)
LoadSurface Convenience method to load an arbitrary mitkSurface.
itk::SmartPointer< Self > Pointer
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
bool MatrixEqualElementWise(const vnl_matrix_fixed< TCoordRep, NRows, NCols > &matrix1, const vnl_matrix_fixed< TCoordRep, NRows, NCols > &matrix2, mitk::ScalarType epsilon=mitk::eps)
Check for element-wise matrix equality with a user defined accuracy.
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
static std::string GetTestDataFilePath(const std::string &testData)
Get the absolute path for test data.
Test fixture for parameterized tests.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.