Conversation
fix: GUI flow visualization indexing and gradZ contrast bugs - Fix IndexError when viewing flows with different array layouts (C,Z,Y,X) - Add robust Z-axis slicing for flow views with _pick_z_image() helper - Apply normalize99() to gradZ for contrast stretching - Correct flow array index mapping for 3D gradZ/cellprob views - Prevent TypeError from incompatible array shapes in pyqtgraph Resolves crashes and poor visibility in 3D flow visualizations.
|
Fix cellpose GUI flow visualization indexing and contrast bugs Summary This PR fixes critical bugs in cellpose GUI's flow visualization system that caused crashes and poor contrast in 3D datasets. The fixes address both indexing errors and normalization issues that made gradZ views unusable. Root Cause Analysis Poor gradZ normalization: gradZ used /10 * 127 + 127 scaling, severely compressing dynamic range Incorrect flow array mapping: View dropdown indices didn't correctly map to flow array indices in 3D mode Changes Made:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1295 +/- ##
==========================================
- Coverage 48.89% 48.83% -0.07%
==========================================
Files 16 16
Lines 3767 3774 +7
==========================================
+ Hits 1842 1843 +1
- Misses 1925 1931 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fix: GUI flow visualization indexing and gradZ contrast bugs
Resolves crashes and poor visibility in 3D flow visualizations.