<!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">
<font face="Tahoma" size="-1">Hi all,<br>
<br>
I am new with VTK and I have some questions concerning <i>vtkContourWidget</i>.<br>
<br>
</font><small><font face="Tahoma">I built a quick project wich use
vtkContourWidget to display a contour on a sphere :</font></small><br>
<br>
<font face="Tahoma"><small><i> //définition de la sphere<br>
<br>
vtkSphereSource* theSphere = vtkSphereSource::New();<br>
<br>
vtkPolyDataMapper * sphereMapper = vtkPolyDataMapper::New();<br>
sphereMapper->SetInput(theSphere->GetOutput());<br>
<br>
vtkLODActor* sphereActor = vtkLODActor::New();<br>
sphereActor->SetMapper( sphereMapper);<br>
<br>
vtkRenderer *renderer1 = vtkRenderer::New();<br>
renderer1->AddActor(sphereActor);<br>
<br>
vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
renWin->AddRenderer(renderer1);<br>
<br>
vtkRenderWindowInteractor *rendIter =
vtkRenderWindowInteractor::New();<br>
rendIter->SetRenderWindow(renWin);<br>
<br>
// Here comes the image actor constrained handle widget stuff.....<br>
vtkContourWidget *widget = vtkContourWidget::New();<br>
widget->SetInteractor(rendIter);<br>
<br>
vtkSmartPointer<vtkLinearContourLineInterpolator>
contourStyle =
vtkSmartPointer<vtkLinearContourLineInterpolator>::New();<br>
<br>
vtkOrientedGlyphContourRepresentation *rep
=vtkOrientedGlyphContourRepresentation::SafeDownCast(
widget->GetRepresentation() );<br>
rep->SetLineInterpolator(contourStyle);<br>
<br>
//on définit un Placer pour forcer le contour a etre sur la sphere<br>
vtkPolyDataPointPlacer * spherePlacer =
vtkPolyDataPointPlacer::New();<br>
spherePlacer->AddProp(sphereActor);<br>
rep->SetPointPlacer(spherePlacer);<br>
<br>
renWin->Render();<br>
rendIter->Initialize();<br>
widget->EnabledOn();<br>
rendIter->Start();</i></small></font><font face="Tahoma"><br>
<br>
<u><small>My questions :</small></u></font><br>
<ol>
<li><small><font face="Tahoma">The points of the contour are well
positionned on the sphere but it's not the case for the spans defining
the contour. Is there a way to force the entire contour (points +
spans) to be on the sphere ?</font></small></li>
<li><small><font face="Tahoma">How can I get the geometry of the </font><font
face="Tahoma" size="-1"><small><big>vtkContourWidget ? I saw in the
documentation</big>, <big>the</big> </small></font><font face="Tahoma"><i>GetSpan
</i>function of </font></small><small><font face="Tahoma">vtkContourLineInterpolator
</font></small><small><font face="Tahoma">but only returns one
span. My goal is to compute an extrusion (via </font></small><i><small>vtkLinearExtrusionFilter</small></i><small>)</small><small><font
face="Tahoma"> on this contour.<br>
</font></small></li>
</ol>
<small><font face="Tahoma">Thanks by advance,<br>
<br>
Nicolas</font></small><br>
<font face="Tahoma"><br>
<br>
</font>
</body>
</html>