-
Notifications
You must be signed in to change notification settings - Fork 27
Description
When creating and showing an ImageJ2 dataset in Fiji we create and maintain a synchronized ImagePlus
. After showing the image we trigger a DisplayUpdatedEvent
which is intercepted by the LegacyImageMap. This triggers a rebuild of the ImagePlus.
If for some reason the ImagePlus
and its displaying StackWindow
do not agree in dimensionality, the StackWindow is rebuilt. This closes the current StackWindow
and thus the corresponding ImageJ2 display is closed. However, although a StackWindow
is created, the corresponding ImageJ2 display is not similarly rebuilt. So when the dimensionality of the display is later queried, the combinedInterval
is empty and we get an appropriate exception:
Certainly this issue seems to arise due to bugs elsewhere, e.g. in the translation of the dataset to mismatched ImagePlus
and StackWindow
. However it also illustrates a chain of events for which ImageJ is designed to handle but breaks ImageJ2 synchronization.
I think the imagej-legacy
fix is to insert a line after the StackWindow is rebuilt to refresh the corresponding ImageJ2 display with the new window.