Describe the bug
Using the GUI, trying to run a model on a z-stack that has more frames than it has pixels (e.g. 266 frames of 200x200px). The model behaves fine on its own, and the GUI is otherwise treating the z-stack just fine, but the drawing the masks results in ERROR: index 200 is out of bounds for axis 0 with size 200 from somewhere inside the if branch at cellpose/gui/io.py:505. I expect this has to do with the decision on cellpose/gui/io.py:169 that chooses the smallest dimension to be Z, but I was unable to figure out how to carry the gui's choice of Z into this layer of the code properly.
To Reproduce
Steps to reproduce the behavior:
Load a z-stack with more frames than edge pixels
Click on 'Run Cyto3'
See error in console
Run log
...
2024-09-25 14:57:23,102 [INFO] 44 cells found with model in 8.088 sec
GUI_INFO: 44 masks found
GUI_INFO: plane 0 outlines processed
GUI_INFO: plane 50 outlines processed
GUI_INFO: plane 100 outlines processed
GUI_INFO: plane 150 outlines processed
GUI_INFO: plane 200 outlines processed
ERROR: index 200 is out of bounds for axis 0 with size 200
Describe the bug Using the GUI, trying to run a model on a z-stack that has more frames than it has pixels (e.g. 266 frames of 200x200px). The model behaves fine on its own, and the GUI is otherwise treating the z-stack just fine, but the drawing the masks results in
ERROR: index 200 is out of bounds for axis 0 with size 200
from somewhere inside theif
branch atcellpose/gui/io.py:505
. I expect this has to do with the decision oncellpose/gui/io.py:169
that chooses the smallest dimension to be Z, but I was unable to figure out how to carry the gui's choice of Z into this layer of the code properly.To Reproduce Steps to reproduce the behavior:
Run log