Open dzenanz opened 1 week ago
How do you run this filter? Manually, using Simple Filters module GUI? Is it possible that the image is not ready yet (e.g., the result of a CLI module processing which has not completed yet)? Do you experience issues with any other filters?
I am suspicious of the value of *inputimages
. Perhaps an input is not being selected properly or not "sent" to the module properly when the modules GUI is initialized or something similar.
I think that the error occurs if I open Simple Filters before I load an image. If I load the image first, then it is OK. I am not entirely sure of this diagnosis. Attached are the sample image, and screen recording with success and error. testAbs.zip
Thank you @dzenanz this was very helpful. The problem is due to that an incorrect signal is used for detecting node changes.
nodeActivated
is only called when the selection in the node combobox modified due to user action. However, when a volume is loaded and an input node is required (there is no "None" option) then that node gets selected automatically (without user interaction, without emitting nodeActivated
signal).
The fix is simple: replace nodeActivated
by currentNodeChanged
everywhere in the file.
@dzenanz it would be great if you could test it and if it works for you then submit a pull request with the change.
Trying to apply this filter on an image sometimes results in an error. Input pixel type is short. Log for latest nightly:
The problem mostly occurs on the first try. It also affects Slicer 5.2.1.