Back to the main page.

Bug 698 - development: code is not in FT style

Reported 2011-05-26 13:28:00 +0200
Modified 2011-07-28 08:53:36 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 enhancement
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Lilla Magyari - 2011-05-26 13:28:00 +0200

hi, the final steps of creating the source space for the MNE source reconstruction is not in FT style. It looks like this: T = mri.transform*inv(mri.transformorig); % go to the Subject01/bem directory bnd = ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'mm'); sourcespace.pnt = warp_apply(T, sourcespace.pnt); sourcespace = ft_convert_units(sourcespace,'cm'); save sourcespace sourcespace Check out it here: Is it possible to use here a simple ft function with inputs like mri and bnd, and with output of sourcespace? Lilla

Robert Oostenveld - 2011-05-26 13:37:03 +0200

There are the functions forward/ft_transform_headshape.m forward/ft_transform_sens.m forward/ft_transform_vol.m which serve this purpose on the respective "geometrical objects" Should we continue making ft_transform_xxx for each object type, or should we make a single ft_transform_geometry that incorporates all possible geometrical objects? My idea would be that ft_transform_geometry would call the respective subfunctions, and that it should replace warp_apply all together.

Jan-Mathijs Schoffelen - 2011-05-26 13:42:54 +0200

I think a single general purpose function is OK. Would the idea be to move the respective ft_transform_vol/sens/headshape to forward/private? I could have a shot at it.

Jan-Mathijs Schoffelen - 2011-07-20 15:59:45 +0200

Hi Lilla, I changed the tutorial a bit. Can you have a look whether it is to your liking?