Selecting input nodes in Slicer RT's Segment Comparison

Hi,

I am trying to use a python script to run the Slicer RT Segment Comparison module. I am able to load the module and create buttons to compute the Hausdorff Distance and DICE metrics. I am struggling to set the structure set and segment for the reference and compare inputs. What is the general form of using python to select these inputs?
Thanks!

The recommended way is via MRML. The module has a parameter node that you can set up in Python

It defines all the selections and options. Then you can use this parameter node with the logic functions to do the computation.