Dear Marlene,

I would suggest you to first coregister your image to the SPM template before running freesurfer. Then the easiest thing to do would be to use freesurfer meshes for all boundaries and then you won't have a problem. You could do that in SPM12 batch tool for head model generation. Also if your only problem is that your mesh 'sticks out' of the inner skull boundary, that shouldn't be a problem in up-to-date SPM12 because there is code there that automatically makes sure that the mesh is far enough from the boundary for the forward computation to be valid. This was not done in SPM8 though. Look carefully at the final display of the forward model and there you should see that he mesh is within the boundary, even of originally it wasn't.

Best,

Vladimir


On Tue, Jun 3, 2014 at 10:20 PM, Marlene Bönstrup <[log in to unmask]> wrote:
Dear Mailinglist,

I am struggeling with a multimodal integration between EEG-Data processing in SPM using freesurfer-generated meshes of cortical ROIs.
In order to make a source reconstruction on these ROIS I need them to be coregistered with my forward model which I generate from the individual MRI. The freesurfer mesh in which ROIs are demarcated is also registered to the same MRI but there is a nonlinear spatial deformation done by the freesufer algorithm, making the freesurfer mesh being slightly tilted and shifted compared to the cortical mesh generated by SPM.

Any of the 4x4 transformation matrices that are encoded in the freesurfer files don't overcome this shift. The function spm_swarp using the y_....nii file generated by SPM does some shifting to the input (either the freesurfer mesh, or the cortical mesh), but it never completely alignes the freesurfer mesh to any of my SPM-generated files of the T1 (cortex_8196, the vol-struct).

I would be very grateful if anyone could give me hints, suggestions ideas how I can nonlinearly warp the two point clouds.

Best,
Marlene Bönstrup