Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with transform operations #80

Open
PietroTa opened this issue Dec 4, 2024 · 1 comment
Open

Possible issue with transform operations #80

PietroTa opened this issue Dec 4, 2024 · 1 comment

Comments

@PietroTa
Copy link

PietroTa commented Dec 4, 2024

Hi,

I've been using pyclesperanto with Napari for image processing tasks and have found it to be fantastic, thank you! Recently, possibly after an update, the 'Transform' operations (e.g., rotate, substack) via the napari-pyclesperanto-assistant plugin have started failing with the following error:

ValueError: Image data must have at least 2 dimensions.

When using the assistant plugin within Napari to perform 'Transform' operations on a 3D image, I encounter the above error. However, when I get the data from the viewer and perform the same operations using pyclesperanto in a Jupyter notebook everything works correctly.
All other 3D operations seem to work correctly within Napari usning the assistant (e.g. Remove noise.....).

I have tried to generate a clean environment as below, but the issue persisted.

mamba create --name cleTEST python=3.9
mamba activate cleTEST
mamba install -c conda-forge pyclesperanto

mamba install -c conda-forge napari-pyclesperanto-assistant

Here the package versions I am using:

napari 0.5.4 hd8ed1ab_0 conda-forge
napari-assistant 0.4.10 pyha07c04f_0 conda-forge
napari-pyclesperanto-assistant 0.22.1 pyhd8ed1ab_0 conda-forge
pyclesperanto 0.16.0 py39h8f1c5a3_0 conda-forge
pyclesperanto-prototype 0.24.4 pyhd8ed1ab_0 conda-forge

The OS in the machine i am using is Windows Server 2022 Standard

Any input on how to address this would be greatly appreciated. The 'live preview' for some of the transform functions is really a game changer for me.

Thank a lot in advance,

Pietro

@PietroTa
Copy link
Author

PietroTa commented Dec 4, 2024

Hello again,

after failing to solve the issue by downgrading the plugins and napari to older versions i found a functional workaround:

if instead of clicking on 'Transform' i type in the assistant search bar "rotate (pyclesperanto)" I manage to initiate the rotation without errors.

A confused interpretation:
I guess the problem is that the first 'Transform' operation is 'sub_stack', and when I press on 'Transform' the plugin tries to generate the substack, with default start and end z =0, generating an image with less than 2(?) dimensions that when passed to the viewer gives the Value error i mentioned above. After the error it seems that changing the type of 'Transform' operation to 'rotate' or changing the start and end z for 'sub_stack' does not start a new 'operation, while selecting for example 'Remove background' does initiate a new operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant