# Loading scene as slicer start

**URL:** <https://discourse.slicer.org/t/loading-scene-as-slicer-start/41488>\
**Category:** Development\
**Created:** [February 4, 2025, 12:13pm UTC](https://discourse.slicer.org/t/loading-scene-as-slicer-start/41488 "2025-02-04T12:13:08Z")\
**Posts on this page:** 3\
**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 4, 2025, 12:13pm UTC](https://discourse.slicer.org/t/loading-scene-as-slicer-start/41488/1 "2025-02-04T12:13:08Z")

</div>

how to load an image as soon as it starts. I just do it but when i use “–python-script” he just ignore the path to load

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/c/0c316796cdae57cb60bef53aad5fcfdb7aa8b665.png)

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [February 4, 2025, 12:58pm UTC](https://discourse.slicer.org/t/loading-scene-as-slicer-start/41488/2 "2025-02-04T12:58:48Z")

</div>

Hello @Djonathan_Souza, please have a look at the following related post and see if it helps. It is not clear to me what your problem is.

> [@Run a python script with command line arguments](https://discourse.slicer.org/t/run-a-python-script-with-command-line-arguments/36718):
>
> Hi, I am trying to run a python script that accepts command line arguments as follows. ./Slicer --python-script /home/user/extract\_centerlines\_vmtk.py --data\_dir /PATH/TO/DATA --end\_points --network --network\_curve --network\_prop --centerline --centerline\_curve --centerline\_prop and the python script looks as follows def extract\_centerlines(args): ... if \_\_name\_\_ == '\_\_main\_\_': parser = argparse.ArgumentParser(description="Extract centerlines from a dataset") parser.add\_argument('--…

---

<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 4, 2025, 1:12pm UTC](https://discourse.slicer.org/t/loading-scene-as-slicer-start/41488/3 "2025-02-04T13:12:11Z")

</div>

Hi @RafaelPalomar this is exactly what I’m looking for!
