Thanks Stefan it worked.
I only tried the parent transform and this resulted also in a zero result. I
missed the global transform function.
Matthias
___________________________________________________________________________
Dipl.-Inform. Matthias Noll
Department 'Visual Healthcare Technologies'
Fraunhofer IGD | Fraunhoferstr. 5 | 64283 Darmstadt | Germany
Tel +49-6151-155-485 | Fax +49-6151-155-480
[email protected]<mailto:[email protected]> |
www.igd.fraunhofer.de<http://www.igd.fraunhofer.de/>
___________________________________________________________________________
From: Dinkelacker, Stefan <[email protected]>
Sent: Mittwoch, 31. Oktober 2018 14:07
To: Noll, Matthias <[email protected]>;
[email protected]
Subject: RE: How to obtain mitk render window screen positions
Hi Matthias,
did you already try to get the position of the parent QWidget? See [1].
Best,
Stefan
[1] http://doc.qt.io/qt-5/qwidget.html#mapToGlobal
From: Noll, Matthias [mailto:[email protected]]
Sent: Mittwoch, 31. Oktober 2018 10:21
To: [email protected]<mailto:[email protected]>
Subject: [mitk-users] How to obtain mitk render window screen positions
Hi everybody,
I was wondering if somebody knows how to obtain the screen position of an mitk
render window e.g. the 3D render window (stdmulti.widget4, 3d)
I've already tried to obtain the position the following two ways
1:
vtkRenderWindow *renderWindow =
mitk::BaseRenderer::GetRenderWindowByName("stdmulti.widget4");
auto pos = renderWindow->GetPosition();
std::cout << "posx " << pos[0] << "posy " << pos[1] << std::endl;
2:
mitk::IRenderWindowPart *renderWindowPart = GetRenderWindowPart();
auto qrwin = renderWindowPart->GetQmitkRenderWindow("3d");
auto qpoint = qrwin ->pos();
std::cout << "posx1 " << pos[0] << "posy1 " << pos[1] << std::endl;
Both ways result produce coordinates (0,0) every time, which should not be the
case?
Any help would be appreciated,
Matthias
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users