[FieldTrip] BEM volume conduction model using 'dipoli'

Singh, Tarkeshwar singht at musc.edu
Sun Dec 25 17:36:56 CET 2016


Dear Fieldtrip users,

I have been trying the ‘dipoli’ method to create a volume conduction model but I keep get the following error.

Fatal error in dipoli:  interface /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_1.tri and /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_2.tri intersect
 at vertex 14 of /private/tmp/tp939c3f6a_cbd3_4c15_aac3_e88d1c7bb9b0_1.tri

Error using ft_headmodel_dipoli (line 211)
an error ocurred while running the dipoli executable - please look at the screen output

Error in ft_prepare_headmodel (line 284)
      headmodel = ft_headmodel_dipoli(geometry, 'conductivity', cfg.conductivity,
      'isolatedsource', cfg.isolatedsource);


I would appreciate any help in resolving this problem. My code is attached below.

Thank you and Merry Christmas,
Tarkesh

%Begin Code

imageDir = [hdd 'EEG/Subject' num2str(folderNumber) '/'];
files = dir(fullfile(imageDir,'*.nii'));
mri = ft_read_mri(files.name);
disp(mri)

mri= ft_determine_coordsys(mri);

cfg=[];
ft_sourceplot(cfg,mri);

cfg     = [];
cfg.dim = mri.dim;
mri_align_sliced     = ft_volumereslice(cfg,mri);

cfg = [];
cfg.method = 'interactive';
cfg.coordsys = 'ctf';
cfg.viewmode='ortho';
mri_align_sliced    = ft_volumerealign(cfg, mri_align_sliced);

%
cfg=[];
ft_sourceplot(cfg,mri_align_sliced);

save([savDir sbj], 'mri_align_sliced','-append')
%% Segmentation
cfg           = [];
cfg.output    = {'brain','skull','scalp'};
segmentedmri  = ft_volumesegment(cfg, mri_align_sliced);

save([savDir sbj], 'segmentedmri','-append')
disp(segmentedmri);

cfg=[];
cfg.tissue={'brain','skull','scalp'};
cfg.numvertices = [3000 2000 1000];
bnd=ft_prepare_mesh(cfg,segmentedmri);
figure;ft_plot_mesh(bnd);

save([savDir sbj], 'bnd','-append')
%% Create a volume conduction model using 'dipoli', 'openmeeg', or 'bemcp'.
%BEMCP
cfg        = [];
cfg.method ='dipoli'; %
vol_dipoli        = ft_prepare_headmodel(cfg, bnd);
save([savDir sbj], 'vol','-append')

%End Code
--
Tarkeshwar Singh
Postdoctoral Scholar
Department of Health Sciences and Research
Medical University of South Carolina
77 President Street, Room C305
Charleston, SC 29425
singht at musc.edu<mailto:hertzfel at musc.edu>







-------------------------------------------------------------------------
This message was secured via TLS by MUSC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161225/e179386e/attachment-0001.html>


More information about the fieldtrip mailing list