MCPcopy Create free account
hub / github.com/MITK/MITK / RemovePointAtEnd

Method RemovePointAtEnd

Modules/Core/src/DataManagement/mitkPointSet.cpp:409–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409mitk::PointSet::PointsIterator mitk::PointSet::RemovePointAtEnd(int t)
410{
411 if ((unsigned int)t < m_PointSetSeries.size())
412 {
413 DataType *pointSet = m_PointSetSeries[t];
414
415 PointsContainer *points = pointSet->GetPoints();
416 PointDataContainer *pdata = pointSet->GetPointData();
417
418 PointsIterator bit = points->Begin();
419 PointsIterator eit = points->End();
420
421 if (eit != bit)
422 {
423 PointsContainer::ElementIdentifier id = (--eit).Index();
424 points->DeleteIndex(id);
425 pdata->DeleteIndex(id);
426 PointsIterator eit2 = points->End();
427 return points->empty()? eit2 : --eit2;
428 }
429 else
430 {
431 return eit;
432 }
433 }
434 return m_EmptyPointsContainer->End();
435}
436
437bool mitk::PointSet::SwapPointPosition(PointIdentifier id, bool moveUpwards, int t)
438{

Callers 4

RemoveLastInteractionMethod · 0.80
OnDeleteMethod · 0.80
OnDeleteMethod · 0.80

Calls 4

sizeMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
emptyMethod · 0.45

Tested by 1