SlicerVirtualReality icon indicating copy to clipboard operation
SlicerVirtualReality copied to clipboard

Address issues related to integration with VTK 9.1

Open jcfr opened this issue 3 years ago • 4 comments

The following content was copied from https://github.com/KitwareMedical/SlicerVirtualReality/pull/90#issue-1151637803


(1) Retrieval of last position associated with generic tracker

Retrieval of last position associated with generic tracker in vtkVirtualRealityViewInteractor::GetTrackedDevicePose given the index is not possible.

:warning: TODO: Handle retrieval of tracker position associated with generic tracker associated with index.

Background:

Add support for generic tracker originally contributed in these commits:

  • kitware/VTK@6083532cf8 (ENH: Exposing the generic tracker openvr device type to downstream projects)
  • KitwareMedical/SlicerVirtualReality@59b7d1bf3 (Adding interface and logic to maintain MRML transforms for each generic VR tracker)

but removed following the refactoring done in these commits:

  • kitware/VTK@1aac3fe5f (Create VRInteractorStyle and VRRenderWindowInteractor)
  • kitware/VTK@af0fab486 (Clean up VR and OpenVR classes)
  • kitware/VTK@9bd64d666 (Cleanup and rework of the VRInteractorStyle and subclasses)
  • kitware/VTK@09a478a22 (Cleanup VR camera code and subclasses)

(2) RecognizeComplexGesture is not virtual anymore in base VTK class

:warning: TODO: Assess with this function should still be overriden with VTK 9.1

Background: The function became non virtual in Kitware/VTK@af0fab486 (Clean up VR and OpenVR classes)

API changes

vtkEventData API changes:

  • vtkEventDataButton3D -> vtkEventDataDevice3D

RenderWindow API changes

  • GetNumberOfTrackedDevicesForDevice -> GetNumberOfDeviceHandlesForDevice
  • GetTrackedDeviceIndexForDevice -> GetDeviceHandleForDevice
  • GetTrackedDeviceModel -> GetModelForDevice
  • GetTrackedDeviceIndexForDevice -> GetDeviceHandleForDevice

InteractorStyle API changes

  • PositionProp sinature updated to include "lwpos" and "lwori"

jcfr avatar Mar 22 '22 20:03 jcfr

I just got around to try the latest versions. The biggest issues I encounter are:

  • [x] Continuous error logging DelegateInteractionEventToDisplayableManagers: Unrecognized device in the console. I debugged into it a while ago and there was no apparent easy solution. More work is needed. Edit (@jcfr): Most likely fixed by https://github.com/KitwareMedical/SlicerVirtualReality/pull/99 contributed by @aWilson41 :heavy_check_mark:
  • [x] Volume rendering does not show up in VR, but models/segmentations do. I confirmed that on the same machine/configuration volume rendering shows up with Slicer 7da00248941292c429ba11204d3a5a7d78210a46, but not after the VTK update. I'm not sure how to approach this problem other than checking if the displayable manager is properly registered (which I'll do shortly). Edit (@jcfr): Most likely fixed by https://github.com/Slicer/Slicer/pull/6584 :heavy_check_mark:

cpinter avatar Apr 06 '22 14:04 cpinter

@lassoan had the idea to check if volume rendering shows up with CPU rendering. It does not.

cpinter avatar Apr 08 '22 15:04 cpinter

Sometimes you need to disable and re-enable depth peeling to make volume rendering show up. Does it help?

You can also try to disable volume rendering in all views except in the VR view, add breakpoints in the volume rendering mapper and see if it gets called.

lassoan avatar Apr 08 '22 22:04 lassoan

Sometimes you need to disable and re-enable depth peeling to make volume rendering show up. Does it help?

You can also try to disable volume rendering in all views except in the VR view

These two didn't work. I'll debug into the mapper once the build succeeds (but on the VR computer the debug build failed many times due to an external data timeout. I updated and started the build again. Update: it keeps failing, this time with this download, the interesting part is that from the browser I can download it but the build always fails on one or another)

cpinter avatar Apr 13 '22 09:04 cpinter