-
Notifications
You must be signed in to change notification settings - Fork 185
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
Comments
@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. |
@@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?
|
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?
…------------------ 原始邮件 ------------------
发件人: "openigtlink/OpenIGTLink" ***@***.***>;
发送时间: 2024年8月15日(星期四) 晚上10:10
***@***.***>;
***@***.******@***.***>;
主题: Re: [openigtlink/OpenIGTLink] An external Python program calls the slicer plug-in, or installs the plug-in in other software (Issue #269)
@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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
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. |
Thank you very much for your reply, I have solved this problem. Now I have encountered a new difficulty: I wrote a plug-in myself and put the .py file and .ui file in a folder, but I don't know how to import this plug-in module into slicer. Is there any way to implement it in the code or command line? I urgently need your help, thank you.
…------------------ 原始邮件 ------------------
发件人: "openigtlink/OpenIGTLink" ***@***.***>;
发送时间: 2024年9月8日(星期天) 凌晨2:57
***@***.***>;
***@***.******@***.***>;
主题: Re: [openigtlink/OpenIGTLink] An external Python program calls the slicer plug-in, or installs the plug-in in other software (Issue #269)
Hi @ningw-git ,
OpenIgtlink is now part of SlicerOpenIgtlink, once SlicerOpengitlink is installed, OpenIGTLink library is also included.
You can use these commands to send OpenIGTLink messages
`>>> a = slicer.vtkMRMLIGTLQueryNode()
a.SetQueryType(a.TYPE_GET)
a.SetIGTLName("IMAGE")
b = slicer.mrmlScene.GetNodeByID("vtkMRMLIGTLConnectorNode1") #replace the ID with the correct connector node ID
b.PushQuery(a)`
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
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?
The text was updated successfully, but these errors were encountered: