Back to the main page.

Bug 2846 - ft_sourcemovie: restructure the code

Reported 2015-02-17 10:20:00 +0100
Modified 2015-02-17 11:10:23 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Jan-Mathijs Schoffelen - 2015-02-17 10:20:34 +0100

As discussed during the last bug binge, it would be good to make a distinction in functionality for the plotting of source-level data, between ft_sourceplot and ft_sourcemovie. The former should accept scalar data, the latter should accept higher dimensional data. The distinction between support for data defined on a volumetric grid, or on a cortical sheet should eventually disappear. This bug is a place holder to keep track of the revamping of ft_sourcemovie. My initial intention was to first clean up the existing code and take it from there. Yet, I think step 0 should be to investigate Joern's early attempts to make a general purpose movie function, and to see what clever stuff is in there. I need to see whether it makes sense to merge, and take it from there.

Jörn M. Horschig - 2015-02-17 11:06:48 +0100

oh boy, I still wanted to finish that one... but I keep on postponing forever and ever. If I recall correctly, the only clever trick I used is to use different function references for different types of data, i.e. something like (in pseudo-code) if issource opt.drawfnc = @drawSourceData elseif issensor opt.drawfnc = @drawSensorData end and similar for other within-datatype-distinctions. Imho this made the code more readable than having an infinitely long draw function that internally dissociates different cases. If you have any more questions on what I did, feel free to bug me.

Jan-Mathijs Schoffelen - 2015-02-17 11:10:23 +0100

Thanks for feedback. I started looking at the code. Can I assume that you have checked into svn the latest clever version?