KitwareMedical / SlicerVirtualReality

A Slicer extension that enables user to interact with a Slicer scene using virtual reality.
Apache License 2.0
111 stars 56 forks source link
3d-slicer 3d-slicer-extension cmake kitware openvr vtk

SlicerVirtualReality

Extension for 3D Slicer enabling interaction with the 3D scene through virtual reality (VR) or augmented reality (AR).

The extension works with all OpenVR-compatible and OpenXR-compatible virtual reality headsets, such as HTC Vive, all Windows Mixed Reality headsets (by Acer, Lenovo, HP, etc.) and with Meta Quest or Oculus Rift. The extension also supports the HoloLens 2 augmented reality headset.

SlicerVirtualReality Logo

See the YouTube video below or the Kitware blog post for some more background and application examples.

Demo: Pedicle screw insertion in virtual reality using Slicer

Features

Key features:

Continuous improvements are made to the feature set. Feedback and ideas for improvement can be submitted via the issue tracker.

Setup

The extension supports virtual reality (VR) through both OpenXR and OpenVR backends. Augmented reality (AR) support is available by selecting the OpenXR backend and enabling remoting.

Platform support: Currently, the extension only functions on Windows computers. Linux support is experimental and untested due to the lack of official OpenXR runtimes and limited SteamVR support on Linux. The extension is available on macOS but lacks backend support due to Apple's lack of OpenXR support for the Vision Pro.

OpenXR OpenVR
Windows :white_check_mark: :white_check_mark:
Linux :x: :x:
macOS :x: :x:

If you wish to use Virtual Reality extension on Linux or macOS and you have virtual or augmented reality capable hardware working well on your computer through either an OpenXR runtime or an OpenVR runtime (e.g Steam VR) then add a comment in the issue tracker (macOS / Linux).

Configuring graphics: On systems with both integrated display card and high-performance GPU (typically this is the case on laptops with NVidia GPUs), configure the graphics card application settings to use high-performance GPU for SlicerApp-real.exe (it is not necessary to use high-performance GPU for the launcher, Slicer.exe).

Generic tracker support: Currently, generic trackers are only supported using the OpenVR backend. See issue #171.

How to set up my HTC Vive headset

By default, the OpenXR backend is selected. To use the OpenVR backend:

Supported headsets: Pro 2, Pro, Vive

Supported XR modality: Virtual Reality

How to set up my Windows Mixed Reality headset

By default, the OpenXR backend is used. To use the OpenVR backend:

_See here for list of supported headsets._ Supported XR modality: Virtual Reality

How to set up my Hololens 2 headset

Supported XR modality: Augmented Reality

How to set up my Meta Quest headset

By default, the OpenXR backend is used. To use the OpenVR backend:

Supported headsets: Quest 3, Quest Pro, Quest 2, Quest

Supported XR modality: Virtual Reality

How to set up my Oculus Rift headset

By default, the OpenXR backend is used. To use the OpenVR backend:

Supported headsets: Rift S, Rift

Supported XR modality: Virtual Reality

How to use controllers

HTC Vive Controller

Fly

Move around in space. Equivalent to physically walking around.

Controls:

[!NOTE]

  • Flying direction is specified by the orientation of the controller.
  • Speed is proportional to distance of the fingertip from the touchpad center.
  • Maximum speed is configurable in Virtual Reality module.

Transform entire scene

Translate/rotate/scale the entire rendered scene.

Controls: while keeping grip button depressed on both controllers

[!NOTE]

  • Object positions in the scene are not modified.
  • Controllers must be outside of all selectable objects when grip buttons are pressed.

Transform objects

Translate/rotate a selected object.

Controls: press grip button when a controller is inside a selectable object

[!NOTE]

  • When you grab and move object, a parent transform is automatically created for it (if it has not been under a transform already) and that transform is modified.
  • To move a group of objects together, assign the same parent transform to them. You can do that in Data module's Transform hierarchy tab by drag-and-dropping objects under the same transform (or by double-clicking in the Applied Transform column in Data module's Transform hierarchy tab and selecting a transform; or by selecting a transform in Transforms module and applying it to all the nodes that must move together).
  • Either left or right controller can be used to grab an object. Each controller can be used to grab an object and move independently.
  • By default all objects are selectable. An object can be made non-selectable (thus non-movable) in Data module / Subject hierarchy tab, right-clicking on the node and unchecking "Toggle Selectable".
  • Moving of segmentation nodes is slow. If you want to move segmentations using controllers then export them to model nodes (in Data module, right-click on the segmentation node and choose Export visible segments to models) and transform the model nodes.

How to use hand interaction

See Action poses for hand interactions

Fly

Not yet available.

Transform entire scene

Not yet available.

Transform objects

Translate/rotate a selected object.

Controls: do the "grip" or "pinch" pose when the hand is inside a selectable object

Other features

Accessing VR transforms (controller, headset, generic trackers) in Slicer

Go to Virtual Reality module and check the desired checkbox to update linear transform nodes with the various devices' positions.

[!NOTE]

  • The magnification factor in advanced settings affects these transforms.

  • Generic trackers are only supported using the OpenVR backend.

Frequently asked questions

How to clip models

3D Slicer can clip models using slice planes. This feature can be used in virtual reality by moving the slice plane using a transform, with the help of Volume reslice driver module.

The models, transforms, etc. only need to be set up once, because the scene can then be saved to file and next time it can be readily used.

Simple clipping

Move clipping planes continuously, as the controllers are moved.

Clipping with handles

Grab and move clipping planes using controllers (clipping plane remains in place).

Rendering is slow

There are several settings that help in increasing the performance of virtual reality rendering:

Some scenes are too complex to render fluently by mid-range graphics cards. If the scene includes volume rendering of high-resolution CT for example, then it may be necessary to upgrade to a high-end GPU.

How to record virtual reality videos?

Enable screen mirroring in SteamVR and use the free of OBS Studio software to capture VR headset content, application window, webcam, etc.

Note that OBS Studio may crash if NVidia hardware-based compression is used. If this happens, choose CPU-based video compression option for recording.

How to ask questions, report problems, or suggest new features?

Visit Slicer forum and search for similar discussions. If you do not find related topics then createa a new one. Add virtual-reality tag to make sure people who monitor virtual reality related questions get a notification about your question.

If you are certain that you have found a software bug and no similar issue has been reported in the issue tracker) then please submit a new issue.

Please do not use "VR" acronym (you can spell out "virtual reality" instead), because "VR" may mean "volume rendering" just as well as "virtual reality" - you can even do volume rendering in virtual reality in Slicer - and so it becomes confusing very quickly.

For developers

Information for developers is available in the Developer Guide.

Contributors

Contributors include:

How to cite

Pinter, C., Lasso, A., Choueib, S., Asselin, M., Fillion-Robin, J. C., Vimort, J. B., Martin, K., Jolley, M. A. & Fichtinger, G. (2020). SlicerVR for Medical Intervention Training and Planning in Immersive Virtual Reality. IEEE Transactions on Medical Robotics and Bionics, vol. 2, no. 2, pp. 108-117, May 2020, doi: 10.1109/TMRB.2020.2983199

License

It is covered by the Apache License, Version 2.0:

http://www.apache.org/licenses/LICENSE-2.0