I’m a beginner in 3D Slicer and I am learning how to develop modules to implement my own workflow.
Currently, I use the ‘Extension Wizard’ to create a simple module for extracting the surface of image data (Other features are still in development).
What I’d like to do next is to transfer my module from the desktop mode to the VR scene created by Slicer VR.
However, I’m still not sure about the feasibility of adding Qt components/widgets or GUI panels to the VR scene to achieve the same functions as my desktop module.
In other words, the following figure is the module (a python scripted module) I have created so far. How can I transfer it to the VR scene next?
W have made good progress with the widget, you can see it in this branch. Now we’re working on the interactions with this widget using a laser pointer (propagating move events, clicks, etc.). @dgmato is currently working on it, let us know if you’d like to contribute in some way.
And I also notice that there is indeed a folder called ‘Widgets’
Does it mean that there are already available VR menu widgets here?
How can I see these menu widgets (like the widgets you’ve implemented for the segment editor module) in the VR scene?
For example, as shown in the figure below, is this menu can be seen in the VR scene? How can I activate it in VR？ Thank you so much! https://github.com/cpinter/SlicerVirtualReality/pull/5
Just to make sure: Does it mean that if I follow it to build this VR module locally, then I can see/activate the menu widgets you’ve implemented so far? Or in this way, can I also make some adjustments/modifications to it? Am I correct?
Because when I install the Slicer VR and run it in 3D Slicer, there is no menu widgets in the VR scene.
And could you please describe the feasibility of adding some widgets such as buttons and sliders to the VR scene to realize the function of a custom module?
For example, adding a slider to the VR scene of Slicer VR to adjust the threshold of the volume rendering image? I think this is a good practice for me to learn how to contribute to Slicer VR.
Thank you so much!
Hello @cpinter ,
This discussion is very exciting!
I am new to 3D Slicer, and I also have a similar demand as @CharlesChen.
I’ve learned that Slicer supports VTK, and it seems that we can call any VTK classes and abilities in Slicer. Meanwhile, I also noticed that some useful VTK classes like ‘vtkOpenVRMenuWidget’ and ‘vtkQWidgetRepresentation’ can be used to create 3D widgets to display a menu in VR.
Therefore, I’d like to know is it possible to create and add a widget like a button to the VR scene by running python script in Slicer? How can I learn this and reach this goal? Where should I start?