<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#003333">
Hi all,<br>
<br>
I'm quite new in developping with vtk and I have some questions
concerning vtkContourWidget.<br>
<br>
I built a quick project which uses vtkContourWidget and
vtkPolyDataPointPlacer to display a contour on a sphere.<br>
<br>
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).<br>
<br>
Is there a way to force the borders of the contour to follow the
surface ?<br>
<br>
A solution would be to project the contour on the sphere but I can find
any documentation about that.<br>
<br>
For more clarity, I post a sample of my code.<br>
<br>
Thanks by advance.<br>
<br>
Nicolas<br>
<br>
code:<br>
<pre>    //sphere definition

     vtkSphereSource* theSphere = vtkSphereSource::New();

     vtkPolyDataMapper * sphereMapper = vtkPolyDataMapper::New();
     sphereMapper-&gt;SetInput(theSphere-&gt;GetOutput());

     vtkLODActor* sphereActor = vtkLODActor::New();
     sphereActor-&gt;SetMapper( sphereMapper);

     vtkRenderer *renderer1 = vtkRenderer::New();
     renderer1-&gt;AddActor(sphereActor);

     vtkRenderWindow *renWin = vtkRenderWindow::New();
     renWin-&gt;AddRenderer(renderer1);

     vtkRenderWindowInteractor *rendIter = vtkRenderWindowInteractor::New();
     rendIter-&gt;SetRenderWindow(renWin);

     // Here comes the image actor constrained handle widget stuff.....
     vtkContourWidget *widget = vtkContourWidget::New();
     widget-&gt;SetInteractor(rendIter);

     vtkSmartPointer&lt;vtkLinearContourLineInterpolator&gt; contourStyle = 
vtkSmartPointer&lt;vtkLinearContourLineInterpolator&gt;::New();

     vtkOrientedGlyphContourRepresentation *rep 
=vtkOrientedGlyphContourRepresentation::SafeDownCast( 
widget-&gt;GetRepresentation() );
     rep-&gt;SetLineInterpolator(contourStyle);

    // we define a Placer to force the contour to be on the sphere
     vtkPolyDataPointPlacer * spherePlacer = vtkPolyDataPointPlacer::New();
     spherePlacer-&gt;AddProp(sphereActor);
     rep-&gt;SetPointPlacer(spherePlacer);

     renWin-&gt;Render();
     rendIter-&gt;Initialize();
     widget-&gt;EnabledOn();
     rendIter-&gt;Start();/
</pre>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Test_Signa</title>
<br>
</div>
</body>
</html>