How to use command line run slicer's models

When I use Mac command line to run this:

/Applications/ --launch ResampleScalarVolume -i linear -s 1,1,1

It always switches to the ‘Welcome’ model automatedly.
Does anyone know how to use the command line, comes into ‘ResampleScalarVolume’ model?

The --launch option is used to run another program in Slicer’s environment (e.g. paths and settings).

You want to use the --python-code option like this to set the module:

./Slicer-4.13.0-2021-06-28-linux-amd64/Slicer --python-code “slicer.util.selectModule(‘SegmentEditor’)”

1 Like

Thank you for your help~