[vtkusers] QVTKWidget existing interactors

David Doria daviddoria+vtk at gmail.com
Wed Apr 14 12:04:34 EDT 2010


> On Wed, Apr 14, 2010 at 4:26 PM, Drysdale, Jeremy
> <jeremy.drysdale at philips.com> wrote:
>>
>> Hello VTK users,
>>
>>
>>
>> I am still fairly new to VTK, so please forgive my (likely) noob question…
>>
>>
>>
>> I have several QVTKWidgets on screen at one time (some showing 2D slices,
>> some showing a 3D volume).  I would like to add an interactor to these
>> widgets so that the 2D slice viewers will scroll through the slices with the
>> mouse wheel, the 3D volume viewer will roll/rotate with a mouse click/drag,
>> and both 2D and 3D have the capability to adjust window/level and zooming
>> via some mouse movement (doesn’t matter how).  Scrolling and window/level
>> modifications are already available through sliders on the GUI.
>>
>>
>>
>> My question is, do interactors already exist that do this sort of thing?
>> Or is this something I must write custom?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Jeremy Drysdale
>>
>> Distinguished Research Engineer
>>
>> Prototyping
>>
>> Philips Research North America
>>
>> 345 Scarborough Road
>>
>> Briarcliff Manor, NY, 10510, USA
>>
>> Tel: (914) 945-6612
>>
>> E-mail: jeremy.drysdale at philips.com

What you're looking for are called interactor "styles". These classes
start with vtkInteractorStyleXYZ

Here are some examples demonstrating how to use SetInteractorStyle:

http://www.vtk.org/Wiki/VTK/Examples/InteractWithImage
http://www.vtk.org/Wiki/VTK/Examples/Interaction/TrackballCamera

Thanks,

David



More information about the vtkusers mailing list