-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRI image to mesh (based on fsaverage?) #27
Comments
Made a first prototype of converting MRI to a 3D mesh with appropriate format conversions of materials and boundary elements grounding plate definition. Untested yet. Some hacks still to be fixed, also MFEM complains about
Not sure what it's about, need to see how it will simulate... |
Fixed elements with wrong orientation by first resampling MRI segmentation to RAS instead of weird skewed/inverted thing First results of forward modeling! First try on lower resolution with 2mm voxels (around 2 million cubes), 1 mm is 16 million... Head in air with ground plate: Volume colors - materials GT: Simulated potential: Higher contrast: Seems to be working? |
Comparison of kCSD vs kESISolution parameters grid step: 5 mm 1 mm mesh used to simulate potential to electrodes, fsaverage brain mask (nodes to place sources at)ground truthforward solved potentialkCSD solutionkESI solution using 2mm mesh correctionsdifference between kCSD and kESIConclusionkESI and kCSD solutions are remarkably similar, differences are on the order of 0.001%!!!! Maybe worth trying computing a higher resolution solution? |
test of high and low resolution, with brain mask and withouthigh resolution brain masklow resolution brain maskGT CSD!!!Colors changed for easier readability when showing CSD solution and GT High resolution With brain masksolution grid step: 1mm lambda chosen by CV kESIkCSDkCSD-kESIZERO!!! WHAT??? High resolution without brain masksolution grid step: 1mm lambda chosen by CV kESIkCSDkCSD - kESIZERO!!! WHAT??? low resolution without brain masksolution grid step: 5mm lambda chosen by CV kESIkCSDkCSD - kESIVery low differences! low resolution with brain masksolution grid step: 5mm lambda chosen by CV kESIkCSDkCSD - kESIVery low differences! |
The differences between kESI and kCSD are minimal!Maybe something is wrong with corrections? How corrections are used? Maybe they need normalisation? |
Just in case looking at electrode corrections. Theoretical Potential (no FEM)Theoretical potential of a point current source at electrode position, with sigma=0.33, without FEM mesh influence FEM potentialPotential of a point current source at electrode position, calculated over 2mm mesh with realistic materials FEM correction for kESIFEM potential minus theoretical |
Use FSSurface with parcelation to create material segmentation of FSAverage scan to white matter, grey matter, CSF, skull, skin, air
FSaverage has brain segmentation, but it seems skin and skull surfaces are only available as .surf files. Faces were scrambled, there is also no cavities.
.surf files can be read by MNE and converted to .obj. Pyvista can read .obj and has filters to select points which are inside of the surface.
create scripts to convert such segmented MRI into a mesh made out of cubes with properly assigned materials, and try to simulate something?
Try to create a cube mesh using the 4 spheres sampled materials, and compare 4 spheres conforming mesh and the cube mesh solutions?
Additional information and tools to segment MRI scans into tissues:
https://link.springer.com/article/10.1007/s12021-020-09504-5#rightslink
https://github.com/gtaberna/mrtim/wiki
TODO:
Add far boundary mesh option
The text was updated successfully, but these errors were encountered: