The current implementation of PlanarImgToVirtualStack.wrap(...) would fail to convert an ImgPlus<?> that was returned by ImgPlus<?> img = VirtualStackAdapter.wrap( imagePlus );
Instead of correctly converting the image, the following line of code throws an UnsupportedOperationException:
This commit fixes this UnsupportedOperationExcpetion. The exception is simply is catched inside PlanarImgToVirtualStack.wrap( img ).setPixels(...). (more specifically inside the setPixelsZeroBasedIndex(...) method) This makes the PlanarImgToVirtualStack behave similar to the vanilla VirtualStack, which simply has an empty setPixels method.
Fixes this bug: https://forum.image.sc/t/plugin-maintainers-can-you-test-fiji-2-11-0/78852/7
The current implementation of
PlanarImgToVirtualStack.wrap(...)
would fail to convert anImgPlus<?>
that was returned byImgPlus<?> img = VirtualStackAdapter.wrap( imagePlus );
Instead of correctly converting the image, the following line of code throws an
UnsupportedOperationException
:PlanarImgToVirtualStack.wrap( VirtualStackAdapter.wrap( imagePlus ) )
This commit fixes this
UnsupportedOperationExcpetion
. The exception is simply is catched insidePlanarImgToVirtualStack.wrap( img ).setPixels(...)
. (more specifically inside thesetPixelsZeroBasedIndex(...)
method) This makes thePlanarImgToVirtualStack
behave similar to the vanillaVirtualStack
, which simply has an emptysetPixels
method.