| 356 | } |
| 357 | |
| 358 | static void TestSetVertices() |
| 359 | { |
| 360 | mitk::ContourModel::Pointer contour = mitk::ContourModel::New(); |
| 361 | |
| 362 | mitk::Point3D p; |
| 363 | p[0] = p[1] = p[2] = 0; |
| 364 | |
| 365 | contour->AddVertex(p); |
| 366 | |
| 367 | mitk::Point3D newCoordinates; |
| 368 | |
| 369 | newCoordinates[0] = newCoordinates[1] = newCoordinates[2] = 1; |
| 370 | |
| 371 | contour->SetVertexAt(0, newCoordinates); |
| 372 | |
| 373 | MITK_TEST_CONDITION(mitk::Equal(contour->GetVertexAt(0)->Coordinates, newCoordinates), "set coordinates"); |
| 374 | |
| 375 | mitk::ContourModel::Pointer contour2 = mitk::ContourModel::New(); |
| 376 | |
| 377 | mitk::Point3D p3; |
| 378 | p3[0] = -2; |
| 379 | p3[1] = 10; |
| 380 | p3[2] = 0; |
| 381 | |
| 382 | contour2->AddVertex(p3); |
| 383 | |
| 384 | mitk::Point3D p4; |
| 385 | p4[0] = -3; |
| 386 | p4[1] = 6; |
| 387 | p4[2] = -5; |
| 388 | |
| 389 | contour2->AddVertex(p4); |
| 390 | |
| 391 | contour->AddVertex(p); |
| 392 | contour->SetVertexAt(1, contour2->GetVertexAt(1), 0); |
| 393 | |
| 394 | MITK_TEST_CONDITION( |
| 395 | mitk::Equal(contour->GetVertexAt(1)->Coordinates, contour2->GetVertexAt(1)->Coordinates), "Use setter and getter combination"); |
| 396 | } |
| 397 | |
| 398 | static void TestContourModelAPI() |
| 399 | { |
no test coverage detected