Hi! I found how to do some of my task! :)
If I override some QmitkRenderWindow method and call them, I can interact
with the qt interface! I was able to move and press the cursor and move the
wheel.
Now I can't:
1) resize the image.
I could resize the image by overriding and calling resizeMitkEvent. But it
works only if I called before changeLayoutToWidget1(); on
my QmitkStdMultiWidget. Otherwise it doesn't work! Why???? What can I do????
2) move the image! I tried by overriding mousePressEvent() and calling it
in this way:
QPoint point_move(50, 50);
QMouseEvent move_event(QEvent::MouseButtonPress, point_move,
Qt::MiddleButton, QFlags<Qt::MouseButton>(Qt::MiddleButton ||
Qt::MiddleButton ), QFlags<Qt::KeyboardModifier>(Qt::NoModifier ||
Qt::NoModifier));
render_window->myMouseMoveEvent(&move_event);
But it doesn't work!
3) change the contrast of the image
How can I do?
Thanks in advance! :)
2013/10/24 Claudia Dualica <[email protected]>
> Hi,
> I'm developing on MITK, I'm working on Example Step8.
>
> I have two thread, one is mine, one is qtapplication.
> I have to interact with qtapplication without mouse, but with my thred.
>
> I connected the thread that I instantiated with qtapplication thread, to
> produce actions in qtapplication. I did it with QObject::connct with
> signals and slot.
>
> With an emit of my signal I moved the cross position by calling a Step8
> slot. This slot call MoveCrossToPosition of QmitkStdMultiWidget. So I can
> move cross position from my thread. :)
>
> I found another solution by overriding the mousePressEvent method
> of QmitkRenderWindow class and calling it. It move the mouse. :)
>
> Now I'd like to:
> 1) call the scroll of the mouse slot, to change the interface like scroll
> does.
> 2) call the slot about the right click whit move of the mouse, zoom the
> image like this action does.
> 3) call the slot about the right scroll of the windows to change the
> contrast of the image
> 4) move the image
> 5) rotate the image
>
> Ho can I do?
>
> Are there any events I can connect to do 1), 2) and 3)?
> I tried to connect on event of QmitkStdMultiWidget, but it doesn't work.
>
> Which function of mitk does what I need?
>
> I tried also by overriding and calling resizeEvent, mouseMoveEvent of
> QmitkRenderWindow Class, but nothing happens. How can I do?
>
> Thank's a lot for your help.
> Bye
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users