39 #include <vtkDebugLeaks.h>
45 CPPUNIT_TEST_SUITE(mitkPlanarFigureInteractionTestSuite);
50 MITK_TEST(DoubleEllipseInteractionCreate);
51 MITK_TEST(PlanarFourPointAngleInteractionCreate);
53 MITK_TEST(PlanarPolygonInteractionCreate);
54 MITK_TEST(NonClosedPlanarPolygonInteractionCreate);
59 CPPUNIT_TEST_SUITE_END();
65 vtkDebugLeaks::SetExitError(0);
76 node->SetData(figure);
82 figure->SetGeometry(testImage->GetGeometry());
85 dn->SetData(testImage);
86 interactionTestHelper.AddNodeToStorage(dn);
87 interactionTestHelper.GetDataStorage()->Add(node, dn);
89 node->SetName(
"PLANAR FIGURE");
91 node->SetSelected(
true);
97 figureInteractor->LoadStateMachine(
"PlanarFigureInteraction.xml", planarFigureModule);
98 figureInteractor->SetEventConfig(
"PlanarFigureConfig.xml", planarFigureModule);
99 figureInteractor->SetDataNode(node);
102 interactionTestHelper.PlaybackInteraction();
114 void AngleInteractionCreate()
118 RunTest(figure,
"InteractionTestData/Interactions/Angle1.xml",
"InteractionTestData/ReferenceData/Angle1.pf");
121 void Angle2InteractionCreate()
125 RunTest(figure,
"InteractionTestData/Interactions/Angle2.xml",
"InteractionTestData/ReferenceData/Angle2.pf");
128 void BezierCurveInteractionCreate()
131 figure = mitk::PlanarBezierCurve::New();
132 RunTest(figure,
"InteractionTestData/Interactions/Bezier.xml",
"InteractionTestData/ReferenceData/Bezier.pf");
135 void CircleInteractionCreate()
139 RunTest(figure,
"InteractionTestData/Interactions/Circle.xml",
"InteractionTestData/ReferenceData/Circle.pf");
142 void DoubleEllipseInteractionCreate()
147 "InteractionTestData/Interactions/DoubleEllipse.xml",
148 "InteractionTestData/ReferenceData/DoubleEllipse.pf");
151 void PlanarSubdivisionInteractionCreate()
156 "InteractionTestData/Interactions/SubdivisionPolygon.xml",
157 "InteractionTestData/ReferenceData/SubDivision.pf");
160 void PlanarFourPointAngleInteractionCreate()
165 "InteractionTestData/Interactions/Planar4PointAngle.xml",
166 "InteractionTestData/ReferenceData/Planar4PointAngle.pf");
169 void PlanarLineInteractionCreate()
173 RunTest(figure,
"InteractionTestData/Interactions/Line.xml",
"InteractionTestData/ReferenceData/Line.pf");
176 void PlanarPolygonInteractionCreate()
180 RunTest(figure,
"InteractionTestData/Interactions/Polygon.xml",
"InteractionTestData/ReferenceData/Polygon.pf");
183 void NonClosedPlanarPolygonInteractionCreate()
189 figure.GetPointer(),
"InteractionTestData/Interactions/Path.xml",
"InteractionTestData/ReferenceData/Path.pf");
192 void RectangleInteractionCreate()
196 RunTest(figure,
"InteractionTestData/Interactions/Rectangle.xml",
"InteractionTestData/ReferenceData/Rectangle.pf");
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.
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.