DrHanLim / EzColocalization

GNU General Public License v3.0
10 stars 2 forks source link

Show Thresholds fail on the latest Fiji #8

Closed shenghuanjie closed 3 years ago

shenghuanjie commented 3 years ago

image It freezes on Win10 Fiji 2.1.1 @westonstauffer

shenghuanjie commented 3 years ago

The root cause of this is that we call ij.ImagePlus.updateAndDraw when we update threshold. https://github.com/DrHanLim/EzColocalization/blob/e2e21ba5bb77869b49cc2c96caf5e1ea1e3f42bd/src/main/java/ezcol/main/GUI.java#L2893 It notifies the ImageUpdated listener. https://github.com/imagej/imagej1/blob/574e2c11d89e9a6c28aab87a31313f40eb2c0235/ij/ImagePlus.java#L315 When this happens, we update the image selection combo boxes: https://github.com/DrHanLim/EzColocalization/blob/e2e21ba5bb77869b49cc2c96caf5e1ea1e3f42bd/src/main/java/ezcol/main/GUI.java#L1949-L1953 which will trigger the itemStateChanged listener of those combo boxes https://github.com/DrHanLim/EzColocalization/blob/e2e21ba5bb77869b49cc2c96caf5e1ea1e3f42bd/src/main/java/ezcol/main/GUI.java#L852-L855 which will then update threshold again falling into an infinite loop.