26 #include <vtkFloatArray.h>
27 #include <vtkPointData.h>
28 #include <vtkPolyData.h>
29 #include <vtkRegressionTestImage.h>
30 #include <vtkSphereSource.h>
31 #include <vtkTextureMapToSphere.h>
54 sphere->SetThetaResolution(12);
55 sphere->SetPhiResolution(12);
56 sphere->SetRadius(50.0);
57 sphere->SetCenter(50, 0, 0);
61 mapToSphere->SetInputConnection(sphere->GetOutputPort());
62 mapToSphere->PreventSeamOn();
70 surfaceToPutTextureOn->SetVtkPolyData(static_cast<vtkPolyData *>(mapToSphere->GetOutput()));
73 surfaceNode->SetData(surfaceToPutTextureOn);
76 surfaceNode->SetProperty(
"Surface.Texture", textureProperty);
82 bool generateReferenceScreenshot =
false;
83 if (generateReferenceScreenshot)
90 "CompareRenderWindowAgainstReference test result positive?");
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.
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)
Image class for storing images.
int mitkSurfaceVtkMapper3DTexturedSphereTest(int argc, char *argv[])
mitkSurfaceVtkMapper3DTexturedSphereTest This test puts a texture onto a sphere. It is a nice example...
mitk::DataStorage::Pointer GetDataStorage()
Returns the datastorage, in order to modify the data inside a rendering test.
static Pointer New(const char *_arg)
void AddNodeToStorage(mitk::DataNode::Pointer node)
AddNodeToStorage Add a node to the datastorage and perform a reinit which is necessary for rendering...
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.