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

CLI Node Improvements #55

Open
2 tasks
NicerNewerCar opened this issue Sep 25, 2023 · 0 comments
Open
2 tasks

CLI Node Improvements #55

NicerNewerCar opened this issue Sep 25, 2023 · 0 comments
Milestone

Comments

@NicerNewerCar
Copy link
Contributor

NicerNewerCar commented Sep 25, 2023

We have to wait for the CLI nodes to finish running before moving on.

Currently, we are using a "busy wait" loop, but this could be improved:

# Wait for all the CLI nodes to finish
for i, cliNode in enumerate(cliNodes):
while cliNodes[i].GetStatusString() != "Completed":
slicer.app.processEvents()
if cliNode.GetStatus() & cliNode.ErrorsMask:
# error
errorText = cliNode.GetErrorText()
slicer.mrmlScene.RemoveNode(cliNode)
raise ValueError("CLI execution failed: " + errorText)
slicer.mrmlScene.RemoveNode(cliNode)

Items to investigate:

@jcfr jcfr added this to the Backlog milestone May 13, 2024
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