vtkPointHandleRepresentation2D SetDisplayPosition() bug
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I've recently struggled with using vtkPointHandleRepresentation2D as the handle representation when using vtkSeedWidget along with a vtkImageActorPointPlacer. The problem has been that any seeds placed stay in the same display position when moving the underlying image (zooming, panning, etc).
After a long while trying to figure out why the handles were doing this I found a solution was to immediately set the world position after a point is placed, using the display position of the point. So for instance, the problem is fixed if I add the following to the end of vtkPointHandleRepresentation2D::SetDisplayPosition()
double v[4]; if( this->Renderer ) { vtkInteractorObserver::ComputeDisplayToWorld( this->Renderer, p[0], p[1], p[2], w); this->SetWorldPosition(w); }
So is the current behavior desired, or is this a bug? And if it is a bug, does the above code fix it without breaking anything else?