Still learning: how to access behaviour of another module in my module

Hello, I’m still learning how to write my own modules. I would like to replicate the behaviour of the “Show DICOM Browser” button from the DICOM module in a button placed in my own module. I tried using the “Record Macro” feature to get a hint, but I didn’t find it useful. How should I proceed?
Thanks.

This python code will open the browser:

slicer.modules.dicom.widgetRepresentation()
slicer.modules.DICOMWidget.enter()

You need the first line as well, because it makes sure the objects are instantiated.

1 Like

Fantastic, thank you.