-
Notifications
You must be signed in to change notification settings - Fork 301
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
Conversation
2740584
to
dee2cdb
Compare
11c4e29
to
95ff0f7
Compare
Hi! I tried to open with an old state and config and its returning the following error. It would be good to have back compatibility invesalius3\invesalius\data\visualization\coil_visualizer.py", line 149, in AddTargetCoil |
When I tried to open preference, its returning \invesalius3\invesalius\gui\preferences.py", line 1239, in LoadConfig |
I tested with master and its fine |
95374e8
to
9fb0631
Compare
62eb2aa
to
5ad9439
Compare
Stylus visualization is working with Aalto Polaris TODO: add a stylus calibration tab to GUI
…both Windows and Ubuntu 22
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.
…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.
…aris ROM init dialog. Update handling of marker_visibilities to support multiple coils.
…or Polaris to load ROM new files.
…w-coil button is right-clicked
…coil_name is specified and in navigation.coil_registrations before robot can be used
…. Add CoilSelectionDone function to simplify preferences code
…d the following: Messy multicoil instructions (there will be separate documentation for that) Unnecessary feature of changing the index (obj_id) of a registration
… Now it is correctly oriented with NIFTI heads. TODO: unify the orientation of MRI and NIFTI heads in vtk?
… 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
…hen loading state file. Update environment.yml. Minor refactors ie. naming changes.
Many thanks again for the PR! I will merge it. |
Refactors to core code:
obj_ref_mode is replaced by obj_id, which is simply the index of the object/coil in coord_raw
Removed CorregistrateCoordinateNoObject thread and made CorregistrateCoordinate able to track both coil and probe, depending on if 'Track coil' button is pressed.
Stylus visualization:
Please see my updated comment in: #808
Multicoil:
The coils used in navigation are generally stored in dictionaries and are accessed by name (coils are named by user on creation)
Coil registrations are created in preferences and automatically stored in config.json. Coils are selected for navigation here by clicking buttons with the coil name.
Backwards compatibility:
For tracking a single coil (ie. when n_coils = 1), everything should work as before.
The only exception is Polaris. Code related to Polaris was changed here for multicoil support. Therefore, Polaris will only work with an updated pypolaris wrapper that gives a list of coordinates for the coil.