[vtkusers] Mouse release and mapping (x,y) to slice (i,j)
Abdelkhalek Bakkari
bakkari.abdelkhalek at hotmail.fr
Mon Nov 7 09:53:59 EST 2016
Hi Dean,
Thank you for your help.
This example is not suitable with what I am asking about.
Abdelkhalek Bakkari
Ph.D candidate in Computer Science
Institute of Applied Computer Science
Lodz University of Technology, Poland
________________________________
From: Dean Inglis <inglis.dl at gmail.com>
Sent: 07 November 2016 15:13
To: Abdelkhalek Bakkari
Cc: VTK Mailing List
Subject: Re: [vtkusers] Mouse release and mapping (x,y) to slice (i,j)
Hi
here's one way to do what you want:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/PickingAPixel2
You do not have to involve Qt events ... add a VTK callback that
listens to VTK events.
- Dean
On Mon, Nov 7, 2016 at 8:55 AM, Abdelkhalek Bakkari <bakkari.abdelkhalek at hotmail.fr<mailto:bakkari.abdelkhalek at hotmail.fr>> wrote:
Dear VTK users,
I am using QT and VTK. I created a mouse release method to use it inside a QVTKWidget :
void MyQVTKWidget::mouseReleaseEvent(QMouseEvent* event)
{
if (pMainWindow)
{
((MainWindow *)pMainWindow)->myMouseReleaseEvent(event);
}
// call the super class to avoid troubles
QVTKWidget::mouseReleaseEvent(event);
}
Now, I would like to map (x,y) to slice (i,j). Generally, mouse position should be mapped into ( i, j) of current slice. It depends on the zoom factor, aspect ratio of the slice and the window size.
But, I am wondering about how can I solve this issue.
Thanks in advance!
Best regards,
Abdelkhalek Bakkari
Ph.D candidate in Computer Science
Institute of Applied Computer Science
Lodz University of Technology, Poland
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161107/0d251bee/attachment.html>
More information about the vtkusers
mailing list