[vtkusers] please help with events and observers

Anka Kochanowska anka at bic.mni.mcgill.ca
Tue Apr 17 10:40:31 EDT 2007


Hi!
I am showing some MRI data in 4 views - one is 3D, others are 2D 
saggital, transversal and coronal.
I construct a surface in 3D and pick points on the surface. Once the 
point is picked, I move 2D planes to pass through the point. The point 
shows as a sphere in 3D and as cross in 2D. For 3D point I derieved a 
class from vtk3DWidget - PointObject. Another class PickerObject 
derieved from vtkObject, stores the list of points and manages removing, 
adding and changing position. I show a list of picked points and their 
coordinates. Points are picked with left mouse button.

This part works well. Now I want to move the point around in 3D view 
using still left mouse button and:
- show the 2D planes passing through the new coordinates
- change the coordinates on the list.

Moving works but, PickerObject cannot get changed coordinates.

Picked point should identify itself somehow and I do not know how.

I try to invoke PlacePointEvent (it seems to be an appropriate event) 
from OnLeftButtonUp() in PointObject  but it is ignored by PickerObject.

I managed to get the point picked twice instead.


Anka










More information about the vtkusers mailing list