[FieldTrip] questions about ft_prepare_headmodel, error: the compartment nesting cannot be determined

gamaliel huerta urrea gamaliel.ghu at gmail.com
Wed May 14 08:24:32 CEST 2014


hi all

fieldtrip my experience is limited, and attempt a head model.

I analyze the documents for the user's site, and could reach the head model
is presented in the official website successfully. But when trying to do
the same from imr own size: 512x512x22, throws me the following errors when
trying to run the function ft_headmodel.

What could be the problem?

because with the Subject01.mri file, the code itself works fine, but with
the mri.mat (attached) file not working properly

the error is as follows

Warning: please specify cfg.method='projectmesh', 'iso2mesh' or
'isosurface'
> In ft_prepare_mesh at 116
  In ft_prepare_headmodel at 251
  In fm_0 at 41
Warning: using 'projectmesh' as default
> In ft_prepare_mesh at 117
  In ft_prepare_headmodel at 251
  In fm_0 at 41
making mesh for scalp tissue
making mesh for brain tissue
making mesh for skull tissue
converting seg
creating probabilistic representation for scalp
creating probabilistic representation for brain
creating probabilistic representation for skull
triangulating the outer boundary of compartment 1 (scalp) with 3000 vertices
triangulating the outer boundary of compartment 2 (brain) with 3000 vertices
triangulating the outer boundary of compartment 3 (skull) with 3000 vertices
the call to "ft_prepare_mesh" took 6 seconds
Error using surface_nesting (line 26)
the compartment nesting cannot be determined

Error in ft_headmodel_bemcp (line 66)
order = surface_nesting(vol.bnd, 'insidefirst');

Error in ft_prepare_headmodel (line 257)
      vol = ft_headmodel_bemcp(geometry, 'conductivity', cfg.conductivity);

Error in fm_0 (line 41)
vol        = ft_prepare_headmodel(cfg, segmentedmri);


the used code is:

%% load MRI data
 mri = ft_read_mri('IM-0001-0001.dcm');
 disp(mri)%muestra informacion de mri data


 cfg           = [];
 cfg.output    = {'brain','skull','scalp'};%escoge las superficies
 segmentedmri  = ft_volumesegment(cfg, mri);%Realiza la segmentacion
 save segmentedmri segmentedmri
 disp(segmentedmri)


%% Mesh

 cfg=[];
 cfg.tissue={'brain','skull','scalp'};
 cfg.numvertices = [3000 2000 1000];
 bnd=ft_prepare_mesh(cfg,segmentedmri);
 save bnd bnd
 disp(bnd(1))
%% Head Model

cfg        = [];
cfg.method ='bemcp';% el tipo de modelo se puede cambiar
vol        = ft_prepare_headmodel(cfg, segmentedmri);
save vol vol
disp(vol)

-- 
*Gamaliel Huerta*
*Ingeniería Civil Biomédica*
*Universidad de Valparaíso*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140514/c71a8a91/attachment-0002.html>


More information about the fieldtrip mailing list