26 #include <vtkCellArray.h>
27 #include <vtkPolyData.h>
28 #include <vtkPolygon.h>
32 std::string VeryLongText =
33 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.Donec a diam lectus.Sed sit amet ipsum mauris.Maecenas "
34 "congue ligula ac quam viverra nec consectetur ante hendrerit.Donec et mollis dolor.Praesent et diam eget libero "
35 "egestas mattis sit amet vitae augue.Nam tincidunt congue enim, ut porta lorem lacinia consectetur.Donec ut libero "
36 "sed arcu vehicula ultricies a non tortor.Lorem ipsum dolor sit amet, consectetur adipiscing elit.Aenean ut "
37 "gravida lorem.Ut turpis felis, pulvinar a semper sed, adipiscing id dolor.Pellentesque auctor nisi id magna "
38 "consequat sagittis.Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet.Ut convallis "
39 "libero in urna ultrices accumsan.Donec sed odio eros.Donec viverra mi quis quam pulvinar at malesuada arcu "
40 "rhoncus.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.In rutrum accumsan "
41 "ultricies.Mauris vitae nisi at sem facilisis semper ac in est.\n"
42 "Vivamus fermentum semper porta.Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio.Maecenas "
43 "convallis ullamcorper ultricies.Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id "
44 "fringilla sem nunc vel mi.Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna "
45 "et turpis.Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci.Fusce eget orci a orci congue "
46 "vestibulum.Ut dolor diam, elementum et vestibulum eu, porttitor vel elit.Curabitur venenatis pulvinar tellus "
47 "gravida ornare.Sed et erat faucibus nunc euismod ultricies ut id justo.Nullam cursus suscipit nisi, et ultrices "
48 "justo sodales nec.Fusce venenatis facilisis lectus ac semper.Aliquam at massa ipsum.Quisque bibendum purus "
49 "convallis nulla ultrices ultricies.Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra "
50 "pretium nisi quam vitae mi.Fusce vel volutpat elit.Nam sagittis nisi dui.\r\n"
51 "Suspendisse lectus leo, consectetur in tempor sit amet, placerat quis neque.Etiam luctus porttitor lorem, sed "
52 "suscipit est rutrum non.Curabitur lobortis nisl a enim congue semper.Aenean commodo ultrices imperdiet.Vestibulum "
53 "ut justo vel sapien venenatis tincidunt.Phasellus eget dolor sit amet ipsum dapibus condimentum vitae quis "
54 "lectus.Aliquam ut massa in turpis dapibus convallis.Praesent elit lacus, vestibulum at malesuada et, ornare et "
55 "est.Ut augue nunc, sodales ut euismod non, adipiscing vitae orci.Mauris ut placerat justo.Mauris in ultricies "
56 "enim.Quisque nec est eleifend nulla ultrices egestas quis ut quam.Donec sollicitudin lectus a mauris pulvinar id "
57 "aliquam urna cursus.Cras quis ligula sem, vel elementum mi.Phasellus non ullamcorper urna.\t\n"
58 "Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.In euismod ultrices "
59 "facilisis.Vestibulum porta sapien adipiscing augue congue id pretium lectus molestie.Proin quis dictum nisl.Morbi "
60 "id quam sapien, sed vestibulum sem.Duis elementum rutrum mauris sed convallis.Proin vestibulum magna mi.Aenean "
61 "tristique hendrerit magna, ac facilisis nulla hendrerit ut.Sed non tortor sodales quam auctor elementum.Donec "
62 "hendrerit nunc eget elit pharetra pulvinar.Suspendisse id tempus tortor.Aenean luctus, elit commodo laoreet "
63 "commodo, justo nisi consequat massa, sed vulputate quam urna quis eros.Donec vel.";
70 return (*m_ScenarioProvider.*m_ProviderMethod)();
77 const std::string &_referenceArchiveFilename,
78 bool _isReferenceLoadable,
79 double _comparisonPrecision)
81 serializable(_isSerializable),
82 referenceArchiveFilename(_referenceArchiveFilename),
83 referenceArchiveLoadable(_isReferenceLoadable),
84 comparisonPrecision(_comparisonPrecision),
85 m_ScenarioProvider(_scenarioProvider),
86 m_ProviderMethod(_providerMethod)
97 void mitk::SceneIOTestScenarioProvider::AddScenario(
const std::string &key,
100 const std::string &referenceArchiveFilename,
101 bool isReferenceLoadable,
102 double comparisonPrecision)
104 Scenario newScenario(
105 key,
this, creator, isSerializable, referenceArchiveFilename, isReferenceLoadable, comparisonPrecision);
106 m_Scenarios.push_back(newScenario);
130 node->SetName(
"Urmel");
140 for (
auto i = 0; i < m_HowMuchIsMany; ++i)
145 node->SetName(s.str());
157 for (
auto i = 0; i < m_HowMuchIsMany; ++i)
162 node->SetName(s.str());
163 storage->Add(node, parent);
170 #define AddNode(name) storage->Add(name);
172 #define DefineNode(name) \
173 mitk::DataNode::Pointer name = mitk::DataNode::New(); \
174 name->SetName(#name);
176 #define DefNode0(name) DefineNode(name) AddNode(name)
178 #define DefNode1(source, name) DefineNode(name) storage->Add(name, source);
180 #define DefNode2(source1, source2, name) \
183 mitk::DataStorage::SetOfObjects::Pointer sources = mitk::DataStorage::SetOfObjects::New(); \
184 sources->push_back(source1); \
185 sources->push_back(source2); \
186 storage->Add(name, sources); \
189 #define DefNode3(source1, source2, source3, name) \
192 mitk::DataStorage::SetOfObjects::Pointer sources = mitk::DataStorage::SetOfObjects::New(); \
193 sources->push_back(source1); \
194 sources->push_back(source2); \
195 sources->push_back(source3); \
196 storage->Add(name, sources); \
229 DefNode3(Penguin, OperatingSystem, OpenSource, Linux)
249 node->SetName(
"Image-Int");
250 node->SetData(image3Dints);
265 node->SetName(
"Image-Double");
266 node->SetData(image3Ddouble);
279 points1->InsertNextPoint(0.0, 0.0, 0.0);
280 points1->InsertNextPoint(1.0, 0.0, 0.0);
281 points1->InsertNextPoint(0.0, 1.0, 0.0);
282 points1->InsertNextPoint(1.0, 1.0, 0.0);
285 polygon1->GetPointIds()->SetNumberOfIds(4);
286 polygon1->GetPointIds()->SetId(0, 0);
287 polygon1->GetPointIds()->SetId(1, 1);
288 polygon1->GetPointIds()->SetId(2, 2);
289 polygon1->GetPointIds()->SetId(3, 3);
292 polygon2->GetPointIds()->SetNumberOfIds(4);
293 polygon2->GetPointIds()->SetId(0, 3);
294 polygon2->GetPointIds()->SetId(1, 2);
295 polygon2->GetPointIds()->SetId(2, 0);
296 polygon2->GetPointIds()->SetId(3, 1);
300 polygonArray1->InsertNextCell(polygon1);
303 polydata1->SetPoints(points1);
304 polydata1->SetPolys(polygonArray1);
307 polygonArray2->InsertNextCell(polygon2);
310 polyDataTwo->SetPoints(points1);
311 polyDataTwo->SetPolys(polygonArray2);
315 surface->SetVtkPolyData(polydata1);
318 node->SetName(
"Surface");
319 node->SetData(surface);
341 node->SetName(
"PointSet");
357 mitk::AffineTransform3D::MatrixType matrix;
361 mitk::AffineTransform3D::OffsetType
offset;
363 bool isImageGeometry(
false);
364 unsigned int frameOfReferenceID(47);
370 bounds[3] = 918273645.18293746;
381 newTransform->SetMatrix(matrix);
382 newTransform->SetOffset(offset);
385 newGeometry->SetFrameOfReferenceID(frameOfReferenceID);
386 newGeometry->SetImageGeometry(isImageGeometry);
388 newGeometry->SetIndexToWorldTransform(newTransform);
390 newGeometry->SetBounds(bounds);
391 newGeometry->SetOrigin(origin);
392 newGeometry->SetSpacing(spacing);
395 geometryData->SetGeometry(newGeometry);
398 node->SetName(
"GeometryData");
399 node->SetData(geometryData);
411 node->SetName(
"Camion");
417 node->GetPropertyList(
"Chapitre1")->SetProperty(
"Page 1",
StringProperty::New(VeryLongText));
418 node->GetPropertyList(
"Chapitre1")->SetProperty(
"Page 2",
StringProperty::New(VeryLongText));
419 node->GetPropertyList(
"Chapitre 2")->SetProperty(
"Page",
StringProperty::New(VeryLongText));
420 node->GetPropertyList(
"Chapitre 3")->SetProperty(
"Page",
StringProperty::New(VeryLongText));
421 node->GetPropertyList(VeryLongText)->SetProperty(
"Page",
StringProperty::New(VeryLongText));
itk::SmartPointer< Self > Pointer
BoundingBoxType::BoundsArrayType BoundsArrayType
#define DefNode2(source1, source2, name)
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
DataStorage::Pointer BuildDataStorage() const
Construct the DataStorage for this scenario.
DataStorage::Pointer(SceneIOTestScenarioProvider::* BuilderMethodPointer)() const
Typedef for type BuilderMethodPointer which is function pointer to member of SceneIOTestScenarioProvi...
#define DefNode3(source1, source2, source3, name)
#define DefNode1(source, name)
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
Scenario(const std::string &_key, const SceneIOTestScenarioProvider *_scenarioProvider, SceneIOTestScenarioProvider::BuilderMethodPointer _providerMethod, bool _isSerializable, const std::string &_referenceArchiveFilename, bool _isReferenceLoadable, double _comparisonPrecision)
Provides DataStorages that serve as test scenarios.
std::vector< Scenario > ScenarioList
List of Scenarios.
ScenarioList GetAllScenarios() const
Returns all registered scenarios.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.