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

Add stylus/probe visualization #808

Closed
wants to merge 18 commits into from
Closed

Conversation

lukatolo
Copy link

@lukatolo lukatolo commented Jul 18, 2024

To correctly orient the stylus in VTK relative to the head, a manual calibration must be done.
(This is because the head-reference-marker-tool can be placed on the physical head at an arbitrary orientation. Even though the stylus is already calibrated with the camera, it is not calibrated with the physical head, hence the manual step.)

The calibration is defined by 3x3 rotation matrix r_stylus, which rotates the stylus to the correct orientation relative to head. The manual step can be skipped if precise stylus orientation is not important. If the plane of the head-marker-tool is aligned with the physical head's face, the stylus may even look right without calibration.

Additions to code:

  • Class ProbeVisualizer to show stylus in VTK (simplified copy of CoilVisualizer)
  • StylusPage in gui/task_navigator + SetStylusOrientation in navigation.py to do the manual calibration
  • Stylus coordinates are coregistered to VTK with def corregistrate_probe. This replaces corregistrate_dynamic
  • The stylus can be hidden during navigation with a button in ControlPanel.

Refactors to code (last commit):

  • Removed CorregistrateCoordinateNoObject thread and made CorregistrateCoordinate able to track both coil and probe, depending on which is visible and if 'Track coil' button is pressed.

Note on aligning passive tracker tools (eg. with Polaris ROM files)
Stylus:

  • Stylus tip should be aligned in x-axis (pointing in + direction)
  • Normal of the passive markers should be in positive z-direction

@lukatolo lukatolo force-pushed the stylus branch 2 times, most recently from fe3cee8 to 65d8bbd Compare July 21, 2024 13:02
…hether to follow the coil or probe with marker. Join the two Corregistrate threads into one. Edit CoilVisualizer and GUI to work with this change.

Please excuse some stray comments and var-definitions (eg. n_coils)... I will clean these up in future multicoil PR.
Tolonen Luka added 2 commits July 22, 2024 19:09
… object and remove bogus 'navigation-stylus' object
…tion is started/stopped. Automatically show coil/probe when Track coil is pressed/unpressed
…s as opposed to y-axis. Also, removed unnecessary disabling of 'Track coil' button before navigation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement neuronavigation Issues related to neuronavigation software
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants