[vtkusers] How to get silhouette/mask of rendered polydata?
David Gobbi
dgobbi at atamai.com
Mon May 8 10:43:16 EDT 2006
Hi Michael,
There is a filter that does this in 3D, it is called
vtkPolyDataToImageStencil. There is not yet a VTK filter that does it
for 2D polydata.
However, if you look at
VTK/Widgets/Testing/Cxx/TestImageTracerWidget.cxx (look in Hybrid if you
have VTK 4) there is an example of converting a 2D polydata to a 3D
polydata with extrusion. Not quite ideal, but it should work.
- David
Michael Rice wrote:
> I am rendering a vtkImageData as the background image and a
> vtkPolyData on top of it. What I need to do is get the elements from
> the vtkImageData that are beneath the rendered vtkPolyData. Basically
> I'm trying to use the vtkPolyData to generate a mask for the image.
>
> I thought of using a clip plane on the poly data, but I don't think
> that will take into account the perspective rendering and the pixel
> aspect ratio. Is that correct?
>
> Does anyone have any hints or examples on how I can do this?
>
> Thanks.
> Michael
> _______________________________________________
> This is the private VTK discussion list.Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list