How to get the vertical scroll bar in the designers view for slicer.
Regards,
Saima Safdar
How to get the vertical scroll bar in the designers view for slicer.
Regards,
Saima Safdar
Scroll bar is added automatically in the scripted module GUI widget area. You can also enable it for certain widgets (e.g., tables, lists). You may also add a QScrollArea to your GUI. These are all purely Qt features, so you can google for more details and examples.
Hi andras,
I need to add widgets like from segmenteditor I need to add scissors and maskvolume. Is it posssible to add it in your own scripted modules.
Regards,
Saima Safdar
Yes, you can add Segment Editor widget to your module GUI and configure which effects and parts of the widget you want to show. See the Segment Editor module source code for an example.
Hi Andras,
I followed what you said. I added the following in the scripted module
self.ui.sEditor.setMRMLScene(slicer.mrmlScene)
segmentEditorSingletonTag = "SegmentEditor"
segmentEditorNode = slicer.mrmlScene.GetSingletonNode(segmentEditorSingletonTag, "vtkMRMLSegmentEditorNode")
if segmentEditorNode is None:
segmentEditorNode = slicer.vtkMRMLSegmentEditorNode()
segmentEditorNode.SetSingletonTag(segmentEditorSingletonTag)
segmentEditorNode = slicer.mrmlScene.AddNode(segmentEditorNode)
self.parameterSetNode = segmentEditorNode
self.ui.sEditor.setMRMLSegmentEditorNode(self.parameterSetNode)
How can I only add the effects I need. Also how can I get the results of segment editor. Example how can I see the segmented volume in other volume inputs of other module
Regards.
Saima Safdar
You can use setEffectNameOrder and setUnorderedEffectsVisible methods of the segment editor widget.
You can use masterVolumeNode/setMasterVolumeNode and segmentationNode/setSegmentationNode methods of the segment editor widget.