Loading data in Slicer from terminal

Dear @tbillah

When you run your Slicer executable you can pass a python code to load the data during start time. something like the following

Slicer.exe --python-code "slicer.util.loadVolume('/full/path/to/img1.nii.gz')

or

Slicer.exe /full/path/to/img1.nii.gz

Also, you can do something similar from within the Slicer application using the python terminal

You might want to refer the Script repository for more information

https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html

HTH
Andinet

2 Likes