[vtkusers] Picking and Annotation
Rakesh Patil
rakeshthp at in.com
Wed Jan 27 12:00:53 EST 2010
HI..Thanks to all for your replies.. To David Gobbi,I want it just to highlight the cell so that next time again when user clicks some other cell,then, the current cell, which is highlighted ( or which is black), should become white and the newly selected cell, must be highlighted.I also thought the same thing, but, later on i thought, that we need to use two actors. and i guess, it can be done with one.. So just to find whether there is any possibility that this taskcan be achieved by using single actor or not, i posted my question. Nevertheless, i'll tr to implement this first.Thanks. Original message From:Karthik Krishnan< karthik.krishnan at kitware.com >Date: 27 Jan 10 22:07:21Subject:Re: [vtkusers] Picking and AnnotationTo: Rakesh Patil And be prepared to handle z fighting issues.. using one of thestandard ways.. also seevtkMapper::ResolveCoinicidentTopologyToPolygonOffsetOn Wed, Jan 27, 2010 at 10:27 AM, David Gobbiwrote:> 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 Patilwrote:>> 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 opensource projects at>> http://www.kitware.com/opensource/opensource.html>>>> Please keep messages ontopic and check the VTK FAQ at:>> http://www.vtk.org/Wiki/VTKFAQ>>>> Follow this link to subscribe/unsubscribe:>> http://www.vtk.org/mailman/listinfo/vtkusers>>>>> > Powered by www.kitware.com>> Visit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.html>> Please keep messages ontopic and check the VTK FAQ at: http:/
/www.vtk.org/Wiki/VTKFAQ>> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100127/d0ccf9ba/attachment.htm>
More information about the vtkusers
mailing list