int main( int , char *[] )
{
unsigned int i;
using VesselTubePointType = VesselTubeType::TubePointType;
VesselTubeType::Pointer vesselTube = VesselTubeType::New();
VesselTubeType::TubePointListType list;
for (i=0; i<5; ++i)
{
VesselTubePointType p;
pnt[0] = i;
pnt[1] = i+1;
pnt[2] = i+2;
p.SetPositionInObjectSpace(pnt);
p.SetRadiusInObjectSpace(1);
p.SetAlpha1(i);
p.SetAlpha2(i+1);
p.SetAlpha3(i+2);
p.SetMedialness(i);
p.SetRidgeness(i);
p.SetBranchness(i);
p.SetColor(1,0,0,1);
list.push_back(p);
}
vesselTube->GetProperty().SetName("VesselTube");
vesselTube->SetId(1);
vesselTube->SetPoints(list);
vesselTube->Update();
VesselTubeType::TubePointListType pointList = vesselTube->GetPoints();
std::cout << "Number of points representing the blood vessel: ";
std::cout << pointList.size() << std::endl;
VesselTubeType::TubePointListType::const_iterator
it = vesselTube->GetPoints().begin();
i=0;
while(it != vesselTube->GetPoints().end())
{
std::cout << std::endl;
std::cout << "Point #" << i << std::endl;
std::cout << "Position: " << (*it).GetPositionInObjectSpace() << std::endl;
std::cout << "Radius: " << (*it).GetRadiusInObjectSpace() << std::endl;
std::cout << "Medialness: " << (*it).GetMedialness() << std::endl;
std::cout << "Ridgeness: " << (*it).GetRidgeness() << std::endl;
std::cout << "Branchness: " << (*it).GetBranchness() << std::endl;
std::cout << "Alpha1: " << (*it).GetAlpha1() << std::endl;
std::cout << "Alpha2: " << (*it).GetAlpha2() << std::endl;
std::cout << "Alpha3: " << (*it).GetAlpha3() << std::endl;
std::cout << "Color = " << (*it).GetColor() << std::endl;
++it;
++i;
}
return EXIT_SUCCESS;
}