int main( int, char *[] )
{
using BlobPointer = BlobType::Pointer;
using BlobPointType = BlobType::BlobPointType;
BlobType::BlobPointListType list;
for( unsigned int i=0; i<4; i++)
{
BlobPointType p;
pnt[0] = i;
pnt[1] = i+1;
pnt[2] = i+2;
p.SetPositionInObjectSpace(pnt);
p.SetRed(1);
p.SetGreen(0);
p.SetBlue(0);
p.SetAlpha(1.0);
list.push_back(p);
}
BlobPointer blob = BlobType::New();
blob->GetProperty().SetName("My Blob");
blob->SetId(1);
blob->SetPoints(list);
BlobType::BlobPointListType pointList = blob->GetPoints();
std::cout << "The blob contains " << pointList.size();
std::cout << " points" << std::endl;
BlobType::BlobPointListType::const_iterator it = blob->GetPoints().begin();
while(it != blob->GetPoints().end())
{
std::cout << "Position = " << (*it).GetPositionInWorldSpace() << std::endl;
std::cout << "Color = " << (*it).GetColor() << std::endl;
++it;
}
return EXIT_SUCCESS;
}