[vtkusers] creating interactive seed placing window in vtk

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


Ok found another example to zoom in/out with mousewheel

http://www.cmake.org/Wiki/Plane_Picking

Now I have to display a dicom image, probably with
http://www.cmake.org/Wiki/VTK_Examples_Texture_map_an_ImageData
and set something up so it displays another image from the dicom series..




On Thu, Jan 14, 2010 at 12:01 PM, michiel mentink <
michael.mentink at st-hughs.ox.ac.uk> wrote:

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


More information about the vtkusers mailing list