[vtkusers] contour on surfaces

Daniel Kruber ich_daniel at habmalnefrage.de
Tue May 8 05:40:56 EDT 2012


Hello,

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)
Why the contour not lie on the surface?

code:
------
    // vtkPolyData pd, vtkActor actor - of surface-object;

   vtkContourWidget contourWidget = new vtkContourWidget();
   contourWidget.SetInteractor(view_volume.getRenderWindowInteractor());

   vtkOrientedGlyphContourRepresentation rep = 
(vtkOrientedGlyphContourRepresentation) contourWidget.GetRepresentation();
   rep.GetLinesProperty().SetColor(1, 0.2, 0);
   rep.GetLinesProperty().SetLineWidth(3.0);
         
   vtkPolygonalSurfacePointPlacer pointPlacer =new 
vtkPolygonalSurfacePointPlacer();
   pointPlacer.AddProp(actor);
   pointPlacer.GetPolys().AddItem( pd );
   rep.SetPointPlacer(pointPlacer);
         
   vtkPolygonalSurfaceContourLineInterpolator interpolator = new 
vtkPolygonalSurfaceContourLineInterpolator();
   interpolator.GetPolys().AddItem( pd );
 rep.SetLineInterpolator(interpolator);
         
 contourWidget.EnabledOn();
-------         


How long is the contour (line)? There are a function in vtk to calculate 
this?


Thanks by advance.

Daniel


    
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120508/e58acf55/attachment.htm>


More information about the vtkusers mailing list