[vtkusers] Clearing a vtkImageTracerWidget
John Fraser
John.Fraser at icr.ac.uk
Thu Nov 11 05:10:21 EST 2010
Hi David,
Have you tried the following code which I found on Devsample.org (vtkImageTracerWidget on Image Data)?
if (p->GetNumberOfPoints() == 0) {
p->InsertNextPoint(0, 0, 0);
p->InsertNextPoint(0, 0, 0);
}
// Update the widget now.
m_pTracerWidget->InitializeHandles(p);
m_pTracerWidget->Modified();
m_pViewer->Render();
p->Delete();
John
>>> David Doria <daviddoria at gmail.com> 10/11/2010 19:59 >>>
I use a vtkImageTracerWidget to draw a single stroke. When I release
the left mouse button, the stroke stays drawn on the image. Now I want
to delete that stroke (during another event). If I call tracer->Off(),
the stroke disappears, but then at some point I have to turn On() the
tracer to draw another stroke, at which point the stroke reappears! I
can't find a function that will delete all of the strokes for real. I
found the ResetHandles() function and made it public just to test it
out, but it seems the logic more complicated (it crashes sometimes).
Does anyone know how to clear this widget?
Thanks,
David
_______________________________________________
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
The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101111/e1b2b343/attachment.htm>
More information about the vtkusers
mailing list