18 #include <vtkSmartPointer.h> 19 #include <vtkTexturedSphereSource.h> 23 auto source = vtkSmartPointer<vtkTexturedSphereSource>::New();
24 source->SetThetaResolution(64);
25 source->SetPhiResolution(32);
26 source->SetRadius(16.0);
30 surface->SetVtkPolyData(source->GetOutput());
40 dataStorage->
Add(node);
53 MITK_WARN <<
"Test not run: " << e.GetDescription();
72 surfaceNode->SetProperty(
"Surface.Texture", textureProperty);
74 textureNode->SetVisibility(
false);
79 bool generateReferenceScreenshot =
false;
80 if (generateReferenceScreenshot)
87 "CompareRenderWindowAgainstReference test result positive?");
Class for storing surfaces (vtkPolyData).
Data management class that handles 'was created by' relations.
void SetMapperID(mitk::BaseRenderer::StandardMapperSlot id)
SetMapperID Change between Standard2D and 3D mappers.
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
void SaveReferenceScreenShot(std::string fileName)
SaveReferenceScreenShot Convenience method to save a reference screen shot.
virtual void Add(DataNode *node, const DataStorage::SetOfObjects *parents=nullptr)=0
Adds a DataNode containing a data object to its internal storage.
bool CompareRenderWindowAgainstReference(int argc, char *argv[], double threshold=10.0)
CompareRenderWindowAgainstReference Convenience method to compare the image rendered in the internal ...
#define MITK_TEST_CONDITION(COND, MSG)
static RenderingManager * GetInstance()
Specialized mitk::Exception for skipped tests.
Image class for storing images.
mitk::Surface::Pointer CreateTexturedSphere()
mitk::DataStorage::Pointer GetDataStorage()
Returns the datastorage, in order to modify the data inside a rendering test.
static Pointer New(const char *_arg)
vtkRenderer * GetVtkRenderer()
Getter for the vtkRenderer.
int mitkSurfaceVtkMapper3DTest(int argc, char *argv[])
void AddGeneratedDataToStorage(mitk::DataStorage *dataStorage)
virtual void InitializeViewsByBoundingObjects(const DataStorage *)
Initializes the renderwindows by the aggregated geometry of all objects that are held in the data sto...