Open gselzer opened 1 month ago
I don't think it needs all this complexity... vispy and pygfx already naturally support RGB images as numpy arrays in shape (Y, X, 3/4)
... and if you call CMMCorePlus.getImage()
with an RGB camera, pymmcore-plus takes care of rearranging it for you and you will get an array of (Y,X,3)
...
ndv currently just assumes of single-channel data (todo here: https://github.com/pyapp-kit/ndv/issues/20)), this line here might need a slight adjustment: https://github.com/tlambert03/ndv/blob/4e0c5fed7bef765c52efaac9ec4a8a72eb9f7f8d/src/ndv/viewer/_backends/_vispy.py#L138
and the slicing will need an adjustment too. But I would just start with a simple 2d image case and see where ndv breaks
This should be fixed with pyapp-kit/ndv#41, although it would be good to test with a camera before closing!
The current pathway for image data getting from MMCore to an
NDViewer
does not consider whether the data is RGB - it would be nice to support such datasets coming from RGB cameras.From @marktsuchida: