-
Notifications
You must be signed in to change notification settings - Fork 7
[napari workflows] Add napari-apoc to core task #352
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
Comments
Hi! As @jluethi mentioned, I was trying to get napari apoc running via a custom version of the napari workflow wrapper task. The following packages were installed in the environment for the custom task: napari-accelerated-pixel-and-object-classification==0.12.3 I additionally had to install pocl via conda: conda install -c conda-forge pocl Running the custom task resulted in the follwing error:
@jluethi suggested checking the output type of napari apoc and casting it to a numpy array in case the type was the issue, The output of napari apoc turned out to be of type I added a user-specific-example (21_Adrian_apoc_napari_workflow_wrapper) to my fork of the fractal-demos repository (https://github.com/adrtsc/fractal-demos). |
Ok, so the main steps to get apoc support into the core repo:
@adrtsc Why was a labeling step necessary? Isn't the result already a label image? Or does it just produce a binary mask? Thanks for sharing a link to your demo-example! |
For now, I was using the pixel classifier approach from apoc. This yields a label image, but with a unique label per pixel class. In my case label 1 for background and label 2 for nuclear speckles. For my personal use-case, I prefer to have a unique label for each nuclear speckle object, therefore I added the labeling of connected components. |
Ah, interesting point. Can a connected-component relabeling be done as part of a napari workflow? That would be the most elegant solution to this. I'm hesitant to add logic to the core task to start changing the label images we get from napari workflows, because that's not really a wrapper job Maybe that would also already convert it into a numpy array. Though the type checking & casting would anyway be useful in the wrapper :) |
small update from my side:
Good point. I looked a bit more into napari workflows and now changed my approach a bit. Integrating the relabeling in the napari workflow turned out to be quite easy. So this absolutely can be done in the napari-workflow instead of the core task. |
napari apoc is (among other things) a very useful pixel classifier. @adrtsc is currently testing it via the napari workflow wrapper.
Once those tests pass, would be good to add it to the core tasks.
One thing that will certainly be required for that will be a PR with napari apoc to make the QT dependency optional. Otherwise, we run into these types of errors:
@adrtsc If you find additional issues, let's collect them here :)
The text was updated successfully, but these errors were encountered: