[vtkusers] cleaning vtkSilhouette result

Lars Friedrich Lars lars-friedrich at gmx.net
Fri Nov 5 07:50:45 EDT 2010


Hi nsarrasin,

I'm not sure whether you recognized that the vtkPolyDataSilhouette filter does not generate an output that lies on the view plane (mapped to the 2D plane in 3D space) - it rather extracts edges of the 3D object - it will be difficult to infer "connectivity" from these 3D parts. See also: http://vtk.1045678.n5.nabble.com/projection-onto-a-plane-td1244478.html#a1244479 .

What about an approximate approach as follows in order to extract the external contour of a poly data object:
- render the poly data with the desired geometric setup (view plane, position ...)
- modify the poly data's material properties so that you gain a binary image at the end
- extract the rendered image using the vtkWindowToImageFilter  
- use the extracted 2D image as input for vtkContourFilter and simply set an appropriate isovalue that is suitable to extract the outer contour as poly data again

... I did not implement that myself, but I think this should work.

regards,
lars


-------- Original-Nachricht --------
> Datum: Fri, 5 Nov 2010 04:03:00 -0700 (PDT)
> Von: nsarrasin <nsarrasin at phenix-systems.com>
> An: vtkusers at vtk.org
> Betreff: [vtkusers] cleaning vtkSilhouette result

> 
> Hi all,
> 
> I'm using vtkSilhouette on a vtkPolyData to get its contours.
> It works well and you can see the result here :
> http://img143.imageshack.us/img143/8783/vtksilhouette.png
> 
> Now my goal is to clean the result to extract the external contour of this
> result , as if it was the shadow of the vtkPolyData.
> 
> vtkConnectivityFilter->ExtractLargestRegion() doesn't work here because
> there are some auto-intersected silhouettes.
> 
> I'm quite lost on this case because I'm pretty sure it's possible but
> don't
> know where to look.
> 
> Note that I've already posted a similar question but never find any
> answer,
> hope sometimes someone can advice me.
> 
> Thanks by advance
> -- 
> View this message in context:
> http://vtk.1045678.n5.nabble.com/cleaning-vtkSilhouette-result-tp3251639p3251639.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl



More information about the vtkusers mailing list