<html>
<head>
<title></title>
<style type="text/css" media="screen">
body {font-family: verdana, arial, helvetica, sans-serif;font-size: 12px;padding: 5px;margin: 0;background-color: #FFF;}
p, ul, li {margin-top: 0;margin-bottom: 0;}
blockquote {margin-left: 5px;}
div.signature {color: #666;font-size: 0.9em;}
</style>
</head>
<body>
Hello,<br /><br />I built a quick test which uses vtkContourWidget, vtkPolygonalSurfacePointPlacer and vtkPolygonalSurfaceContourLineInterpolator to display a contour on a surface. When I set the points, these are on the surface. But not the contourlines. (Look at this: http://s14.directupload.net/file/d/2884/mlhlkkm4_jpg.htm)<br />Why the contour not lie on the surface?<br /><br />code:<br />------<br /> <span style="font-style: italic;"> <span style="font-family: Courier;">// vtkPolyData pd, vtkActor actor - of surface-object;</span></span><br style="font-style: italic; font-family: Courier;" /><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> vtkContourWidget contourWidget = new vtkContourWidget();</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> contourWidget.SetInteractor(view_volume.getRenderWindowInteractor());</span><br style="font-style: italic; font-family: Courier;" /><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> vtkOrientedGlyphContourRepresentation rep = (vtkOrientedGlyphContourRepresentation) contourWidget.GetRepresentation();</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> rep.GetLinesProperty().SetColor(1, 0.2, 0);</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> rep.GetLinesProperty().SetLineWidth(3.0);</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> </span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> vtkPolygonalSurfacePointPlacer pointPlacer =new vtkPolygonalSurfacePointPlacer();</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> pointPlacer.AddProp(actor);</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> pointPlacer.GetPolys().AddItem( pd );</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> rep.SetPointPlacer(pointPlacer);</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> </span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> vtkPolygonalSurfaceContourLineInterpolator interpolator = new vtkPolygonalSurfaceContourLineInterpolator();</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> interpolator.GetPolys().AddItem( pd );</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> rep.SetLineInterpolator(interpolator);</span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> </span><br style="font-style: italic; font-family: Courier;" /><span style="font-style: italic; font-family: Courier;"> contourWidget.EnabledOn();</span><br />------- <br /><br /><br />How long is the contour (line)? There are a function in vtk to calculate this?<br /><br /><br />Thanks by advance.<br /><br />Daniel<br /><br /><br />
<div class="signature"><br /><br /><br />-- <br />NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! <br />Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a</div></body>
</html>