How to update the state of checkbox when switching input volume node

On my machine the ROI visibility follows the checkbox with that code. Can you check to see if an error was generated on yours? There is an indicator in the lower right of the window which turns into a red X if there has been an error, and if you click on it you can see the log.
image

Note that I changed the name of the .py file to TestDebug2.py and made the corresponding changes to all the python class names (e.g. ScriptedLoadableModuleTemplateLogic became TestDebug2Logic). So, you would need to add the path to TestDebug2.py in your “Additional Module Paths” in the application settings (or, maybe simpler, change the class names back to what you had earlier; they have to match the file name or the module will not load).

OK, so you want the ROI checkbox to just reflect the visibility state of the ROI associated with the chosen node? So, if a user changes the input volume, the ROI checkbox should show whether or not the ROI for the new volume is already visible. And then when the user toggles the checkbox, that should also toggle the ROI visibility for the current input volume?