int main( int , char *[] )
{
typedef LandmarkType::Pointer LandmarkPointer;
LandmarkPointer landmark = LandmarkType::New();
landmark->GetProperty()->SetName("Landmark1");
landmark->SetId(1);
LandmarkType::PointListType list;
for (unsigned int i=0; i<5; ++i)
{
LandmarkPointType p;
p.SetPosition(i,i+1,i+2);
p.SetColor(1,0,0,1);
list.push_back(p);
}
landmark->SetPoints(list);
size_t nPoints = landmark->GetPoints().size();
std::cout << "Number of Points in the landmark: " << nPoints << std::endl;
LandmarkType::PointListType::const_iterator it
= landmark->GetPoints().begin();
while(it != landmark->GetPoints().end())
{
std::cout << "Position: " << (*it).GetPosition() << std::endl;
std::cout << "Color: " << (*it).GetColor() << std::endl;
++it;
}
return EXIT_SUCCESS;
}