12 #ifndef mitkToFTestingCommon_h
13 #define mitkToFTestingCommon_h
15 #include <MitkToFProcessingExports.h>
20 #include <itksys/SystemTools.hxx>
22 #include <vtkSmartPointer.h>
23 #include <vtkPolyData.h>
39 bool pointSetsEqual =
true;
40 if (pointSet1->GetSize()==pointSet2->GetSize())
42 for (
int i=0; i<pointSet1->GetSize(); i++)
48 std::cout << std::endl;
49 std::cout << std::setprecision(12) <<
"expected: " << expectedPoint;
50 std::cout << std::endl;
51 std::cout << std::setprecision(12) <<
"resultPoint: " << resultPoint;
52 std::cout << std::endl;
53 pointSetsEqual =
false;
59 pointSetsEqual =
false;
60 MITK_INFO<<
"Point sets have different size: "<<pointSet1->GetSize()<<
" vs. "<<pointSet2->GetSize();
62 return pointSetsEqual;
73 return PointSetsEqual(VtkPolyDataToMitkPointSet(poly1), VtkPolyDataToMitkPointSet(poly2));
84 int numberOfPoints = poly->GetNumberOfPoints();
85 for (
int i=0; i<numberOfPoints; i++)
87 double* currentPoint = poly->GetPoint(i);
89 point[0] = currentPoint[0];
90 point[1] = currentPoint[1];
91 point[2] = currentPoint[2];
92 result->InsertPoint(i,point);