Skip to content
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

Automatic EEG localization and labelling using Revopoint 3D #716

Merged

Conversation

chinmaychinara91
Copy link
Collaborator

@chinmaychinara91 chinmaychinara91 commented Jun 28, 2024

Tutorial: https://neuroimage.usc.edu/brainstorm/Tutorials/TutDigitize3dScanner#Digitize_using_Revopoint_Digitize_GUI_in_Brainstorm

Test Data: Can be downloaded from here.

Goal is to allow automatic localization and labelling of EEG caps using 3D scanned mesh of a person wearing the cap (captured using Revopoint 3D). This represents a new low-cost, fast, easy-to-use approach for digitizing heads and electrodes as compared to the traditional digitizer.

NOTE: Currently tested well with two configurations of EEG caps: d40c719 c49ebc6

Proposed GUI within Brainstorm
LEGACY MODE
Screenshot 2024-09-27 113338

2024 MODE
Screenshot 2024-09-27 113125

  • Load OBJ file into brainstorm (mesh with vertices, faces and color)
  • Add color field to brainstorm surface structure
  • Color should be updated when mesh downsampled in BST as well
  • Refactor the Digitize menu to add Revopoint
  • Refactor the Digitizer GUI for Revopoint tasks
  • Menu to load default available caps in BST as Montages in Revopoint GUI
  • Handle surface color update for Views menu option on 3D figure (Clone figure, etc.)
  • Test nothing breaks for the already available Digitizer functionalities:
    • Simulation mode
    • With Polhemus connected
  • 19th Aug 2024: Make it work on both the "legacy" and 2024 Digitize panel (New Digitize panel #682)

@tmedani @ajoshiusc @yashvakilna

…llar/toolbox)

required for warping and interpolating points on EEG cap
- it is always going to be a meshed OBJ so 'FileType' parameter is unnecessary
- renamed 'tri' as 'faces'
- renamed 'pos' as 'vertices'
- ANT 65 is a modeifed version of ANT Waveguard 64
- Acticap 66 is a modified version of Acticap 65
to be used for registration to MRI
Needs work on a more generic approach to handle different EEG caps
- Limit display of 'Auto' and 'Random' buttons for Revopoint only
- Correct display order of EEG labels based on the initialization labels required as per the EEG cap
- Removed unwanted code for sketch points (was used for debugging)
- Creating montages from EEG cap layout mat files (only for Revopoint)
@chinmaychinara91 chinmaychinara91 marked this pull request as ready for review July 22, 2024 22:27
@chinmaychinara91 chinmaychinara91 marked this pull request as draft November 5, 2024 01:18
@chinmaychinara91 chinmaychinara91 marked this pull request as ready for review November 5, 2024 07:23
@rcassani
Copy link
Member

rcassani commented Nov 5, 2024

@chinmaychinara91, @tmedani
It seems this PR is ready.

Please add a warning in the tutorials and in the GUI (e.g. when clicking on the Auto button) that the Auto feature is experimental, and results must be carefully verified.

@chinmaychinara91
Copy link
Collaborator Author

Please add a warning in the tutorials and in the GUI (e.g. when clicking on the Auto button) that the Auto feature is experimental, and results must be carefully verified.

Agreed will do

@chinmaychinara91
Copy link
Collaborator Author

Did the tests. All look good now. It can be merged.

@chinmaychinara91
Copy link
Collaborator Author

Tutorials updated. Found some more bugs while doing some tests and fixed them in 53f04ca and bcacbca. It is good to go now.

toolbox/sensors/panel_digitize.m Outdated Show resolved Hide resolved
toolbox/sensors/panel_digitize_2024.m Show resolved Hide resolved
@rcassani rcassani merged commit 6c646d2 into brainstorm-tools:master Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants