I am quite new to slicer and still in exploring stage. I have developed a small application in which a track can be generated from the given markup
Then I changed the coordinates of the markup simply by
Preformatted textmarkups.SetNthFiducialPositionFromArray(markups.GetNumberOfFiducials() - 1, newCord)Preformatted text
Now I want to change the coodinates of the markup in a loop which can easily be done.
The problem is the 3D view is not updating at each iteration after updating the markup Node? is there any command to update the 3D view while the processing the loop.
Slicer is event driven, so rendering only happens when all events have been processed. So you can either call processEvents, like in ScreenCapture, or you can set up a timer to make your changes like in Rock mode for the viewer.
Thank you for your response, it kind of worked for me.
Is there any option in Slicer for dynamic update? My project needs some heavy computations which might need some time for the processing, is there any way that my module keeps on processing meanwhile user can interact in the rendering window?
I am trying to impelment my own CLI module within my python script. My aim is to run my computation on CLI in the background as you have suggested.
I need a guidance on it.
class CLItest(ScriptedLoadableModuleLogic):
def logic(self):
a = testVariables()
for i in range(0,100):
a.var1=a.var1+1
print (a.var1)
print("cliTesttttt")
def name(self):
pass
class testVariables(ScriptedLoadableModuleLogic):
var1 = 0
This program will just print 0 to 100 numbers. it worked fine.
Now I want to give my DWI node as an input to my cli module for further processing.
Can you guide me with it?