Fix: io.omread_3D used when channel_axis > 0
#1344
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In CLI mode, when using 4D images, the image is always opened with
io.imread_3Dwhenchannel_axishas a truthy value. The result is an unwanted swap between the last axis and the channel axis.With a ZCYX axis order, the CLI command will be run with
--do_3D,--channel_axis 1and--z_axis 0.Because
channel_axisis truthy, the image will be opened withio.imread_3Dcausing a swap of the last axis and the channel axis. As a result, the opened image is changed to a ZXYC order, but thechannel_axisvariable is not updated. The later call to.eval()is therefore using the wrong channel axis (1, pointing toX), causing error in segmentation.