I am trying to centralize some steps in a workflow and thus want to add a markups widget to the extension. I tried a qSlicerSimpleMarkupsWidget but it only seems to interact with point list markupsnodes rather than markupslinenodes. Is there a way to make it interact with Line nodes?
qMRMLNodeComboBox has a ‘node types’ parameter that allows me to only show Line nodes and gives the desired effect. However, there isn’t a display table with the RAS coordinates, visibility, locks, etc. The SimpleMarkupsWidget has those elements but doesn’t seem to acknowledge LineNodes.
My primary goal is to be able to view and edit the control points of a specific line node from the custom module. Any suggestions?
You can choose what node types you want to see in the qSlicerSimpleMarkupsWidget’s node selector by calling methods of the node selector. Something like this:
Ah I see, that makes sense. Thank you, I didn’t realize that the elements that make up the widget could be interfaced with directly. What is the best way to see the available children elements of a higher level widget like this? Like all of the options for “simpleWidget.whatever” to follow the conventions of you example? In Qt it always appeared as a single object.
Note that internal components of a widget are rarely exposed, as it can be misused. It is sometimes done when the risk is deemed to be low and it significantly simplifies the implementation, but it would be safer and nicer to just expose methods.