23 #include <vtkPolyData.h>
24 #include <vtkSTLReader.h>
25 #include <vtkSmartPointer.h>
31 CPPUNIT_TEST_SUITE(mitkSTLFileReaderTestSuite);
33 CPPUNIT_TEST_SUITE_END();
37 std::string m_SurfacePath;
45 void tearDown()
override {}
52 CPPUNIT_ASSERT_MESSAGE(
"Reader output not NULL", surface.IsNotNull());
53 CPPUNIT_ASSERT_MESSAGE(
"IsInitialized()", surface->IsInitialized());
54 CPPUNIT_ASSERT_MESSAGE(
"mitk::Surface::SetVtkPolyData()", (surface->GetVtkPolyData() != NULL));
55 CPPUNIT_ASSERT_MESSAGE(
"Availability of geometry", (surface->GetGeometry() != NULL));
59 myVtkSTLReader->SetFileName(m_SurfacePath.c_str());
60 myVtkSTLReader->Update();
61 vtkSmartPointer<vtkPolyData> myVtkPolyData = myVtkSTLReader->GetOutput();
63 int n = myVtkPolyData->GetNumberOfPoints();
65 int m = surface->GetVtkPolyData()->GetNumberOfPoints();
66 CPPUNIT_ASSERT_MESSAGE(
"Number of Points in VtkPolyData", (n == m));
static mitk::Surface::Pointer LoadSurface(const std::string &path)
LoadSurface Convenience method to load an arbitrary mitkSurface.
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#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.