Monday, August 18, 2014

Pencils Down

Welp, that's the end of Google Summer of Code 2014, but not the end of this project. I didn't blog as much as I would have liked to, but I think I accomplished a lot overall.

Regarding the last post, the problem I encountered was that the source spaces were in "head" coordinates, which happens when the forward solution is computed. "Head" coordinates refers to the coordinate space of the MEG or EEG sensors. To resolve this, I had to transform the grid of mri voxels to "head" coordinates as well when mri_resolution=True. This wasn't an issue when mri_resolution=False because the volume source space was also converted to "head" coordinates.

Now the class SourceSpaces has a method called export_volume, which saves the source spaces as a nifti or mgz file that can be viewed in freeview. This only works for mixed source spaces with at least one volume source space, since the volume source space is responsible for setting up the 3d grid.

The source estimate can also be computed from a mixed source space. I wasn't able to implement code to view the source estimate as a 4d image, but that will build largely on the export_volume code previously described.

In addition, I created an example file to generate mixed source spaces. This example outputs the following figures.

The first figure shows the cortical surface with the additional volume source space of the left cerebellum. The locations of the dipoles are in yellow. The second figure shows the .nii file in freeview, where source spaces are in red.

Future work that needs to be done is creating these visualizations for source estimates, add options to fix the orientation of surface but not volume dipoles, and continue testing the accuracy of these combined source spaces using simulated data.

No comments:

Post a Comment