Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An external Python program calls the slicer plug-in, or installs the plug-in in other software #269

Open
ningw-git opened this issue Aug 15, 2024 · 5 comments

Comments

@ningw-git
Copy link

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?

@tokjun
Copy link
Contributor

tokjun commented Aug 15, 2024

@ningw-git - It depends on which Slicer features you want to call. You could trigger some event-driven features in 3D Slicer by pushing a message through OpenIGTLink. For example, some image filters support "AutoRun," which starts the process when the input image node is updated. So if you simply push an image message from your external software, you could call the filter. However, since not every module supports "AutoRun," you might need to implement an event handler in 3D Slicer that calls specific features when Slicer receives messages from your external software.

@ningw-git
Copy link
Author

@@thank you very much for your answer. I am currently using Python to develop slicer, which is equivalent to developing a new software interface. I now want to call the slicer plug-ins: OpenIGTLink and OpenIGT. I see that the source code is written in C++. Is there any way I can use Python to call them? Or how can I install these two plug-ins in my software?
image

@ningw-git - It depends on which Slicer features you want to call. You could trigger some event-driven features in 3D Slicer by pushing a message through OpenIGTLink. For example, some image filters support "AutoRun," which starts the process when the input image node is updated. So if you simply push an image message from your external software, you could call the filter. However, since not every module supports "AutoRun," you might need to implement an event handler in 3D Slicer that calls specific features when Slicer receives messages from your external software.

@ningw-git
Copy link
Author

ningw-git commented Aug 15, 2024 via email

@ningw-git
Copy link
Author

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.

@ningw-git
Copy link
Author

ningw-git commented Sep 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants