| 407 | } |
| 408 | |
| 409 | mitk::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 | |
| 437 | bool mitk::PointSet::SwapPointPosition(PointIdentifier id, bool moveUpwards, int t) |
| 438 | { |