[vtkusers] Drawing lines on a 2D image in response to user mouse click

arasu arasakumaran at yahoo.com
Wed Jul 13 07:21:24 EDT 2016


Hi,   I have 2D data (usually double - sometimes unsigned short ) that I need to display using pseudocolor and let the user choose a point to divide the image into 4 quadrants - by drawing a vertical and horizontal line where they have clicked.
I have learnt to display the data after importing with vtkImageImport. - I have done this with ImageViewer2, as well as by using  Mapper / Actor /Interator.
I see the examples of PickPixel, PointPicker etc. and see how we can get the point where the user clicked.  I also saw someone respond to a similiar question some time ago about using vtkLineWidget2.  However the example does not help me as the line needs to be where the user clicked and the line itself should move to the new point where clicked if the user clicks elsewhere on the picture.   
I would appreciate some pointers, sample code or a link to an example that I have missed.
Thanks 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160713/a95a3d8d/attachment.html>


More information about the vtkusers mailing list