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

There is no direct linkage between the checkbox, the ROI node, and the volume rendering which would mean that a change in the checkbox or in the volume would lead to a change in which ROI is shown. Your module code needs to handle that process. Here is what I think you want to happen (correct me if I am wrong!):

Changing to a different input volume in the “Input volume” combobox should

  1. Make the ROI from the prior image volume invisible, regardless of the ROI checkbox state, and
  2. Make the ROI from the new image volume visible, only if the ROI checkbox state is checked.

Independently, toggling the ROI checkbox should make the ROI associated with the current input volume visible when checked and invisible when unchecked.

Is that correct?