[vtkusers] Clearing a vtkImageTracerWidget

David Doria daviddoria at gmail.com
Thu Nov 11 15:29:45 EST 2010


On Thu, Nov 11, 2010 at 5:10 AM, John Fraser <John.Fraser at icr.ac.uk> wrote:
> 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

Thanks John, that does the trick. Seems awfully hacky though... haha

David



More information about the vtkusers mailing list