24 #include "vtkPoints.h"
25 #include "vtkSmartPointer.h"
33 CPPUNIT_TEST_SUITE(mitkPointTypeConversionTestSuite);
45 CPPUNIT_TEST_SUITE_END();
48 vtkSmartPointer<vtkPoints> a_vtkPoints;
63 template <
typename T1,
typename T2>
66 CPPUNIT_ASSERT_EQUAL_MESSAGE(
67 "\nAssigning " + v2Name +
" to " + v1Name +
":\n both are equal",
true,
EqualArray(v1, v2, 3,
eps));
71 void setUp(
void)
override
77 a_vtkPoints->Initialize();
80 void tearDown(
void)
override
85 void Mitk2Itk_PointCompatibility()
89 itk::Point<ScalarType, 3> itkPoint3D = point3D;
91 TestForEquality(itkPoint3D, point3D,
"itk::Point",
"mitk:Point");
94 void Itk2Mitk_PointCompatibility()
96 itk::Point<ScalarType, 3> itkPoint3D = valuesToCopy;
100 TestForEquality(point3D, itkPoint3D,
"mitk:Point",
"itk::Point");
103 void Vtk2Mitk_PointCompatibility()
105 a_vtkPoints->InsertNextPoint(valuesToCopy);
107 a_vtkPoints->GetPoint(0, vtkPoint);
111 TestForEquality(point3D, vtkPoint,
"mitk:Point",
"vtkPoint");
114 void Mitk2Pod_PointCompatibility()
121 TestForEquality(podPoint, point3D,
"POD point",
"mitk::Point");
124 void Pod2Mitk_PointCompatibility()
128 itk::Point<double, 3> point3D = podPoint;
130 TestForEquality(point3D, podPoint,
"mitk::Point3D",
"POD point");
135 itk::Vector<double, 3> vector3D = originalValues;
137 itk::Point<double, 3> point3D = vector3D;
139 TestForEquality(point3D, vector3D,
"mitk::Point",
"mitk::Vector");
bool EqualArray(TArrayType1 &arrayType1, TArrayType2 &arrayType2, int size, ScalarType eps=mitk::eps, bool verbose=false)
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
DataCollection - Class to facilitate loading/accessing structured data.
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
Test fixture for parameterized tests.
MITKCORE_EXPORT const ScalarType eps
void ToArray(ArrayType array) const
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.