Medical Imaging Interaction Toolkit  2018.4.99-b7f3afaa
Medical Imaging Interaction Toolkit
mitkPlanarFigureIOTest.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkTestingMacros.h"
14 
15 #include "mitkPlanarAngle.h"
16 #include "mitkPlanarCircle.h"
17 #include "mitkPlanarCross.h"
19 #include "mitkPlanarLine.h"
20 #include "mitkPlanarPolygon.h"
21 #include "mitkPlanarRectangle.h"
23 
24 #include "mitkPlanarFigureReader.h"
25 #include "mitkPlanarFigureWriter.h"
26 
27 #include "mitkPlaneGeometry.h"
28 
29 #include <itksys/SystemTools.hxx>
30 
32 {
33  return original->Clone();
34 }
35 
37 class PlanarFigureIOTestClass
38 {
39 public:
40  typedef std::list<mitk::PlanarFigure::Pointer> PlanarFigureList;
41  typedef std::vector<mitk::PlanarFigureWriter::Pointer> PlanarFigureToMemoryWriterList;
42 
43  static PlanarFigureList CreatePlanarFigures()
44  {
45  PlanarFigureList planarFigures;
46 
47  // Create PlaneGeometry on which to place the PlanarFigures
49  planeGeometry->InitializeStandardPlane(100.0, 100.0);
50 
51  // Create a few sample points for PlanarFigure placement
52  mitk::Point2D p0;
53  p0[0] = 20.0;
54  p0[1] = 20.0;
55  mitk::Point2D p1;
56  p1[0] = 80.0;
57  p1[1] = 80.0;
58  mitk::Point2D p2;
59  p2[0] = 90.0;
60  p2[1] = 10.0;
61  mitk::Point2D p3;
62  p3[0] = 10.0;
63  p3[1] = 90.0;
64 
65  // Create PlanarAngle
67  planarAngle->SetPlaneGeometry(planeGeometry);
68  planarAngle->PlaceFigure(p0);
69  planarAngle->SetCurrentControlPoint(p1);
70  planarAngle->AddControlPoint(p2);
71  planarAngle->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
72  planarFigures.push_back(planarAngle.GetPointer());
73 
74  // Create PlanarCircle
76  planarCircle->SetPlaneGeometry(planeGeometry);
77  planarCircle->PlaceFigure(p0);
78  planarCircle->SetCurrentControlPoint(p1);
79  planarCircle->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
80  planarFigures.push_back(planarCircle.GetPointer());
81 
82  // Create PlanarCross
84  planarCross->SetSingleLineMode(false);
85  planarCross->SetPlaneGeometry(planeGeometry);
86  planarCross->PlaceFigure(p0);
87  planarCross->SetCurrentControlPoint(p1);
88  planarCross->AddControlPoint(p2);
89  planarCross->AddControlPoint(p3);
90  planarCross->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
91  planarFigures.push_back(planarCross.GetPointer());
92 
93  // Create PlanarFourPointAngle
95  planarFourPointAngle->SetPlaneGeometry(planeGeometry);
96  planarFourPointAngle->PlaceFigure(p0);
97  planarFourPointAngle->SetCurrentControlPoint(p1);
98  planarFourPointAngle->AddControlPoint(p2);
99  planarFourPointAngle->AddControlPoint(p3);
100  planarFourPointAngle->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
101  planarFigures.push_back(planarFourPointAngle.GetPointer());
102 
103  // Create PlanarLine
105  planarLine->SetPlaneGeometry(planeGeometry);
106  planarLine->PlaceFigure(p0);
107  planarLine->SetCurrentControlPoint(p1);
108  planarLine->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
109  planarFigures.push_back(planarLine.GetPointer());
110 
111  // Create PlanarPolygon
113  planarPolygon->SetClosed(false);
114  planarPolygon->SetPlaneGeometry(planeGeometry);
115  planarPolygon->PlaceFigure(p0);
116  planarPolygon->SetCurrentControlPoint(p1);
117  planarPolygon->AddControlPoint(p2);
118  planarPolygon->AddControlPoint(p3);
119  planarPolygon->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
120  planarFigures.push_back(planarPolygon.GetPointer());
121 
122  // Create PlanarSubdivisionPolygon
124  planarSubdivisionPolygon->SetClosed(false);
125  planarSubdivisionPolygon->SetPlaneGeometry(planeGeometry);
126  planarSubdivisionPolygon->PlaceFigure(p0);
127  planarSubdivisionPolygon->SetCurrentControlPoint(p1);
128  planarSubdivisionPolygon->AddControlPoint(p2);
129  planarSubdivisionPolygon->AddControlPoint(p3);
130  planarSubdivisionPolygon->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
131  planarFigures.push_back(planarSubdivisionPolygon.GetPointer());
132 
133  // Create PlanarRectangle
135  planarRectangle->SetPlaneGeometry(planeGeometry);
136  planarRectangle->PlaceFigure(p0);
137  planarRectangle->SetCurrentControlPoint(p1);
138  planarRectangle->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
139  planarFigures.push_back(planarRectangle.GetPointer());
140 
141  // create preciseGeometry which is using float coordinates
143  mitk::Vector3D right;
144  right[0] = 0.0;
145  right[1] = 1.23456;
146  right[2] = 0.0;
147 
148  mitk::Vector3D down;
149  down[0] = 1.23456;
150  down[1] = 0.0;
151  down[2] = 0.0;
152 
153  mitk::Vector3D spacing;
154  spacing[0] = 0.0123456;
155  spacing[1] = 0.0123456;
156  spacing[2] = 1.123456;
157  preciseGeometry->InitializeStandardPlane(right, down, &spacing);
158 
159  // convert points into the precise coordinates
160  mitk::Point2D p0precise;
161  p0precise[0] = p0[0] * spacing[0];
162  p0precise[1] = p0[1] * spacing[1];
163  mitk::Point2D p1precise;
164  p1precise[0] = p1[0] * spacing[0];
165  p1precise[1] = p1[1] * spacing[1];
166  mitk::Point2D p2precise;
167  p2precise[0] = p2[0] * spacing[0];
168  p2precise[1] = p2[1] * spacing[1];
169  mitk::Point2D p3precise;
170  p3precise[0] = p3[0] * spacing[0];
171  p3precise[1] = p3[1] * spacing[1];
172 
173  // Now all PlanarFigures are create using the precise Geometry
174  // Create PlanarCross
176  nochncross->SetSingleLineMode(false);
177  nochncross->SetPlaneGeometry(preciseGeometry);
178  nochncross->PlaceFigure(p0precise);
179  nochncross->SetCurrentControlPoint(p1precise);
180  nochncross->AddControlPoint(p2precise);
181  nochncross->AddControlPoint(p3precise);
182  nochncross->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
183  planarFigures.push_back(nochncross.GetPointer());
184 
185  // Create PlanarAngle
186  mitk::PlanarAngle::Pointer planarAnglePrecise = mitk::PlanarAngle::New();
187  planarAnglePrecise->SetPlaneGeometry(preciseGeometry);
188  planarAnglePrecise->PlaceFigure(p0precise);
189  planarAnglePrecise->SetCurrentControlPoint(p1precise);
190  planarAnglePrecise->AddControlPoint(p2precise);
191  planarAnglePrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
192  planarFigures.push_back(planarAnglePrecise.GetPointer());
193 
194  // Create PlanarCircle
196  planarCirclePrecise->SetPlaneGeometry(preciseGeometry);
197  planarCirclePrecise->PlaceFigure(p0precise);
198  planarCirclePrecise->SetCurrentControlPoint(p1precise);
199  planarCirclePrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
200  planarFigures.push_back(planarCirclePrecise.GetPointer());
201 
202  // Create PlanarFourPointAngle
204  planarFourPointAnglePrecise->SetPlaneGeometry(preciseGeometry);
205  planarFourPointAnglePrecise->PlaceFigure(p0precise);
206  planarFourPointAnglePrecise->SetCurrentControlPoint(p1precise);
207  planarFourPointAnglePrecise->AddControlPoint(p2precise);
208  planarFourPointAnglePrecise->AddControlPoint(p3precise);
209  planarFourPointAnglePrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
210  planarFigures.push_back(planarFourPointAnglePrecise.GetPointer());
211 
212  // Create PlanarLine
213  mitk::PlanarLine::Pointer planarLinePrecise = mitk::PlanarLine::New();
214  planarLinePrecise->SetPlaneGeometry(preciseGeometry);
215  planarLinePrecise->PlaceFigure(p0precise);
216  planarLinePrecise->SetCurrentControlPoint(p1precise);
217  planarLinePrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
218  planarFigures.push_back(planarLinePrecise.GetPointer());
219 
220  // Create PlanarPolygon
222  planarPolygonPrecise->SetClosed(false);
223  planarPolygonPrecise->SetPlaneGeometry(preciseGeometry);
224  planarPolygonPrecise->PlaceFigure(p0precise);
225  planarPolygonPrecise->SetCurrentControlPoint(p1precise);
226  planarPolygonPrecise->AddControlPoint(p2precise);
227  planarPolygonPrecise->AddControlPoint(p3precise);
228  planarPolygonPrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
229  planarFigures.push_back(planarPolygonPrecise.GetPointer());
230 
231  // Create PlanarSubdivisionPolygon
233  planarSubdivisionPolygonPrecise->SetClosed(false);
234  planarSubdivisionPolygonPrecise->SetPlaneGeometry(preciseGeometry);
235  planarSubdivisionPolygonPrecise->PlaceFigure(p0precise);
236  planarSubdivisionPolygonPrecise->SetCurrentControlPoint(p1precise);
237  planarSubdivisionPolygonPrecise->AddControlPoint(p2precise);
238  planarSubdivisionPolygonPrecise->AddControlPoint(p3precise);
239  planarSubdivisionPolygonPrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
240  planarFigures.push_back(planarSubdivisionPolygonPrecise.GetPointer());
241 
242  // Create PlanarRectangle
244  planarRectanglePrecise->SetPlaneGeometry(preciseGeometry);
245  planarRectanglePrecise->PlaceFigure(p0precise);
246  planarRectanglePrecise->SetCurrentControlPoint(p1precise);
247  planarRectanglePrecise->GetPropertyList()->SetBoolProperty("initiallyplaced", true);
248  planarFigures.push_back(planarRectanglePrecise.GetPointer());
249 
250  return planarFigures;
251  }
252 
253  static PlanarFigureList CreateDeepCopiedPlanarFigures(PlanarFigureList original)
254  {
255  PlanarFigureList copiedPlanarFigures;
256 
257  PlanarFigureList::iterator it1;
258 
259  for (it1 = original.begin(); it1 != original.end(); ++it1)
260  {
261  mitk::PlanarFigure::Pointer copiedFigure = (*it1)->Clone();
262 
263  copiedPlanarFigures.push_back(copiedFigure);
264  }
265  return copiedPlanarFigures;
266  }
267 
268  static PlanarFigureList CreateClonedPlanarFigures(PlanarFigureList original)
269  {
270  PlanarFigureList clonedPlanarFigures;
271  clonedPlanarFigures.resize(original.size());
272  std::transform(original.begin(), original.end(), clonedPlanarFigures.begin(), Clone);
273  return clonedPlanarFigures;
274  }
275 
276  static void VerifyPlanarFigures(PlanarFigureList &planarFigures1, PlanarFigureList &planarFigures2)
277  {
278  PlanarFigureList::iterator it1, it2;
279 
280  int i = 0;
281  for (it1 = planarFigures1.begin(); it1 != planarFigures1.end(); ++it1)
282  {
283  bool planarFigureFound = false;
284  int j = 0;
285  for (it2 = planarFigures2.begin(); it2 != planarFigures2.end(); ++it2)
286  {
287  // Compare PlanarFigures (returns false if different types)
288  if (ComparePlanarFigures(*it1, *it2))
289  {
290  planarFigureFound = true;
291  }
292  ++j;
293  }
294 
295  // Test if (at least) on PlanarFigure of the first type was found in the second list
296  MITK_TEST_CONDITION_REQUIRED(planarFigureFound,
297  "Testing if " << (*it1)->GetNameOfClass() << " has a counterpart " << i);
298  ++i;
299  }
300  }
301 
302  static bool ComparePlanarFigures(mitk::PlanarFigure *figure1, mitk::PlanarFigure *figure2)
303  {
304  // Test if PlanarFigures are of same type; otherwise return
305  if (strcmp(figure1->GetNameOfClass(), figure2->GetNameOfClass()) != 0)
306  {
307  return false;
308  }
309 
310  if (strcmp(figure1->GetNameOfClass(), "PlanarCross") == 0)
311  {
312  std::cout << "Planar Cross Found" << std::endl;
313  }
314 
315  // Test for equal number of control points
316  if (figure1->GetNumberOfControlPoints() != figure2->GetNumberOfControlPoints())
317  {
318  return false;
319  }
320 
321  // Test if all control points are equal
322  for (unsigned int i = 0; i < figure1->GetNumberOfControlPoints(); ++i)
323  {
324  mitk::Point2D point1 = figure1->GetControlPoint(i);
325  mitk::Point2D point2 = figure2->GetControlPoint(i);
326 
327  if (point1.EuclideanDistanceTo(point2) >= mitk::eps)
328  {
329  return false;
330  }
331  }
332 
333  // Test for equal number of properties
334  typedef mitk::PropertyList::PropertyMap PropertyMap;
335  const PropertyMap *properties1 = figure1->GetPropertyList()->GetMap();
336  const PropertyMap *properties2 = figure2->GetPropertyList()->GetMap();
337 
338  if (properties1->size() != properties2->size())
339  {
340  return false;
341  }
342 
343  MITK_INFO << "List 1:";
344  for (auto i1 = properties1->begin(); i1 != properties1->end(); ++i1)
345  {
346  std::cout << i1->first << std::endl;
347  }
348 
349  MITK_INFO << "List 2:";
350  for (auto i2 = properties2->begin(); i2 != properties2->end(); ++i2)
351  {
352  std::cout << i2->first << std::endl;
353  }
354 
355  MITK_INFO << "-------";
356 
357  // Test if all properties are equal
358  if (!std::equal(properties1->begin(), properties1->end(), properties2->begin(), PropertyMapEntryCompare()))
359  {
360  return false;
361  }
362 
363  // Test if Geometry is equal
364  const auto *planeGeometry1 = dynamic_cast<const mitk::PlaneGeometry *>(figure1->GetPlaneGeometry());
365  const auto *planeGeometry2 = dynamic_cast<const mitk::PlaneGeometry *>(figure2->GetPlaneGeometry());
366 
367  // Test Geometry transform parameters
368  typedef mitk::Geometry3D::TransformType TransformType;
369  const TransformType *affineGeometry1 = planeGeometry1->GetIndexToWorldTransform();
370  const TransformType::ParametersType &parameters1 = affineGeometry1->GetParameters();
371  const TransformType::ParametersType &parameters2 = planeGeometry2->GetIndexToWorldTransform()->GetParameters();
372  for (unsigned int i = 0; i < affineGeometry1->GetNumberOfParameters(); ++i)
373  {
374  if (fabs(parameters1.GetElement(i) - parameters2.GetElement(i)) >= mitk::eps)
375  {
376  return false;
377  }
378  }
379 
380  // Test Geometry bounds
382  const BoundsArrayType &bounds1 = planeGeometry1->GetBounds();
383  const BoundsArrayType &bounds2 = planeGeometry2->GetBounds();
384  for (unsigned int i = 0; i < 6; ++i)
385  {
386  if (fabs(bounds1.GetElement(i) - bounds2.GetElement(i)) >= mitk::eps)
387  {
388  return false;
389  };
390  }
391 
392  // Test Geometry spacing and origin
393  mitk::Vector3D spacing1 = planeGeometry1->GetSpacing();
394  mitk::Vector3D spacing2 = planeGeometry2->GetSpacing();
395  if ((spacing1 - spacing2).GetNorm() >= mitk::eps)
396  {
397  return false;
398  }
399 
400  mitk::Point3D origin1 = planeGeometry1->GetOrigin();
401  mitk::Point3D origin2 = planeGeometry2->GetOrigin();
402 
403  if (origin1.EuclideanDistanceTo(origin2) >= mitk::eps)
404  {
405  return false;
406  }
407  return true;
408  }
409 
410  static void SerializePlanarFigures(PlanarFigureList &planarFigures, std::string &fileName)
411  {
412  // std::string sceneFileName = Poco::Path::temp() + /*Poco::Path::separator() +*/ "scene.zip";
413  std::cout << "File name: " << fileName << std::endl;
414 
416  writer->SetFileName(fileName.c_str());
417 
418  unsigned int i;
419  PlanarFigureList::iterator it;
420  for (it = planarFigures.begin(), i = 0; it != planarFigures.end(); ++it, ++i)
421  {
422  writer->SetInput(i, *it);
423  }
424 
425  writer->Update();
426 
427  MITK_TEST_CONDITION_REQUIRED(writer->GetSuccess(), "Testing if writing was successful");
428  }
429 
430  static PlanarFigureList DeserializePlanarFigures(std::string &fileName)
431  {
432  // Read in the planar figures
434  reader->SetFileName(fileName.c_str());
435  reader->Update();
436 
437  MITK_TEST_CONDITION_REQUIRED(reader->GetSuccess(), "Testing if reading was successful");
438 
439  // Store them in the list and return it
440  PlanarFigureList planarFigures;
441  for (unsigned int i = 0; i < reader->GetNumberOfOutputs(); ++i)
442  {
443  mitk::PlanarFigure *figure = reader->GetOutput(i);
444  planarFigures.push_back(figure);
445  }
446 
447  return planarFigures;
448  }
449 
450  static PlanarFigureToMemoryWriterList SerializePlanarFiguresToMemoryBuffers(PlanarFigureList &planarFigures)
451  {
452  PlanarFigureToMemoryWriterList pfMemoryWriters;
453  unsigned int i;
454  PlanarFigureList::iterator it;
455 
456  bool success = true;
457  for (it = planarFigures.begin(), i = 0; it != planarFigures.end(); ++it, ++i)
458  {
460  writer->SetWriteToMemory(true);
461  writer->SetInput(*it);
462  writer->Update();
463 
464  pfMemoryWriters.push_back(writer);
465 
466  if (!writer->GetSuccess())
467  success = false;
468  }
469 
470  MITK_TEST_CONDITION_REQUIRED(success, "Testing if writing to memory buffers was successful");
471 
472  return pfMemoryWriters;
473  }
474 
475  static PlanarFigureList DeserializePlanarFiguresFromMemoryBuffers(PlanarFigureToMemoryWriterList pfMemoryWriters)
476  {
477  // Store them in the list and return it
478  PlanarFigureList planarFigures;
479  bool success = true;
480  for (unsigned int i = 0; i < pfMemoryWriters.size(); ++i)
481  {
482  // Read in the planar figures
484  reader->SetReadFromMemory(true);
485  reader->SetMemoryBuffer(pfMemoryWriters[i]->GetMemoryPointer(), pfMemoryWriters[i]->GetMemorySize());
486  reader->Update();
487  mitk::PlanarFigure *figure = reader->GetOutput(0);
488  planarFigures.push_back(figure);
489 
490  if (!reader->GetSuccess())
491  success = false;
492  }
493 
494  MITK_TEST_CONDITION_REQUIRED(success, "Testing if reading was successful");
495 
496  return planarFigures;
497  }
498 
499 private:
500  class PropertyMapEntryCompare
501  {
502  public:
503  bool operator()(const mitk::PropertyList::PropertyMap::value_type &entry1,
504  const mitk::PropertyList::PropertyMap::value_type &entry2)
505  {
506  MITK_INFO << "Comparing " << entry1.first << "(" << entry1.second->GetValueAsString() << ") and " << entry2.first
507  << "(" << entry2.second->GetValueAsString() << ")";
508  // Compare property objects contained in the map entries (see mitk::PropertyList)
509  return *(entry1.second) == *(entry2.second);
510  }
511  };
512 
513 }; // end test helper class
514 
524 int mitkPlanarFigureIOTest(int /* argc */, char * /*argv*/ [])
525 {
526  MITK_TEST_BEGIN("PlanarFigureIO");
527 
528  // Create a number of PlanarFigure objects
529  PlanarFigureIOTestClass::PlanarFigureList originalPlanarFigures = PlanarFigureIOTestClass::CreatePlanarFigures();
530 
531  // Create a number of "deep-copied" planar figures to test the DeepCopy function (deprecated)
532  PlanarFigureIOTestClass::PlanarFigureList copiedPlanarFigures =
533  PlanarFigureIOTestClass::CreateDeepCopiedPlanarFigures(originalPlanarFigures);
534 
535  PlanarFigureIOTestClass::VerifyPlanarFigures(originalPlanarFigures, copiedPlanarFigures);
536 
537  // Create a number of cloned planar figures to test the Clone function
538  PlanarFigureIOTestClass::PlanarFigureList clonedPlanarFigures =
539  PlanarFigureIOTestClass::CreateClonedPlanarFigures(originalPlanarFigures);
540 
541  PlanarFigureIOTestClass::VerifyPlanarFigures(originalPlanarFigures, clonedPlanarFigures);
542 
543  // Write PlanarFigure objects into temp file
544  // tmpname
545  static unsigned long count = 0;
546  unsigned long n = count++;
547  std::ostringstream name;
548  for (int i = 0; i < 6; ++i)
549  {
550  name << char('a' + (n % 26));
551  n /= 26;
552  }
553  std::string myname;
554  myname.append(name.str());
555 
556  std::string fileName = itksys::SystemTools::GetCurrentWorkingDirectory() + myname + ".pf";
557 
558  PlanarFigureIOTestClass::SerializePlanarFigures(originalPlanarFigures, fileName);
559 
560  // Write PlanarFigure objects to memory buffers
561  PlanarFigureIOTestClass::PlanarFigureToMemoryWriterList writersWithMemoryBuffers =
562  PlanarFigureIOTestClass::SerializePlanarFiguresToMemoryBuffers(originalPlanarFigures);
563 
564  // Read PlanarFigure objects from temp file
565  PlanarFigureIOTestClass::PlanarFigureList retrievedPlanarFigures =
566  PlanarFigureIOTestClass::DeserializePlanarFigures(fileName);
567 
568  // Read PlanarFigure objects from memory buffers
569  PlanarFigureIOTestClass::PlanarFigureList retrievedPlanarFiguresFromMemory =
570  PlanarFigureIOTestClass::DeserializePlanarFiguresFromMemoryBuffers(writersWithMemoryBuffers);
571 
572  auto it = writersWithMemoryBuffers.begin();
573  while (it != writersWithMemoryBuffers.end())
574  {
575  (*it)->ReleaseMemory();
576  ++it;
577  }
578 
579  // Test if original and retrieved PlanarFigure objects are the same
580  PlanarFigureIOTestClass::VerifyPlanarFigures(originalPlanarFigures, retrievedPlanarFigures);
581 
582  // Test if original and memory retrieved PlanarFigure objects are the same
583  PlanarFigureIOTestClass::VerifyPlanarFigures(originalPlanarFigures, retrievedPlanarFiguresFromMemory);
584 
585  // empty the originalPlanarFigures
586  originalPlanarFigures.clear();
587 
588  // Test if deep-copied and retrieved PlanarFigure objects are the same
589  PlanarFigureIOTestClass::VerifyPlanarFigures(copiedPlanarFigures, retrievedPlanarFigures);
590 
591  MITK_TEST_END()
592 }
Point2D GetControlPoint(unsigned int index) const
Returns specified control point in 2D world coordinates.
static Pointer New()
BoundingBoxType::BoundsArrayType BoundsArrayType
#define MITK_INFO
Definition: mitkLogMacros.h:18
virtual const PlaneGeometry * GetPlaneGeometry() const
Returns (previously set) 2D geometry of this figure.
static Pointer New()
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
GeometryTransformHolder::TransformType TransformType
static Pointer New()
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
int mitkPlanarFigureIOTest(int, char *[])
Test for PlanarFigure reader and writer classes.
static Pointer New()
unsigned int GetNumberOfControlPoints() const
Returns the current number of 2D control points defining this figure.
std::map< std::string, BaseProperty::Pointer > PropertyMap
static Pointer New()
static Pointer New()
mitk::PropertyList::Pointer GetPropertyList() const
Get the data&#39;s property list.
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons...
static Pointer New()
MITKCORE_EXPORT const ScalarType eps
Describes a two-dimensional, rectangular plane.
static Pointer New()
and MITK_TEST_END()
static mitk::PlanarFigure::Pointer Clone(mitk::PlanarFigure::Pointer original)
static Pointer New()
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.
BoundingBoxType::BoundsArrayType BoundsArrayType