-// Adding spheres at the start and end of the tube
-
- // Sphere start
- i=iGeneral;
- vtkSphereSource *vtksphereStart = vtkSphereSource::New();
- vtksphereStart->SetThetaResolution (10);
- vtksphereStart->SetPhiResolution (10);
- vtksphereStart->SetRadius( bbGetInputlstRadio()[i] );
- vtkPolyDataMapper *sphereMapperStart = vtkPolyDataMapper::New();
- sphereMapperStart->SetInput( vtksphereStart->GetOutput() );
- vtkActor *sphereActorStart = vtkActor::New();
- sphereActorStart->SetMapper(sphereMapperStart);
- sphereActorStart->SetOrigin( 0,0,0 );
- sphereActorStart->SetPosition(bbGetInputlstPointX()[i]*spc[0], bbGetInputlstPointY()[i]*spc[1], bbGetInputlstPointZ()[i]*spc[2] );
-
- // Sphere end
- i=size-1;
- vtkSphereSource *vtksphereEnd = vtkSphereSource::New();
- vtksphereEnd->SetThetaResolution (10);
- vtksphereEnd->SetPhiResolution (10);
- vtksphereEnd->SetRadius( bbGetInputlstRadio()[i] );
- vtkPolyDataMapper *sphereMapperEnd = vtkPolyDataMapper::New();
- sphereMapperEnd->SetInput( vtksphereEnd->GetOutput() );
- vtkActor *sphereActorEnd = vtkActor::New();
- sphereActorEnd->SetMapper(sphereMapperEnd);
- sphereActorEnd->SetOrigin( 0,0,0 );
- sphereActorEnd->SetPosition(bbGetInputlstPointX()[i]*spc[0], bbGetInputlstPointY()[i]*spc[1], bbGetInputlstPointZ()[i]*spc[2] );
-