Implementing Widgets for Selecting Nodes of Type Segment and Beam

Hello Dear Developers and Users,

My question is probably very basic, so I would appreciate your guidance Or guide me on which tutorial I should refer to in order to implement functions for widgets that select nodes of different types, such as Beam, Segment, Volume, or Model.

I want to develop a module containing a widget for selecting one of the Beam nodes under the RTPlan node and a widget for selecting one of the Segment nodes under the Segmentation node. To do this, I created an Extension called moduleRTPlan in the Extension Wizard. Then, I added a module named BeamTry01 to moduleRTPlan. Next, I switched to the BeamTry01 module in the Example Category. At this stage, I clicked on Edit UI to enter the Qt Designer environment and removed all the default widgets that were created. Now, I have two questions:

  1. From the Slicer [MRML Widget] list, which widget is appropriate for a Beam node?

  2. I understand that to create a widget for selecting one of the Segments under the Segmentation node, I should use a widget named qMRMLSegmentSelectorWidget.

In the following figure, you can see that I used qMRMLSegmentSelectorWidget to select a Segment from the Segmentation node. To select a Beam from the available list for the RTPlan node, I used the ctkCollapsibleButton widget. However, unfortunately, the Segment selection widget is completely inactive, and the Beam selection widget does not show any Beams.

Please guide me.

Best regards.
Shahrokh