+ mLabels->SetNumberOfValues(mLabels->GetNumberOfValues()-1);
+ mLabels->Modified();
+ mPolyData->Modified();
+}
+//--------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------
+void vvLandmarks::RemoveLandmark(int index)
+{
+ // erase a vtkPoint by shifiting the array .
+ // not a problem here because there are no
+ // pologyons linking the points
+ int npoints = mPoints[mLandmarks[index].coordinates[3]]->GetNumberOfPoints();
+ int t = mLandmarks[index].coordinates[3];
+ for (int i = index; i < npoints - 1; i++) {
+ mPoints[t]->InsertPoint(i, mPoints[t]->GetPoint(i+1));
+ std::string str_i; // string which will contain the result
+ std::ostringstream convert; // stream used for the conversion
+ convert << i; // insert the textual representation of 'i' in the characters in the stream
+ str_i = convert.str(); // set 'str_i' to the contents of the stream
+ mLabels->SetValue(i,str_i.c_str());
+ }
+ mPoints[t]->SetNumberOfPoints(npoints-1);
+ mLabels->SetNumberOfValues(npoints-1);
+ mLabels->Modified();
+ mPolyData->Modified();
+
+ mLandmarks.erase(mLandmarks.begin() + index);
+ mIds->RemoveLastTuple();