<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-02-25 11:02 GMT+01:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>I found this old thread about vtkInteractorStyleUser:<br><br>    <a href="http://www.vtk.org/pipermail/vtkusers/2010-September/062584.html" target="_blank">http://www.vtk.org/pipermail/vtkusers/2010-September/062584.html</a><br><br></div>In it, David Gobbi explained:<br><br>> The vtkInteractorStyleUser is still the correct way to write a fully<br>> customized vtkInteractorStyle in the wrapper languages.  It isn't the<br>> only option, i.e. you can add observers to the other interactor<br>> styles, but it is different from the rest because it doesn't define<br>> any "default" interaction of its own.<br><br></div>Is this still true?<br><br></div>In my case, I have a large, roughly cylindrical volume (tomography of a drill core), where the camera should only ever see the cylinder from the side, with the line of sight perpendicular to the center line of the core. Rotation of the camera should also be limited to rotation around the center line of the core (z axis), with no possibility of roll, and I think I want to support this rotation only through a Qt slider, not by mouse interaction in the VTK window. Movement of the camera (and focal point) up and down the core should be through a Qt scrollbar. The last camera operation I want to support is zooming, and just like with rotation, I'd like this to be done through a Qt slider.<br><br>Apart from that, I only want to selectively add certain interactions in the VTK window, to allow the user to annotate the core visually by adding markers of various kinds through mouse clicks and click-drags.<br><br>It's because the set of interactions I want to support in the VTK window are so few, and quite specialized, I was looking at vtkInteractorStyleUser. Does it seems reasonable to use this interactor style in my case, or are there other approaches I should consider?<br><br></div><div>The only example I can find of vtkInteractorStyleUser usage is this C++ example:<br><br>    <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/InteractorStyleUser" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/InteractorStyleUser</a><br></div><div><br></div><div>But it seems this example just sets the vtkInteractorStyleUser on the interactor, not really making use of it (e.g. overriding its virtual On* methods)? Instead it adds observers to the interactor itself. Or is setting a vtkInteractorStyleUser on the interactor a prerequisite to be able to observe those events in this way?<br><br></div>Thankful for any advice / clarifications on how vtkInteractorStyleUser is meant to be used.<br></div></div></div></blockquote><div><br></div><div>An additional question: As a test, I just tried setting a vtkInteractorStyleUser as the style my vtkGenericRenderWindowInteractor (I'm using the QVTKRenderWindowInteractor from Python), instead of the vtkInteractorStyleImage I was using before (I'm mapping a slice of the core with a vtkImageResliceMapper), and with the vtkInteractorStyleUser set, the window does not render anything when I call Render() and Start() the interactor.<br><br></div><div>Is this to be expected when using the vtkInteractorStyleUser? The interactor shouldn't affect rendering, should it? How can I get back rendering when using vtkInteractorStyleUser?<br><br></div><div>Elvis<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>Cheers,<br></div>Elvis<br></div>
</blockquote></div><br></div></div>