imglib / imglib2-ij

Translation between ImgLib & ImageJ data structures (both 1.x and 2)
Other
4 stars 8 forks source link

ImageJ 1.54h breaks CellImgToVirtualStackTest #39

Closed ctrueden closed 6 months ago

ctrueden commented 6 months ago
$ mvn clean test -Dij.version=1.54h
...
[ERROR] net.imglib2.img.display.imagej.CellImgToVirtualStackTest.testPersistence -- Time elapsed: 0.007 s <<< FAILURE!
java.lang.AssertionError: expected:<42.0> but was:<0.0>
    ...
    at net.imglib2.img.display.imagej.CellImgToVirtualStackTest.testPersistence(CellImgToVirtualStackTest.java:162)
    ...

Whereas -Dij.version=1.54g works.

ctrueden commented 6 months ago

The offending commit is imagej/ImageJ@6f5f96fd287736f4518a34b2593d8166e7a75d3f, specifically these new lines:

if (newStack.isVirtual()) // work around bug with virtual stacks that cache pixel data
            ip = ip.duplicate();
rasband commented 6 months ago

This regression is fixed in the ImageJ 1.54i25 daily build. The commit is at https://github.com/imagej/ImageJ/commit/7579e16543e21b834a675d2e5d4ed68b649bd15b. I moved the work around for the problem with VirtualStacks caching ImageProcessors to the test plugin at https://wsr.imagej.net/plugins/Test_Virtual_Stack.java that reproduces the problem.

ctrueden commented 6 months ago

Thanks, @rasband!