<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hi David,</DIV>
<DIV> </DIV>
<DIV>Have you tried the following code which I found on Devsample.org (vtkImageTracerWidget on Image Data)?</DIV>
<DIV> </DIV>
<DIV>if (p->GetNumberOfPoints() == 0) {<BR> p->InsertNextPoint(0, 0, 0);<BR> p->InsertNextPoint(0, 0, 0);<BR>}</DIV>
<DIV> </DIV>
<DIV> // Update the widget now.<BR>m_pTracerWidget->InitializeHandles(p);<BR>m_pTracerWidget->Modified();<BR>m_pViewer->Render();<BR>p->Delete();<BR></DIV>
<DIV>John</DIV>
<DIV><BR><BR>>>> David Doria <daviddoria@gmail.com> 10/11/2010 19:59 >>><BR></DIV>
<DIV style="COLOR: #000000">I use a vtkImageTracerWidget to draw a single stroke. When I release<BR>the left mouse button, the stroke stays drawn on the image. Now I want<BR>to delete that stroke (during another event). If I call tracer->Off(),<BR>the stroke disappears, but then at some point I have to turn On() the<BR>tracer to draw another stroke, at which point the stroke reappears! I<BR>can't find a function that will delete all of the strokes for real. I<BR>found the ResetHandles() function and made it public just to test it<BR>out, but it seems the logic more complicated (it crashes sometimes).<BR><BR>Does anyone know how to clear this widget?<BR><BR>Thanks,<BR><BR>David<BR>_______________________________________________<BR>Powered by <A href="http://www.kitware.com">www.kitware.com</A><BR><BR>Visit other Kitware open-source projects at <A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR><BR>Please keep messages on-topic and check the VTK FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR><BR>Follow this link to subscribe/unsubscribe:<BR><A href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR></DIV></BODY></HTML>