int
main(int, char *[])
{
GroupSpatialObjectType::Pointer scene = GroupSpatialObjectType::New();
EllipseType::Pointer ellipse1 = EllipseType::New();
ellipse1->SetRadiusInObjectSpace(1);
ellipse1->SetId(1);
EllipseType::Pointer ellipse2 = EllipseType::New();
ellipse2->SetId(2);
ellipse2->SetRadiusInObjectSpace(2);
scene->AddChild(ellipse1);
scene->AddChild(ellipse2);
std::cout << "Number of objects in the GroupSpatialObject = ";
std::cout << scene->GetNumberOfChildren() << std::endl;
std::cout << "Object in the GroupSpatialObject with an ID == 2: "
<< std::endl;
scene->GetObjectById(2)->Print(std::cout);
scene->RemoveChild(ellipse1);
GroupSpatialObjectType::ObjectListType * myObjectList =
scene->GetChildren();
std::cout << "Number of children in the GroupSpatialObject = ";
std::cout << myObjectList->size() << std::endl;
scene->FixParentChildHierarchyUsingParentIds();
scene->RemoveAllChildren();
return EXIT_SUCCESS;
}