The 3D view is all based on VTK libraries. Look in vtk*.cpp to see how it all fits together. To interact via keyboard input you will need to create an interactor observer which you can add to the chain of observers watching the render window's observer. It will need to change either the camera or the viewport to do this. I experimented with these features once, specifically to see if I could disable some of the more expensive calculations while the user is changing the scene with the mouse, but never got a sensible result. My experimental code is still in the class InteractorCallback (but I wouldn't necessarily use it as a starting point since it doesn't work :-)
Looking at the KitWare site now it looks like there is more info on this. http://www.vtk.org/Wiki/VTK/Tutorials/Callbacks is a discussion on how to add a KeyPressEvent callback to the render window's interactor. Now if I could just find how you convert that into a view point update… hmm, looks like vtkCamera::Azimuth and Elevation methods - and maybe SetFocalPoint.
Hope that helps,
Dave
On 22 Apr 2013, at 16:18, Rodrigo Perea <[log in to unmask]> wrote:
> Mark,
> I found all the cpp files under $FSLDIR/src/fslview. I could go over all of them until I find the one I need but it would probably be easier if you could point me to the right class, script if somebody could and they I would recompile.
> Thanks in advance,
> Rodrigo
>
> From previous conversation.....
> Dear Rodrigo,
>
> The source code for FSLView can be found in $FSLDIR/src/fslview and you can modify this and recompile it if that's what you would like to do.
>
> All the best,
> Mark
>
>
> On 17 Apr 2013, at 23:29, Rodrigo Perea <[log in to unmask]> wrote:
>
>> Hello,
>> I would like to know where can I change the binaries (if possible) to be able to use the meta-key (in muy case command from osx 10.7) to rotate the 3d image in teh z and y- direction.
>> Thanks in advance,
>> Rodrigo
>
--
Dave Flitney
Oxford Centre for Functional MRI of the Brain
E:[log in to unmask] W:+44-1865-222713 F:+44-1865-222717
URL: http://www.fmrib.ox.ac.uk/~flitney
|