Test concatenating two contours
| 217 | |
| 218 | // Test concatenating two contours |
| 219 | static void TestConcatenate() |
| 220 | { |
| 221 | mitk::ContourModel::Pointer contour = mitk::ContourModel::New(); |
| 222 | |
| 223 | mitk::Point3D p; |
| 224 | p[0] = p[1] = p[2] = 0; |
| 225 | |
| 226 | contour->AddVertex(p); |
| 227 | |
| 228 | mitk::Point3D p2; |
| 229 | p2[0] = p2[1] = p2[2] = 1; |
| 230 | |
| 231 | contour->AddVertex(p2); |
| 232 | |
| 233 | mitk::ContourModel::Pointer contour2 = mitk::ContourModel::New(); |
| 234 | |
| 235 | mitk::Point3D p3; |
| 236 | p3[0] = -2; |
| 237 | p3[1] = 10; |
| 238 | p3[2] = 0; |
| 239 | |
| 240 | contour2->AddVertex(p3); |
| 241 | |
| 242 | mitk::Point3D p4; |
| 243 | p4[0] = -3; |
| 244 | p4[1] = 6; |
| 245 | p4[2] = -5; |
| 246 | |
| 247 | contour2->AddVertex(p4); |
| 248 | |
| 249 | contour->Concatenate(contour2); |
| 250 | |
| 251 | MITK_TEST_CONDITION(contour->GetNumberOfVertices() == 4, "two contours were concatenated"); |
| 252 | } |
| 253 | |
| 254 | // Try to select a vertex at position (within a epsilon of course) where no vertex is. |
| 255 | // So the selected verted member should be null. |
no test coverage detected