MantisBT - VTK
View Issue Details
0006909VTK(No Category)public2008-04-26 00:242013-04-05 19:57
Patrick Emond 
dean 
normalmajoralways
closedfixed 
 
 
0006909: vtkPointHandleRepresentation2D SetDisplayPosition() bug
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?
Behavior identical on Linux (Ubuntu 64-bit) and Windows XP.
No tags attached.
Issue History
2008-04-26 00:24Patrick EmondNew Issue
2008-04-28 10:49deanNote Added: 0011568
2008-04-28 10:50deanStatusbacklog => @80@
2008-04-28 10:50deanResolutionopen => fixed
2008-04-28 10:50deanAssigned To => dean
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-04-05 19:57Berk GeveciStatuscustomer review => closed

Notes
(0011568)
dean   
2008-04-28 10:49   
fixed using suggested patch, no testing issues using MS VS 2005 express, shared release build on Vista OS