[vtkusers] creating interactive seed placing window in vtk

michiel mentink michael.mentink at st-hughs.ox.ac.uk
Thu Jan 14 07:01:07 EST 2010


In the http://www.cmake.org/Wiki/Handle_keypress_events example, when I
press the following keys, the following actions occur:

q or e : exit
r-> zoom out
w-> display wire frame instead of solid
p-> place red colored axes around object

That interferes with my choice for r and p for user keys. I could change
those keys of course..
Can anyone tell me where these built-in interaction keys are documented? I
was expecting to find a key that makes the wire frame
get back to normal or the colored axes to disappear, but they don't...
How can they be bypassed?

Michael


On Thu, Jan 14, 2010 at 11:50 AM, michiel mentink <
michael.mentink at st-hughs.ox.ac.uk> wrote:

> Okay, found something about keypresses in VTK
>
> http://www.cmake.org/Wiki/Handle_keypress_events
>
> Michael
>
> On Thu, Jan 14, 2010 at 11:39 AM, michiel mentink <
> michael.mentink at st-hughs.ox.ac.uk> wrote:
>
>>
>> I'd like to create an interactive seed placing window in VTK for future
>> use with an ITK segmentation algorithm.
>> Preferably, I'd like to stay away from Tcl or TK / FLTK, unless it is
>> really advisable to do so. Just plain C++ in VTK.
>>
>> This is what I'd like to do:
>>
>> - open a dicom series and display a single slice in a renderwindow.
>> - With mousewheel action (up/down) the user can zoom in on a specific area
>> of an image
>> - with up/down keys the next/previous dicom slice from the series will be
>> shown
>> - with the 'p' key of the keyboard, a seedpoint will be displayed as a
>> colored pixel and the seedpoint location will be saved in a seed point list.
>> - with the 'r' key, the seed point will be removed from the image and the
>> seed point will be deleted from the seed point list.
>>
>> In the class references I've found that the vtkrenderwindowinteractor
>> class passes user interactions to the vtkinteractor style class.
>>
>> Promising functions in vtkrenderwindowinteractor:
>> -createdefaultpicker
>> -getmouseposition
>> -render
>> -setpicker
>> -getkeycode
>>
>> promising functions in vtkinteractor style:
>> -onchar
>> -onkeyup
>> -onkeydown
>> -onkeypress
>> -onkeyrelease
>> -setpickcolor
>> -setmousewheel motionfactor.
>>
>> Does anybody have an example I could look at?
>> What is the 'picker' function actually? It seems to me as returning a
>> pixel coordinate.
>> Any tips for how to set this up?
>>
>> I have to admit that I'm a newbie to VTK, so this project is quite
>> ambitious for me.
>>
>> kind regards, Michael
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100114/484f200b/attachment.htm>


More information about the vtkusers mailing list