How to setup slicer's web server?

Operating system: window 10
Slicer version: 5.2.1

HI , slicer users

I need to create a communication module that works on slicer. I have never done network coding before.

So I’m trying to do a toy project that turns on the slicer web server and sends and receives data, but there is no way to turn on the slicer server even if I refer to the documentation. What should I do?

I would recommend to have a look at slicerio Python package. It can start Slicer with the web server interface enabled and send commands from Python. You can use slicerio as is, or copy-paste useful code snippets from its source code into your project.

1 Like

Hi, @lassoan

image

I am using slicer in window environment, is it correct to install slicerio package in python console in slicer ?

Or do I need to set up and connect to a slicer-only virtual environment in Anaconda?
image

edit :

Is the slicerio library a function related to communication within 3d slicer in an external python module, not utilized in the slicer’s python console?

Is it correct to use the location where the Python executable file is installed in the form of server (location)?

If you run Python script in Slicer’s Python environment you don’t need slicerio. The slicerio Python package is useful if you want to use Slicer features (e.g., use Slicer as an viewer or editor for images or segmentations) in Python scripts running in any environment.

Set slicer_exexutable to the full path of Slicer.exe (you can get the folder from the menu: Help /Report a bug)

1 Like

@lassoan

Sorry for frequently asking questions.
Can I send and receive files from the slicer’s python console to a private(personal) server other than the 3d slicer’s server?

files : Result of working with slicer