nsarrasin at phenix-systems.com
Wed May 12 09:51:19 EDT 2010
I'm quite new in developping with vtk and I have some questions
I built a quick project which uses vtkContourWidget and
vtkPolyDataPointPlacer to display a contour on a sphere.
When I click on this sphere, there's no problem : the points of the
contour are well positionned on the sphere. But it's not the case for
the spans which are outside or inside the sphere (but not on).
Is there a way to force the borders of the contour to follow the surface ?
A solution would be to project the contour on the sphere but I can find
any documentation about that.
For more clarity, I post a sample of my code.
Thanks by advance.
vtkSphereSource* theSphere = vtkSphereSource::New();
vtkPolyDataMapper * sphereMapper = vtkPolyDataMapper::New();
vtkLODActor* sphereActor = vtkLODActor::New();
vtkRenderer *renderer1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
vtkRenderWindowInteractor *rendIter = vtkRenderWindowInteractor::New();
// Here comes the image actor constrained handle widget stuff.....
vtkContourWidget *widget = vtkContourWidget::New();
vtkSmartPointer<vtkLinearContourLineInterpolator> contourStyle =
// we define a Placer to force the contour to be on the sphere
vtkPolyDataPointPlacer * spherePlacer = vtkPolyDataPointPlacer::New();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers