[FieldTrip] Question on bemcp's and openmeeg's vol.mat
kgm at tf.uni-kiel.de
kgm at tf.uni-kiel.de
Thu Nov 7 15:56:54 CET 2013
Hi Lilla,
Thank you for your reply.
The openmeeg works well for the mri (subject01.mri) that is used in the
fieldtrip tutorial.
But the error comes when I use my subject's mri whose anatomy is
256*256*192. I have also tried to use mri = ft_volumereslice(cfg,mri)
thinking that the error might be due to the inequality of the size of the
anatomical volume into each direction.
Kidist
> hi Kidist,
>
> I am wondering if you have installed openmeeg properly. Here is a site to
> explain it:
> http://fieldtrip.fcdonders.nl/faq/how_can_i_use_openmeeg_for_forward_modelling
>
> Have you followed this?
>
> Lilla
>
>
>
>> Hi,
>>
>> I am working with the combined EEG and MEG recording and would like to
>> do
>> the forward model for the EEG.
>>
>> So I was trying to use the 'bemcp' and 'openmeeg' as am working on
>> windows
>> platform. I have the anatomy of my subject (DICOM file stacked and
>> cleaned
>> using SPM).
>>
>> When I try to use openmeeg, vol.mat is missing from the vol structure
>> giving an error message om_minverser.exe doesn't function anymore.
>>
>> When I try to use 'bemcp', vol.mat contains all NaNs which resulted from
>> the c12 and c21 matrices being not a square matrix which makes the
>> inverse
>> to be non-existent and also those matrices consists a large number of
>> 'Inf' entries.
>>
>> Like it was mentioned on one of the forums, the error might come when
>> the
>> meshes are generated. I was able to find the index of the vertices from
>> the Cij matrix, but I couldn't find the actual relation to the
>> vol.bnd(i).pnt and vol.bnd(i).tri matrices, 'i' representing either
>> brain,
>> skull or scalp.
>>
>> Here are all the steps that I have followed.
>>
>> % reading MRI
>> mri = ft_read_mri('msGAP724534-0002-00001-000192-01.img');
>>
>> % segment the brain
>> cfg = [];
>> cfg.output = {'brain', 'skull', 'scalp'};
>> cfg.coordsys = ''; % here I use the RAS coordsys and for the origin 'i'-
>> interauricular
>> segmentedmri = ft_volumesegment(cfg, mri);
>> segmentedmri.anatomy = mri.anatomy;
>>
>> % prepare mesh
>> cfg = [];
>> cfg.tissue = {'brain','skull', 'scalp'};
>> cfg.numvertices = [3000 2000 1000];
>> cfg.transform = segmentedmri.transform;
>> bnd = ft_prepare_mesh(cfg, segmentedmri);
>>
>> % create head model
>> cfg = [];
>> cfg.method = 'openmeeg';
>> cfg.conductivity = [0.33 0.0041 0.33];
>> vol = ft_prepare_headmodel(cfg, bnd);
>>
>> figure;
>> ft_plot_mesh(vol.bnd(1),'facecolor','none'); %brain
>> figure;
>> ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull
>> figure;
>> ft_plot_mesh(vol.bnd(3),'facecolor','none'); %scalp
>>
>> Any help?
>>
>> Thanks.
>> Kidist
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
More information about the fieldtrip
mailing list