[Insight-users] Removing points from itk::PointSet
Thomas Boettger
t . boettger at dkfz-heidelberg . de
Tue, 25 Nov 2003 15:35:52 +0100
Hi,
how do I remove points from my PoinSet or Mesh?
The following code:
unsigned long testId = inputMesh->GetNumberOfPoints();
InputPointType testPoint;
testPoint.Fill(1.0);
std::cout << "# of points: " << inputMesh->GetNumberOfPoints() <<
std::endl;
inputMesh->SetPoint(testId, testPoint);
std::cout << "# of points: " << inputMesh->GetNumberOfPoints() <<
std::endl;
inputMesh->GetPoints()->DeleteIndex(testId);
std::cout << "# of points: " << inputMesh->GetNumberOfPoints() <<
std::endl;
produced the following output:
# of points: 128
# of points: 129
# of points: 129
...so the number of points did not decrease after the DeleteIndex() call.
How do I remove a point?
Thanks in advance,
Thomas
--
Dipl.-Inform. Thomas Boettger
Deutsches Krebsforschungszentrum (German Cancer Research Center)
Div. Medical and Biological Informatics H0100 Tel: (+49) 6221-42 2328
Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
D-69120 Heidelberg e-mail: t . boettger at dkfz . de
Germany http://www . dkfz . de/mbi/people/thomasb . shtml