22 #include <vtkRegressionTestImage.h> 30 geometry->InitializeStandardPlane(image->
GetGeometry(), orientation, zPos);
33 geometryData->SetPlaneGeometry(geometry);
36 node->SetData(geometryData);
51 MITK_WARN <<
"Test not run: " << e.GetDescription();
64 auto zCoord =
image->GetGeometry()->GetBoundingBox()->GetCenter()[0];
71 auto transform = mitk::AffineTransform3D::New();
73 rotationAxis.Fill(0.0);
75 transform->Rotate3D(rotationAxis, vnl_math::pi_over_4);
77 planeGeometry->Compose(transform);
79 auto bounds = planeGeometry->GetBounds();
81 planeGeometry->SetBounds(bounds);
83 planeGeometry->SetReferenceGeometry(
nullptr);
85 planeNode->SetIntProperty(
"Crosshair.Gap Size", 4);
89 "CompareRenderWindowAgainstReference test result positive?");
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
void SaveReferenceScreenShot(std::string fileName)
SaveReferenceScreenShot Convenience method to save a reference screen shot.
Tests for type compatibility (dynamic_cast).
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)
Specialized mitk::Exception for skipped tests.
Image class for storing images.
Data class containing PlaneGeometry objects.
mitk::Image::Pointer image
mitk::DataNode::Pointer addPlaneToDataStorage(mitk::RenderingTestHelper &renderingHelper, mitk::Image *image, mitk::PlaneGeometry::PlaneOrientation orientation, mitk::ScalarType zPos)
mitk::DataStorage::Pointer GetDataStorage()
Returns the datastorage, in order to modify the data inside a rendering test.
void AddNodeToStorage(mitk::DataNode::Pointer node)
AddNodeToStorage Add a node to the datastorage and perform a reinit which is necessary for rendering...
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
int mitkPlaneGeometryDataMapper2DTest(int argc, char *argv[])