[FieldTrip] Importing Brainstorm head and source models and leftfields
Marco Buiatti
marco.buiatti at gmail.com
Thu Nov 10 11:56:03 CET 2016
Dear Francois,
this is really good news, thanks!
I have tested the Process > Sources > Fieldtrip: ft_prepare_leadfield on
different MEG data (always recorded from an Elekta 306 sensors system), and
I get an error "cannot work on balanced gradiometer definition" (see the
warnings below). I have tried to debug this but I am a bit lost since I am
not very familiar with manipulating source data.
I also have a basic question on the data to put in the process: my
understanding is that I should feed the process with the segmented anatomy,
that I identify with (for the default anatomy) the "Cortex_15002V" in the
anatomy tab. However, I cannot drag it to the Process window (I understand
that the sensor configuration is also needed). I therefore drag in the
Process window any data associated with the subject. Is this correct? Does
the program then automatically process the segmented anatomy?
Can you please shed light on this, or advice me on how to debug it?
Thanks a lot,
Marco
BST> FieldTrip install:
C:\Users\marco.buiatti\Documents\software\fieldtrip-20161107
the input is volume data with dimensions [181 217 181]
Converting the coordinate system from ctf to spm
Rescaling NIFTI: slope = 0.00342945, intercept = 0
Smoothing by 0 & 8mm..
Coarse Affine Registration..
Fine Affine Registration..
performing the segmentation on the specified volume
creating brainmask
smoothing brainmask with a 5-voxel FWHM kernel
thresholding brainmask at a relative threshold of 0.500
the call to "ft_volumesegment" took 52 seconds
Warning: assuming that planar MEG channel units are T/m
> In ft_chanunit at 173
In ft_datatype_sens at 392
In ft_datatype_sens at 158
In ft_checkconfig at 232
In utilities\private\ft_preamble_trackconfig at 37
In ft_preamble at 56
In ft_prepare_headmodel at 148
In process_ft_prepare_leadfield>Run at 249
In process_ft_prepare_leadfield at 24
In bst_process>Run at 229
In bst_process at 36
In panel_process1>RunProcess at 141
In panel_process1 at 27
In gui_brainstorm>CreateWindow/ProcessRun_Callback at 707
In bst_call at 28
In gui_brainstorm>@(h,ev)bst_call(@ProcessRun_Callback) at 261
Warning: please specify cfg.method='projectmesh', 'iso2mesh' or
'isosurface'
> In ft_prepare_mesh at 137
In ft_prepare_headmodel at 348
In process_ft_prepare_leadfield>Run at 249
In process_ft_prepare_leadfield at 24
In bst_process>Run at 229
In bst_process at 36
In panel_process1>RunProcess at 141
In panel_process1 at 27
In gui_brainstorm>CreateWindow/ProcessRun_Callback at 707
In bst_call at 28
In gui_brainstorm>@(h,ev)bst_call(@ProcessRun_Callback) at 261
Warning: using 'projectmesh' as default
> In ft_prepare_mesh at 138
In ft_prepare_headmodel at 348
In process_ft_prepare_leadfield>Run at 249
In process_ft_prepare_leadfield at 24
In bst_process>Run at 229
In bst_process at 36
In panel_process1>RunProcess at 141
In panel_process1 at 27
In gui_brainstorm>CreateWindow/ProcessRun_Callback at 707
In bst_call at 28
In gui_brainstorm>@(h,ev)bst_call(@ProcessRun_Callback) at 261
triangulating the outer boundary of compartment 1 (brain) with 3000 vertices
the call to "ft_prepare_mesh" took 1 seconds
the call to "ft_prepare_headmodel" took 1 seconds
***************************************************************************
** Error: [process_ft_prepare_leadfield] Sources > FieldTrip:
ft_prepare_leadfield
** Line 228: ft_plot_sens (line 228)
** cannot work with balanced gradiometer definition
**
** Call stack:
** >ft_plot_sens.m at 228
** >process_ft_prepare_leadfield.m>Run at 255
** >process_ft_prepare_leadfield.m at 24
** >bst_process.m>Run at 229
** >bst_process.m at 36
** >panel_process1.m>RunProcess at 141
** >panel_process1.m at 27
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 707
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 261
**
**
** File: 150505/@raw19900812VTTN_01run4/data_0raw_19900812VTTN_01run4.mat
**
***************************************************************************
[image: Inline images 2]
On 5 November 2016 at 15:33, Francois Jean Tadel, Mr <
francois.tadel at mcgill.ca> wrote:
> Jeff, Marco:
>
>
> Good timing, I've been working on similar topics this week. I added
> processes in Brainstorm to use the forward models in FieldTrip, using
> ft_volumesegment, ft_prepare_headmodel and ft_prepare_leadfield. For now it
> is not possible to use the Brainstorm BEM surfaces to compute the leadfield
> with FieldTrip, but if you think this is useful, we could probably add this.
>
>
> Before the end of the month, I hope to have all the inverse models
> available as well. We will have the possibility to call them either with
> Brainstorm or FieldTrip forward solutions.
>
>
> I you want to help me with the debugging, or if you want to start working
> on the inverse/DICS part next week, it's all on github:
> https://github.com/brainstorm-tools/brainstorm3/blob/master/
> toolbox/process/functions/process_ft_volumesegment.m
> https://github.com/brainstorm-tools/brainstorm3/blob/master/
> toolbox/process/functions/process_ft_prepare_leadfield.m
>
> You could create a new process to call the FieldTrip function you want,
> there are already many other examples of wrappers available:
> process_ft_channelrepair.m
> process_ft_dipolefitting.m
> process_ft_scalpcurrentdensity.m
> process_ft_timelockstatistics.m
> process_ft_sourcestatistics.m
> process_ft_freqstatistics.m
>
> If you need help with the plugin API in Brainstorm:
> http://neuroimage.usc.edu/brainstorm/Tutorials/TutUserProcess
>
> Functions to convert Brainstorm files into FieldTrip structures:
> brainstorm3/toolbox/io/out_fieldtrip_*.m
>
> Cheers,
> Francois
>
>
> ------------------------------
>
> Hi Marco,
>
> Sorry to say I was not successful, yet. I have shifted to other tasks at
> this point. I am using 256 channel EEG, and want to use the FreeSurfer
> cortical ribbon as my source model (I would prefer source/headmodels to be
> FEM as well). I found that a lot of FieldTrip is based on regular dipole
> grids, and also it is more oriented to MEG than EEG. I do not have the
> time right now to try to put all the pieces together in FieldTrip to do
> what I want, but might get back to it in a month or two.
>
> Sorry I could not be of more help to you right now.
>
> -Jeff
>
>
>
> From: Marco Buiatti [mailto:marco.buiatti at gmail.com
> <marco.buiatti at gmail.com>]
> Sent: Friday, November 04, 2016 3:08 AM
> To: FieldTrip discussion list; K Jeffrey Eriksen
> Subject: Re: [FieldTrip] importing Brainstorm head and source models and
> leftfields
>
> Dear all,
>
> I have Jeff's same question. I have anatomies ready in Brainstorm:
> segmented data imported, co-registration with MEG sensor space, computation
> of head model with overlapping spheres. Now I would like to import all this
> into Fieldtrip for source reconstruction of oscillatory sources (DICS).
> What's the best way to do this?
>
> And is there any difference between Brainstorm and Fieldtrip in these
> steps that I should be aware of?
>
> Jeff, did you manage to solve the problem?
>
> Thanks a lot,
>
> Marco
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
--
Marco Buiatti
Neonatal Neurocognition Lab
Center for Mind/Brain Sciences
University of Trento,
Piazza della Manifattura 1, 38068 Rovereto (TN), Italy
E-mail: marco.buiatti at unitn.it
Phone: +39 0464-808178
https://sites.google.com/a/unitn.it/marcobuiatti/
***********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161110/a99c6a5b/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 53275 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161110/a99c6a5b/attachment-0002.png>
More information about the fieldtrip
mailing list