[vtkusers] Pickable vtkPolyData

Jothybasu Selvaraj jothybasu at gmail.com
Wed Nov 30 05:11:04 EST 2011


Instead of passing it through a vtkTriangleFilter, have you tried passing
through the vtkDataSetSurfaceFilter and setting he representation to
wireframe?

I once had this problem, when I was trying to display a beam.

Jothy

On Tue, Nov 29, 2011 at 4:01 PM, Scott Johnson <Scott.Johnson at neuwave.com>wrote:

> Hello,****
>
> ** **
>
> I’ve been developing a capability to interactively create contours on
> image slices with ActiViz 5.6.1 on Windows 7 x64.****
>
> ** **
>
> During the initial definition of the contour the representation is stored
> in a vtkPolyData built up by defining Line cells.  When the editing is
> completed the contour is closed by defining a line from the last to the
> first point.  The entire pipeline for display looks like:****
>
> ** **
>
> vtkPolyData -> vtkPolyDataMapper -> vtkActor -> …****
>
> ** **
>
> The problem comes when I try to pick the contour.  I’d like to click
> within the closed polygon defined by the lines and be notified of the
> pick.  However, since the vtkPolyData is made of lines the pick doesn’t
> seem to recognize it.  I’ve used different prop pickers (i.e. vtkPropPicker
> and vtkCellPicker) all failing.  I decided that I had to define the cell in
> the vtkPolyData as a Polygon rather than lines for the pick to be
> recognized.  This solved the picking problem.  In order to correctly
> display the boundaries of the polygonal cell I had to pass the vtkPolyData
> through a vtkTriangleFilter.****
>
> ** **
>
> Now I want the display to be an outline of the polygon cell without any
> interior shading.  The side effect of vtkTriangleFilter is that it breaks
> the single cell into multiples which causes lines to be drawn across the
> interior of the polygon.  This is undesirable.  I’ve tried using different
> representations for the actor, but Wireframe and Surface don’t look right.
> ****
>
> ** **
>
> After all that, is there a way to display the contour as an outline and
> have it pickable?  Right now I’m leaning toward having 2 actors, one with
> the lines and one with the polygon, but make the polygon actor
> transparent.  However I’d like to avoid the overhead.****
>
> ** **
>
> Thanks****
>
> ** **
>
>                                 -- Scott****
>
> ** **
>
> _______________________________________________
> 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
>
>


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111130/d47dcc4f/attachment.htm>


More information about the vtkusers mailing list