[vtkusers] creating interactive seed placing window in vtk

michiel mentink michael.mentink at st-hughs.ox.ac.uk
Thu Jan 14 06:50:32 EST 2010


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/dcca3474/attachment.htm>


More information about the vtkusers mailing list