I highly recommend to use the MITK interaction instead . All the interaction
in the MITK Workbench is done like this and it blends in well with all the
other interactions in the application. You can easily access the mouse position
through mitk::InteractionPositionEvent. Find some examples in the MITK source
code. Look for the "resource/Interactions" and "src/Interactions" directories
of modules, i. e. the BoundingShape module contains all the interaction for the
Image Cropper plugin, in which you can modify and move a box in the render
windows. There should be much smaller examples in the MITK source code as well.
Von: LOPEZ VELAZCO, ROCIO <rocio.lo...@upf.edu>
Gesendet: Montag, 19. Februar 2018 13:00
Betreff: [mitk-users] vtkRenderWindowInteractor and LeftButtonPressEvent
I am trying to simulate a virtual camera in a QmitkRenderWindow, the camera is
fixed to the tip of a pointer object. I would like to modify the
vtkRenderWindowInteractor so that modify the position of my object (and thus
the camera as well) only by using the 2D coordinates the mouse sends(left
button clicked), let's call it mouse navigation.
I can access the vtkRenderWindowInteractor, but I don't know how to access the
mouse clicked event and most important take the positions in the 3D world
coordinates. I read about this in Display Geometry
looking at the RenderWindowInteractor
() that needs SetEventInformation() call.
I am not sure how to use SetEventInformation() funcion... I guess I have to
pass it the x and y display positions once clicked but if it "should be called
just prior to"
() it confuses me.
Once I got the x and y positions I would do my computations so that move my
object and the camera.
I would be grateful if you could give me some tip! I don't know if this is the
best way to achieve my objective or there is a better one.
If it is not clear what I am asking feel free to make any question :)
Thank you very much in advance.
Rocío López Velazco
SimbioSYS group, BCN MedTech
Department of Information and Communication Technologies
Roc Boronat, 122 (Tànger Building), 08018 Barcelona
Office 55 119
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
mitk-users mailing list