25 CPPUNIT_TEST_SUITE(mitkManualPlacementAnnotationRendererTestSuite);
29 CPPUNIT_TEST_SUITE_END();
34 std::vector<std::string> m_CommandlineArgs;
35 std::string m_PathToBall;
36 std::string m_PathToImage;
37 std::string m_ReferenceImagePath;
45 mitkManualPlacementAnnotationRendererTestSuite() : m_RenderingTestHelper(300, 300) {}
56 m_ReferenceImagePath =
"RenderingTestData/ReferenceScreenshots/Annotation/";
64 m_CommandlineArgs.push_back(
"-V");
68 void Render2DAnnotation()
78 std::string refImagePath =
GetTestDataFilePath(m_ReferenceImagePath +
"ManualPlacementAnnotationRenderer2DAnnotation.png");
81 m_CommandlineArgs.push_back(refImagePath);
88 textAnnotation2D->SetText(
"TEST ManualPlacementAnnotationRenderer2DAnnotation");
92 textAnnotation2D->SetPosition2D(pos);
97 m_RenderingTestHelper.
Render();
103 void Render3DAnnotation()
113 std::string refImagePath =
GetTestDataFilePath(m_ReferenceImagePath +
"ManualPlacementAnnotationRenderer3DAnnotation.png");
115 m_CommandlineArgs.push_back(refImagePath);
122 textAnnotation3D->SetText(
"TEST ManualPlacementAnnotationRenderer3DAnnotation");
127 textAnnotation3D->SetPosition3D(pos);
132 m_RenderingTestHelper.
Render();
void SetViewDirection(mitk::SliceNavigationController::ViewDirection viewDirection)
Set the view direction of the renderwindow (e.g. sagittal, coronal, axial)
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
static BaseRenderer * GetInstance(vtkRenderWindow *renWin)
vtkRenderWindow * GetVtkRenderWindow()
Getter for the vtkRenderWindow which should be used to call vtkRegressionTestImage.
Organizes the rendering process.
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
void SetMapperIDToRender3D()
SetMapperIDToRender3D Convenience method to render in a 3D renderwindow.
static std::string GetTestDataFilePath(const std::string &testData)
Get the absolute path for test data.
bool CompareRenderWindowAgainstReference(int argc, char *argv[], double threshold=10.0)
CompareRenderWindowAgainstReference Convenience method to compare the image rendered in the internal ...
void Render()
Render everything into an mitkRenderWindow. Call SetViewDirection() and SetProperty() before this met...
Test fixture for parameterized tests.
static void AddAnnotation(Annotation *Annotation, const std::string &rendererID)
The ArgcHelperClass class is a convinience class to convert a vector of strings to the standard c++ a...
void SetAutomaticallyCloseRenderWindow(bool automaticallyCloseRenderWindow)
SetStopRenderWindow Convenience method to make the renderwindow hold after rendering. Usefull for debugging.
void AddNodeToStorage(mitk::DataNode::Pointer node)
AddNodeToStorage Add a node to the datastorage and perform a reinit which is necessary for rendering...
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Load a file into the given DataStorage.