[vtkusers] Picking and Annotation

David Gobbi david.gobbi at gmail.com
Wed Jan 27 10:27:00 EST 2010


Hi Rakesh,

The method that you use to annotate the cell will depend on whether
you want to permanently color the cell, or whether you just want to
highlight it.

If you just want to highlight the cell, then the best thing to do is
make a new polydata, set its color to black, and then add the picked
cell to the new polydata.  Then add this new polydata to an actor and
add the new actor to the renderer so that it will render the black
cell over the original cell.  Use the vtkGenericCell as an
intermediate for getting the cell from the original polydata and
adding it to the new polydata.

By doing things this way, you would leave the original polydata
unchanged, and create a new "annotation" actor that has your picked
cells.  I'm not sure if this is would meet your needs, but it would be
a straightforward way of visualizing the cell pick.

   David


On Wed, Jan 27, 2010 at 7:01 AM, Rakesh Patil <rakeshthp at in.com> wrote:
> Hello,
>
> I want to implement picking. With the help of an example, annotatePick.tcl,
> i'm able pick a cell, but annotation is not possible..
>
> I am displaying a triangular mesh. And when the user clicks on any of the
> cell of the mesh, i need that particular cell to be filled with black. Only
> that particular cell has to be annotated as a filled black color.
>
> Is it possible..?? After picking i'm getting cellid, of the cell which is
> selected. How can i do the annotation..??
>
> Thanks in advance
>
> Regards
>
>
> Dear vtkusers ! Get Yourself a cool, short @in.com Email ID now!
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list