36 #include <vtkDebugLeaks.h> 42 CPPUNIT_TEST_SUITE(mitkPlanarFigureInteractionTestSuite);
47 MITK_TEST(DoubleEllipseInteractionCreate);
48 MITK_TEST(PlanarFourPointAngleInteractionCreate);
50 MITK_TEST(PlanarPolygonInteractionCreate);
51 MITK_TEST(NonClosedPlanarPolygonInteractionCreate);
56 CPPUNIT_TEST_SUITE_END();
62 vtkDebugLeaks::SetExitError(0);
73 node->SetData(figure);
79 figure->SetGeometry(testImage->GetGeometry());
82 dn->SetData(testImage);
83 interactionTestHelper.AddNodeToStorage(dn);
84 interactionTestHelper.GetDataStorage()->Add(node, dn);
86 node->SetName(
"PLANAR FIGURE");
88 node->SetSelected(
true);
94 figureInteractor->LoadStateMachine(
"PlanarFigureInteraction.xml", planarFigureModule);
95 figureInteractor->SetEventConfig(
"PlanarFigureConfig.xml", planarFigureModule);
96 figureInteractor->SetDataNode(node);
99 interactionTestHelper.PlaybackInteraction();
111 void AngleInteractionCreate()
115 RunTest(figure,
"InteractionTestData/Interactions/Angle1.xml",
"InteractionTestData/ReferenceData/Angle1.pf");
118 void Angle2InteractionCreate()
122 RunTest(figure,
"InteractionTestData/Interactions/Angle2.xml",
"InteractionTestData/ReferenceData/Angle2.pf");
125 void BezierCurveInteractionCreate()
129 RunTest(figure,
"InteractionTestData/Interactions/Bezier.xml",
"InteractionTestData/ReferenceData/Bezier.pf");
132 void CircleInteractionCreate()
136 RunTest(figure,
"InteractionTestData/Interactions/Circle.xml",
"InteractionTestData/ReferenceData/Circle.pf");
139 void DoubleEllipseInteractionCreate()
142 figure = mitk::PlanarDoubleEllipse::New();
144 "InteractionTestData/Interactions/DoubleEllipse.xml",
145 "InteractionTestData/ReferenceData/DoubleEllipse.pf");
148 void PlanarSubdivisionInteractionCreate()
153 "InteractionTestData/Interactions/SubdivisionPolygon.xml",
154 "InteractionTestData/ReferenceData/SubDivision.pf");
157 void PlanarFourPointAngleInteractionCreate()
162 "InteractionTestData/Interactions/Planar4PointAngle.xml",
163 "InteractionTestData/ReferenceData/Planar4PointAngle.pf");
166 void PlanarLineInteractionCreate()
170 RunTest(figure,
"InteractionTestData/Interactions/Line.xml",
"InteractionTestData/ReferenceData/Line.pf");
173 void PlanarPolygonInteractionCreate()
177 RunTest(figure,
"InteractionTestData/Interactions/Polygon.xml",
"InteractionTestData/ReferenceData/Polygon.pf");
180 void NonClosedPlanarPolygonInteractionCreate()
186 figure.GetPointer(),
"InteractionTestData/Interactions/Path.xml",
"InteractionTestData/ReferenceData/Path.pf");
189 void RectangleInteractionCreate()
193 RunTest(figure,
"InteractionTestData/Interactions/Rectangle.xml",
"InteractionTestData/ReferenceData/Rectangle.pf");
197 mitkPlanarFigureInteractionTestSuite() : m_RenderingTestHelper(300, 300) {}
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
static Module * GetModule(long id)
#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.
#define MITK_ASSERT_EQUAL(EXPECTED, ACTUAL, MSG)
Testing macro to test if two objects are equal.
Creates everything needed to load and playback interaction events.