BreadcrumbsSlicer/Modules/Loadable/Reformat
/qSlicerReformatModuleWidget.cxx
Is it possible to call resetSlider method?
reformatLogic = slicer.modules.reformat.logic()
reformatLogic.RotateSlice(sliceNode, 0, rotateX)
reformatLogic.RotateSlice(sliceNode, 1, rotateZ)
reformatLogic.RotateSlice(sliceNode, 2, rotateY)
Cause when I change the above rotation, the result will be wrong if not calling resetSlider.
Thanks!
@derekcbr, what is the effect that you consider wrong? Is it that the GUI is not updated accordingly?
Is it possible to use python to update sliders in GUI? qSlicerReformatModuleWidget
@derekcbr, I’m understanding that your question is due to a mismatch between the reslice rotations you try to implement in python and the UI of the reformat module
. Based on that:
-
The
reformat module
is a loadable module where UI, data model and logic are tightly integrated. Modifications on the data model (e.g., MRML nodes) should be correctly reflected in the UI and vice-versa; logic typically modifies the data model, which in turn, should correctly update the values in the UI. -
You should not need to adjust the UI to reflect changes you produce by changing MRML nodes or invoking public logic functions. This could be a bug int he
reformat module
. Do you have data + python snippet to reproduce the issue. Maybe it is something that should be reported and fixed