You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I was wondering how you are supposed to load a multi-channel image in the plugin.
Problem
If I load a multipage tif with two channels and python dimensions (C, Y, X), the plugin
gives the error ERROR tuple index out of range
If I set the stitch threshold > 0 or 3D on the image is processed as Z-stack, which is wrong.
I conclude from this that the plugin always think that an image with more than 2-dimension is a Z-stack.
What I tried
Napari expects dimensions (T, Z, C, Y, X) and I tried to add more dimensions. This did not help. In fact to display the image as multi-channel you need to split stack.
I converted in Fiji the image to a png/RGB. The image gets dimension (Y,X, C) with 3 channels. Napari displays the image as multi-channel without having to split stack. Cellpose can process the image. This solution is not good as converting yet in another format is not convenient and is something you try to avoid in image processing due to loss of information. If you try to make your image RGB in napari/python it is quite of a mess. You have to add an additional channel , ....
Possible solutions
Specify the channels to use directly without going through the image layer. The plugin should understand different dimensions. In the cellpose GUI this works quite well.
The text was updated successfully, but these errors were encountered:
Yeah I can reproduce this. The channel to segment menu is not very intuitive so it makes it seem like it should work, but it doesn't. The issue likes here:
So if you have a multichannel 3D image (4 dims) then you can make it work by naming one of the axes c e.g. by double clicking the number next to the axis or by providing a tuple to axis_labels.
For example lets say I have CZYX, I would do: viewer.dims.axis_labels = ('c', 1, 2, 3)
Then using channel to segment I can specify which channel to use and the axes labeled c will be used.
Alas, for CYX there is no similar check.
What would make more sense overall is if the channel_axis could be directly specified in the widget UI.
I'll take a look.
Thanks,
are you saying that for a standard CXY image it is not possible to use the napari cellpose plugin except by converting it to a different order image? I have not tried to change the order of the numpy array in python. Do you know if this works (no conversion to RGB).
Hello,
I was wondering how you are supposed to load a multi-channel image in the plugin.
Problem
gives the error
ERROR tuple index out of range
I conclude from this that the plugin always think that an image with more than 2-dimension is a Z-stack.
What I tried
Napari expects dimensions (T, Z, C, Y, X) and I tried to add more dimensions. This did not help. In fact to display the image as multi-channel you need to split stack.
I converted in Fiji the image to a png/RGB. The image gets dimension (Y,X, C) with 3 channels. Napari displays the image as multi-channel without having to split stack. Cellpose can process the image. This solution is not good as converting yet in another format is not convenient and is something you try to avoid in image processing due to loss of information. If you try to make your image RGB in napari/python it is quite of a mess. You have to add an additional channel , ....
Possible solutions
Specify the channels to use directly without going through the image layer. The plugin should understand different dimensions. In the cellpose GUI this works quite well.
The text was updated successfully, but these errors were encountered: