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

Neuronavigation: Track multiple coils simultaneously and show stylus/probe #827

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Commits on Sep 18, 2024

  1. Aligned stylus.stl with VTK axes

    Stylus visualization is working with Aalto Polaris
    TODO: add a stylus calibration tab to GUI
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    ad22e58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b2577b View commit details
    Browse the repository at this point in the history
  3. StylusPage records coord_raw for Navigation

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    846b11c View commit details
    Browse the repository at this point in the history
  4. Clean up corregistrate_probe

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    5635554 View commit details
    Browse the repository at this point in the history
  5. using _ to discard the returned variable resulted in a wxPython error…

    …! Use __ instead
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    a5aedd3 View commit details
    Browse the repository at this point in the history
  6. add illustration of how to align the stylus with head

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f53ac96 View commit details
    Browse the repository at this point in the history
  7. Reduce vertical gaps between GUI components. This has been tested on …

    …both Windows and Ubuntu 22
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f8e4c98 View commit details
    Browse the repository at this point in the history
  8. save stylus orientation (r_change) to config.json

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    491f6ef View commit details
    Browse the repository at this point in the history
  9. Handle the case where manual stylus calibration is skipped. Print out…

    … a warning in this case, but allow navigation to work as normal
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    702e923 View commit details
    Browse the repository at this point in the history
  10. Rename r_change to r_stylus (this is the rotation matrix to orient th…

    …e stylus in vtk)
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    eb6d6d1 View commit details
    Browse the repository at this point in the history
  11. Cleaning up, RUFF formatting

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    314f051 View commit details
    Browse the repository at this point in the history
  12. Completely replace corregistrate_dynamic by corregistrate_probe. Thes…

    …e functions were identical, except for r_img in corregistrate_probe... This rotation does not change ICP behavior since ICP only affects the translation
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d29cd19 View commit details
    Browse the repository at this point in the history
  13. Refactor 'Track coil' button behavior: this determines (on the fly) w…

    …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 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    33f0fba View commit details
    Browse the repository at this point in the history
  14. Simplify how r_stylus is saved to file: move r_stylus to 'navigation'…

    … object and remove bogus 'navigation-stylus' object
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1e7827a View commit details
    Browse the repository at this point in the history
  15. Remove behavior where probe is automatically shown/hidden when naviga…

    …tion is started/stopped. Automatically show coil/probe when Track coil is pressed/unpressed
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    68c017b View commit details
    Browse the repository at this point in the history
  16. Now works with tracker coordinate system where stylus points in x-axi…

    …s as opposed to y-axis. Also, removed unnecessary disabling of 'Track coil' button before navigation.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    23bccb8 View commit details
    Browse the repository at this point in the history
  17. Start work on multicoil. Add n_coils variable to tracker connection i…

    …nit dialogs. Polaris init dialog now asks for n_coils Coil ROM files.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    4a6bd3b View commit details
    Browse the repository at this point in the history
  18. Larger refactor.

    Rename/repurpose obj_ref_mode to obj_id (this is the index of an object in coord_raw).
    
    Use dicts throughout code so that coils can be controlled by name. Simplify CoilVisualizer and coregistration.
    
    Add coil selection buttons to Preferences ObjectTab.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    7ae1826 View commit details
    Browse the repository at this point in the history
  19. Cleaning up.

    Improve ObjectTab init by using LoadConfig. Remove self.track_obj state var from GUI, it is a property of Navigation class.
    
    Addition: load/save coil from/to OBR file.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1e5effa View commit details
    Browse the repository at this point in the history
  20. Added a warning before overwriting old coil registrations, other mino…

    …r fixes
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    63cfdfb View commit details
    Browse the repository at this point in the history
  21. Remove icp_queue (which was only used in CoordinateCorregistrate thre…

    …ad) since the ICP data is constant once created. The ICP data is passed to coregistration when the navigation is started, so it is up to date with the ICP data defined in Refine tab.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    8c639b8 View commit details
    Browse the repository at this point in the history
  22. Maximize viewer volume when target mode is set. Remove obsolete funct…

    …ions
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    8b649a5 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    33351f3 View commit details
    Browse the repository at this point in the history
  24. Update PolarisCoord to receive multiple coil coordinates. Improve Pol…

    …aris ROM init dialog. Update handling of marker_visibilities to support multiple coils.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    25d0e95 View commit details
    Browse the repository at this point in the history
  25. Rotate stylus NT-115.rom to point in x-axis. Restore NBSref.rom to ol…

    …d form.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f07dff9 View commit details
    Browse the repository at this point in the history
  26. Reset tracker connection when n_coils is changed. This is necessary f…

    …or Polaris to load ROM new files.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    2e404d3 View commit details
    Browse the repository at this point in the history
  27. Clean comments and RUFF format

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    ccb8886 View commit details
    Browse the repository at this point in the history
  28. Add popup-menu to show/hide specific coil. Menu is shown when the Sho…

    …w-coil button is right-clicked
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    79f17cb View commit details
    Browse the repository at this point in the history
  29. Specify which coil is connected to the robot. Add a check that robot.…

    …coil_name is specified and in navigation.coil_registrations before robot can be used
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    c413548 View commit details
    Browse the repository at this point in the history
  30. Change GUI to its old form for single coil mode

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    a1ed3c0 View commit details
    Browse the repository at this point in the history
  31. Save/load robot coil name (the coil attached to robot) to config file…

    …. Add CoilSelectionDone function to simplify preferences code
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    3918f9a View commit details
    Browse the repository at this point in the history
  32. Improve preferences wording and layout. Simplified LoadConfig. Remove…

    …d the following:
    
      Messy multicoil instructions (there will be separate documentation for that)
      Unnecessary feature of changing the index (obj_id) of a registration
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1ae0d66 View commit details
    Browse the repository at this point in the history
  33. Add getter for robot coil name. Remove unused neuronavigation_api var…

    …iables.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    ec9dba3 View commit details
    Browse the repository at this point in the history
  34. Show/hide robot coil combobox when robot is connected/disconnected. R…

    …UFF format
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    a7ec573 View commit details
    Browse the repository at this point in the history
  35. Minor fix

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    2d1b5a3 View commit details
    Browse the repository at this point in the history
  36. Minor change to improve code readability

    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    5f8a1f3 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    e1b2d2f View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    2f42342 View commit details
    Browse the repository at this point in the history
  39. Before this commit, the stylus was correctly oriented with MRI heads.…

    … Now it is correctly oriented with NIFTI heads. TODO: unify the orientation of MRI and NIFTI heads in vtk?
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    39b5946 View commit details
    Browse the repository at this point in the history
  40. Add check to prevent delayed rendering of coil/probe when navigating.…

    … Remove obj_id=0 choice in multicoil mode. Automatically select a coil for navigation when it's created. Other fixes related to edge cases in coil creation/selection in multicoil mode
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    a8ea28b View commit details
    Browse the repository at this point in the history
  41. Show coil center/target even when coil is hidden. Handle exceptions w…

    …hen loading state file. Update environment.yml. Minor refactors ie. naming changes.
    Tolonen Luka committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    8fe04de View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    7524ff2 View commit details
    Browse the repository at this point in the history