Closed tmedani closed 2 years ago
@tmedani, do you have to insert all interior nodes in the electrode tet mesh to the output mesh?
if not, you can use mergemesh
(as long as the electrode does not intersect with the brain surface) or mergesurf
to combine the electrode surface mesh (multi-compartment) with brain surface mesh. Then you can call surf2mesh with seed points to create a combined tetrahedral mesh.
alternatively, instead of using your tetrahedral electrode mesh, iso2mesh has a function called meshcylinders
- a function I wrote specifically for Lead-DBS where iso2mesh was used to create electrode/brain meshes.
if you have to insert the electrode interior nodes from your existing mesh to the output, you could use meshrefine
- you can refine a tet mesh created by brain surface only by inserting new nodes and surface triangles taken from the electrode mesh. the nodes/elements inside the electrode will be more than your original electrode mesh, but all nodes/triangles of the electrode should preserve in the output.
Lead-DBS supports many electrode shapes, you can find example meshing codes by searching s2m
and surfboolean
in the project, for example
https://github.com/netstim/leaddbs/blob/d2e0029317a9c0d88f5f821320470519ab486a31/templates/electrode_models/ea_genvol_sde_08.m https://github.com/netstim/leaddbs/blob/d2e0029317a9c0d88f5f821320470519ab486a31/vatmodel/ea_mesh_electrode.m
Hi @fangq
That's helpful, meshcylinders is great, thanks
I went through the leadDBS code and data and found interesting models and scripts.
Thanks for your precious help.
Best
Hi @fangq
I hope you are doing well,
We are pushing the modeling to include the shape of the electrode in the simulation (we will include it in Brainstorm soon).
My question is related to the possibility to merge a tetra mesh volume within a closed surface (in the brain volume).
We have the complete sEEG electrode model (lead with multiple contacts), as shown in this figure,
I was able to construct it thanks to iso2mesh, a great tool again.
We would like to integrate these electrodes together within the brain volume, a simple scenario is in this figure:
The model that I used in this figure is just with one tissue for the electrode, and surf2mesh works fine with the seed points, however, it's not easy when we use the model in the first figure, with multiple sEEG contacts,
So, is there any option within iso2mesh/tetgen that allows generating this model?
Any recommendations/or scripts are welcome.
Thanks again for your precious help.
Best, Takfarinas