Load image at Start

Hello!

I need to start Slicer and load an image.
If I delete everything after “study_path,” the application loads the image, but I need these commands.

“subprocess.call([”/opt/slicer/Slicer", “–no-splash”, “–fullscreen”, study_path, “–disable-python”, “–python-script”, “start.py”])"

In my script, I have this:
“slicer.util.loadVolume(‘path/.dicom’)”
“slicer.app.settings().setValue(‘Python/DockableWindow’, False)”

However, if I enter the application and run the command to execute only my script with the commands,

“slicer.util.loadVolume(‘path/.dicom’)”
“slicer.app.settings().setValue(‘Python/DockableWindow’, False)”

it works normally.

You probably need to wait until the application is fully initialized. Look in the source code for places where the startupCompleted() signal is used and you should be able to work from there.