| 873 | } |
| 874 | |
| 875 | bool mitk::PointSet::SwapPointContents(PointIdentifier id1, PointIdentifier id2, int timeStep) |
| 876 | { |
| 877 | /* search and cache contents */ |
| 878 | PointType p1; |
| 879 | if (m_PointSetSeries[timeStep]->GetPoint(id1, &p1) == false) |
| 880 | return false; |
| 881 | PointDataType data1; |
| 882 | if (m_PointSetSeries[timeStep]->GetPointData(id1, &data1) == false) |
| 883 | return false; |
| 884 | PointType p2; |
| 885 | if (m_PointSetSeries[timeStep]->GetPoint(id2, &p2) == false) |
| 886 | return false; |
| 887 | PointDataType data2; |
| 888 | if (m_PointSetSeries[timeStep]->GetPointData(id2, &data2) == false) |
| 889 | return false; |
| 890 | /* now swap contents */ |
| 891 | m_PointSetSeries[timeStep]->SetPoint(id1, p2); |
| 892 | m_PointSetSeries[timeStep]->SetPointData(id1, data2); |
| 893 | m_PointSetSeries[timeStep]->SetPoint(id2, p1); |
| 894 | m_PointSetSeries[timeStep]->SetPointData(id2, data1); |
| 895 | return true; |
| 896 | } |
| 897 | |
| 898 | bool mitk::PointSet::PointDataType::operator==(const mitk::PointSet::PointDataType &other) const |
| 899 | { |
no test coverage detected