# Load image at Start

**URL:** <https://discourse.slicer.org/t/load-image-at-start/41526>\
**Category:** Development\
**Tags:** dicom, python\
**Created:** [February 6, 2025, 1:54pm UTC](https://discourse.slicer.org/t/load-image-at-start/41526 "2025-02-06T13:54:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djonathan\_Souza](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/djonathan_souza/32/79307_2.png) [@Djonathan\_Souza](https://discourse.slicer.org/u/Djonathan_Souza)\
**Post date:** [February 6, 2025, 1:54pm UTC](https://discourse.slicer.org/t/load-image-at-start/41526/1 "2025-02-06T13:54:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 6, 2025, 6:34pm UTC](https://discourse.slicer.org/t/load-image-at-start/41526/2 "2025-02-06T18:34:15Z")

</div>

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.
