Show DICOM browser's folder import dialog

How Can i directly Call(or popup) DICOM Browser -> Import

In recent Slicer Preview releases, you can do this to show folder selector for DICOM import:

slicer.util.selectModule('DICOM')
slicer.modules.DICOMInstance.browserWidget.dicomBrowser.openImportDialog()

Thank you very much. Have a Nice Day :slight_smile:

But i want to call in my qSlicerMainWindow.cxx file.

in other words.

i want to call python script in my c++ code

You can run Python code from C++ using pythonManager->executeString.

If you want to import DICOM files from a folder then you can create ctkDICOMIndexer independent from the one in the DICOM browser as shown in this example.

Thank you. i will do it ^^

I am making the source code but it is very hard to me to call python code in my c++ in slicer
for showing DICOM browser’s folder import dialog

pythonManager->executeString .

slicer.util.selectModule(‘DICOM’)
slicer.modules.DICOMInstance.browserWidget.dicomBrowser.openImportDialog()

i found similar code but not work for me
Show DICOM browser’s folder import dialog