Generate FEM mesh from [white, gray, csf, skull, scalp] > Iso2mesh-2021 > MergeMesh > Max volume = 0.001, Percentage kept = 100
Compute tensors (with DTI)
Run DUNEuro (Volume, with option 'Force surce space inside layer "gray"' on
However for some subjects DUNEuro returns this error:
BST> Plugin duneuro already loaded: C:\Users\ALIEN_ANALYSIS_ONE\.brainstorm\plugins\duneuro
DUNEURO> Writing temporary files to: C:\Users\ALIEN_ANALYSIS_ONE\.brainstorm\tmp\duneuro_230517_203320
DUNEURO> System call: "C:\Users\ALIEN_ANALYSIS_ONE\.brainstorm\plugins\duneuro\bst_duneuro\bin\bst_duneuro_meeg_win64.exe" "C:\Users\ALIEN_ANALYSIS_ONE\.brainstorm\tmp\duneuro_230517_203320\duneuro_minifile.mini"
Dune reported error: GridError [insertElement:/home/juan/bst-duneuro/src/dune-grid/dune/grid/uggrid/uggridfactory.cc:145]: You have requested to enter a tetrahedron, but you have provided 5 vertices!
status =
-1
***************************************************************************
** Error: Error during the DUNEuro computation, see logs in the command window.
***************************************************************************
The error remains if I compute isotropic tensors or if I downsample the gray matter surface.
The grid looks fine to me (here an image)
I do not really undestand the error you have requested to enter a tetrahedron, but you have provided 5 vertices! , also because it happens only with some subjects.
This is within the DUneuro code.
From the image you shared, it seems that you are using the volume grid.
The option force within the Brain is not supported for volume (yet).
So it seems that you have some source outside of the brain volume.
One possible option is to review the grid location for some subjects.
A quick solution is to shrink the cortex surface slightly and regenerate the grid for these subjects.
The process is as follows:
copy and past the cortex (duplicate the surface cortex)
shrink slightly the duplicated cortex (right click, align on ... and then use the shrink option)
Set the duplicated cortex as the default cortex (right click and set as cortex=> green color)
Redo the computation of the head model. (forward computation)
From the image you shared, it seems that you are using the volume grid.
The option force within the Brain is not supported for volume (yet).
So when I check "Force in to layer gray" for a volume model nothing really happens or am I introducing an error? (I am asking becasue I have done it in previous subjects in which the model worked).
A quick solution is to shrink the cortex surface slightly and regenerate the grid for these subjects.
I tried with the steps you provided but it deos not work, I keep getting the same error. Is it possibile that the fact that I am using a "group grid" for group analysis somehow has an impact? I have tried to use a regular grid but the error remains.
Just wanted to add that the fact that I am recomputing the FEM model with ISO2MESH is because running DUNEuro on the original FEM (simNIBS) gives the error coordinate is outside of the grid, or grid is not convex as in this discussion DUNEuro head model computation fails
if you use the volume grid, this option will not affect the grid. It's only used with the surface grid.
do you mean that you have the same grid for all the subjects?
in that case, it will fail because the brains/Mesh are not the same, so the grid will work for some subjects and will not for others.
in some case, the Duneuro solver doesn't like the skull hole. So we come with the solution to re-mesh the volume and fill all the skull holes.
Hi @tmedani ! Sorry for the late reply. In the end the commong grid worked for most of subjects. I just had to exclude the few in which the grid created problems. Thank you for the support