Call Slicer plug-in from external python program

I am trying to do secondary development based on 3D slicer, using Python language, and now I have encountered a problem, and I am here to ask for your help. I want to use the plug-in OpenIGTLink that calls slcier externally, can I achieve this function? Or can I install this plug-in into my secondary development software? Can you give me some suggestions or ideas?

You can use pyigtl Python package to send/receive data to/from 3D Slicer in any Python environment via OpenIGTL protocol.

Thank you very much for your answer, but I want to call this plugin now, is there any way? Use Python language, or can this plugin be installed on the software I developed?

If your program is in Python then you can use pyigtl, if in C/C++ then you can use GitHub - openigtlink/OpenIGTLink: Free, open-source network communication library for image-guided therapy

I am trying to do secondary development based on slicer, and I have made a new software using Python. Now I have a problem: how to install the slicer plug-in: OpenIGTLink in my software? Or how to use Python code in the compiler pycharm to call this plug-in? Please help me, as a beginner, I really need help.

You can only use Slicer extensions in the Slicer application. You can use OpenIGTLink library or pyigtl in your software to communicate with Slicer.

Thank you very much. According to your guidance, I have connected to the data sent by plus server in my python code, using pyigtl, and got: message = client.wait_for_message(“ToolToReference”, timeout=5). How can I use this probe model to connect to my NDI? Later, I also want to use the registration plug-in: Fiducial Registration Wizard. How can I implement this function in my python code? Please help me, I really want to learn. Thank you again.

If you want to call Slicer functions you can use the /slicer endpoint in the REST API of Slicer. You can simply plain Python requests to run Python commands the same way as you would run them in the Python console of Slicer.

For your convenience, you canuse slicerio package to start the Slicer application (slicerio.server.start_server).