int main( int, char *[] )
{
typedef BlobType::Pointer BlobPointer;
BlobType::PointListType list;
for( unsigned int i=0; i<4; i++)
{
BlobPointType p;
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::PointListType pointList = blob->GetPoints();
std::cout << "The blob contains " << pointList.size();
std::cout << " points" << std::endl;
BlobType::PointListType::const_iterator it = blob->GetPoints().begin();
while(it != blob->GetPoints().end())
{
std::cout << "Position = " << (*it).GetPosition() << std::endl;
std::cout << "Color = " << (*it).GetColor() << std::endl;
it++;
}
return 0;
}