I am developing a tool that automatically opens a segmentation mask and the image in 3D Slicer so that the user can modify it. I do it by using --python-code option when executing slicer from terminal.
I would love to have all format options properly pre-established for better user experience. However, I could not find in the documentation where I can change them in the “Export to files” menu of the Segmentations module.
I found the solution, or a workaround at least. You can control the destination folder used in the “Export to files” menu of the Segmentations module through application settings.
The path is stored using qt.QSettings, so you can predefine it programmatically before the export operation.
By setting this value in advance, the export dialog will default to your desired folder, improving the user experience when running your automated workflow.