Code source for Multi-touch

Dear Chimera Dev Team, I am referring to my email that I wrote in the beginning of April where I told about our diploma work. Just to sum it up in a couple of lines, we have a multi-touch screen (30") and we would like to make Chimera work with it. We would like to work with Chimera, because at the Center of Integrative Genomics at the University of Lausanne and at the Swiss Institute of Bioinformatics people use this software so this adaptation would even be useful besides that it would be our diploma work. So a couple of questions arise. Would it be possible to have the entire source code? We are ready to sign an NDA or any other contract if necessary. I am asking this because I am having difficulties to imagine how we could make the changes without being able to check how it works in the program. If there is a way to do it rapidly then of course we won't need the entire code source. The library that handles the touch events (touchDown, touchUpdate, touchRemove) is written in C++ (would wrap it of course). It gives basically the coordinates of the touches and updates the coordinates when dragging the finger. So we would need to replace mouse events with those and make zooming, translating and rotating functions available by using only the fingers. We would also make a new menu bar with only a couple of functions to be able to demonstrate the concept. So please tell us what would be possible and what wouldn't so we can evaluate the situation and make the right decisions immediately. Thanks a lot for taking the time to reply. Best regards, Gergely Nagy Marco Pambianchi

So a couple of questions arise. Would it be possible to have the entire source code? We are ready to sign an NDA or any other contract if necessary. I am asking this because I am having difficulties to imagine how we could make the changes without being able to check how it works in the program. If there is a way to do it rapidly then of course we won't need the entire code source.
The library that handles the touch events (touchDown, touchUpdate, touchRemove) is written in C++ (would wrap it of course). It gives basically the coordinates of the touches and updates the coordinates when dragging the finger. So we would need to replace mouse events with those and make zooming, translating and rotating functions available by using only the fingers. We would also make a new menu bar with only a couple of functions to be able to demonstrate the concept.
Hi, I implemented a multi-touch interface using the iPhone controller Chimera. For what you're describing, you don't need the C++ source code, just the Python code. Here's what I did. I embedded a threaded web server in Chimera using the standard Extension mechanism. That web server receives external multi-touch interface events and converts them to Chimera Python code. In your case, you would wrap your C++ event library in Python instead of using a web server. Here's an example when touch info comes in. RecordPosition gets called when a user presses down on the iPhone. TranslateXYCommand gets called when user drags 1 finger. ScaleXYCOmmand gets called when user pinches or expands two fingers. elif isinstance(item, RecordPositionCommand): chimera.viewer.recordPosition(time.time(), int(item.x), int(item.y), None) elif isinstance(item, TranslateXYCommand): chimera.viewer.translateXY(int(item.x), int(item.y), False) elif isinstance(item, ScaleXYCommand): chimera.viewer.zoom(int(item.x), int(item.y), False) Dave

Hi Gergely, I think you do not need the source code at all if your C++ touch library is wrapped for use from Python. All of the Chimera Python code is included in every Chimera distribution (look in chimera/share). The Python that handles the normal Chimera mouse modes (rotation, translation, zooming) is in chimera/share/chimera/tkgui.py. Look for the _mouseFuncs table at about line 2300. The mouse buttons can be reassigned to any function and this _mouseFuncs table gives functions that get invoked on mouse down, mouse drag and mouse up events. You can get the entire Chimera source code. It is available on the Chimera web site: http://www.cgl.ucsf.edu/chimera/sourcecode.html I've added today's source code to the web page and it will appear tonight when our web pages are rebuilt. Compiling it depends on getting about 35 third-party packages to compile, so you definitely do not want to try compiling it if that can be avoided. We have compilation of all those libraries automated on specially setup machines (operating systems, cpu architectures, developer tools installed, ...) and it can be a lot of trouble to get it to work on a new system. Tom
participants (3)
-
David Konerding
-
Gergely Nagy
-
Tom Goddard