int main(int, char *[])
{
typedef PointSetType::PointsContainer PointsContainer;
PointsContainer::Pointer points = PointsContainer::New();
PointType p0;
PointType p1;
p0[0] = -1.0; p0[1] = 0.0; p0[2] = 0.0;
p1[0] = 1.0; p1[1] = 0.0; p1[2] = 0.0;
unsigned int pointId = 0;
points->InsertElement( pointId++ , p0 );
points->InsertElement( pointId++ , p1 );
PointSetType::Pointer pointSet = PointSetType::New();
pointSet->SetPoints( points );
PointsContainer::Pointer points2 = pointSet->GetPoints();
typedef PointsContainer::Iterator PointsIterator;
PointsIterator pointIterator = points->Begin();
PointsIterator end = points->End();
while( pointIterator != end )
{
PointType p = pointIterator.Value();
std::cout << p << std::endl;
++pointIterator;
}
std::cout << pointSet->GetNumberOfPoints() << std::endl;
std::cout << pointSet->GetPoints()->Size() << std::endl;
return EXIT_SUCCESS;
}