[FieldTrip] error in FEM model
Johannes Vorwerk
j.vorw01 at gmail.com
Thu Apr 4 12:49:17 CEST 2019
Hi,
this error occurs if the transformation from voxel to patient space that comes with your segmentation flips the mesh along one dimension.
One thing you could do is to make sure that your image is properly oriented, I assume ft_volumereslice could do that. If you just want your mesh in voxel-space, you could also remove the transformation from your segmentation/replace it by an identity matrix.
Best,
Johannes
> Am 04.04.2019 um 12:37 schrieb Yuranny Cabral-Calderin <cabral-calderin at med.uni-frankfurt.de>:
>
> Hello everybody,
>
> I am using Fieldtrip to generate FEM head models. I segment my MRI data outside of MATLAB (using the Simnibs pipeline + manual corrections in SEG3D). I import my segmentation in MATLAB and use ft_prepare_mesh to generate the hexahedral mesh. This seems to work fine. However, when I pass the resulting mesh to the ft_prepare_headmodel function, I get the following error:
>
>
> Error using sb_calc_stiff (line 80)
> Elements have wrong orientation or are degenerated
>
> Error in ft_headmodel_simbio (line 90)
> headmodel.stiff = sb_calc_stiff(headmodel);
>
> Error in ft_prepare_headmodel (line 426)
> headmodel = ft_headmodel_simbio(geometry, 'conductivity', cfg.conductivity);
>
>
>
> Below is the code I am using to generate the mesh and the FEM model:
>
> cfg = [];
> cfg.shift = 0.3;
> cfg.tissue = {'gray','white','csf','skull','scalp'};
> cfg.method = 'hexahedral';
> mesh = ft_prepare_mesh(cfg,segmentedmri);
>
>
> cfg = [];
> cfg.method ='simbio';
> cfg.conductivity = [0.33 0.14 1.79 0.01 0.43];
> FEMModel = ft_prepare_headmodel(cfg, mesh);
>
>
>
> Has anyone experienced the same problem and know how to fix it?
>
> Thanks a lot,
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190404/4ff63d66/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list