-
Notifications
You must be signed in to change notification settings - Fork 11
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
ij.ImagePlus.getProcessor() error #53
Comments
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/cellpose-error-qupath-cannot-invoke-ij-imageplus-getprocessor/103845/2 |
Hi, The error seems to come from the fact that it cannot find the label image resulting from cellpose, so either cellpose did not run, the data is somewhere ImageJ's image opener cannot access, the file path is different from the one I expect or something else. Best Oli |
Hi Oli, Best wishes, This is the script: def pathModel = 'cyto3' // Run detection for the selected objects cellpose.detectObjects( imageData, pathObjects ) // You could do some post-processing here, e.g. to remove objects that are too small, but it is usually better to import qupath.ext.biop.cellpose.Cellpose2D |
Hi! I get the exact same error when running the latest Cellpose version (conda) on QuPath-0.5.1-x64 on Mac when trying to segment hematoxylin images. It seems to create the tile but cannot process it, independent of file location. ERROR: Cannot invoke "ij.ImagePlus.getProcessor()" because "label_imp" is null Any help on this topic is greatly appreciated! Best |
Hi! Hope this helps! |
Thanks for your quick reply! I re-installed and updated all the needed dependencies and conda environment and that also did the trick. |
I have suddenly encountered this same error. Working in Windows 11, QuPath v5.1, and CellPose extension v9.6. I was successfully running CellPose on three ROIs individually and then collectively. I then had the CellPose script generate annotations instead of detections. I wanted to test out the simplification parameter, so I deleted the annotations that were generated by CellPose while keeping the Rectangular ROIs and then set .simplify(2). After this change, I noticed the extension is grabbing the whole ROI as an image instead of generating tiles and then give this error:
I tried restarting QuPath, deleting the ROIs and drawing a new one, and deleting the cellpose-temp folder in the QuPath project folder. The same error occurred. This is the set up for running CellPose (not including the lines after for simplification, they are identical to the script provided in the extension):
This is what the log says:
A very odd thing happened after more testing prior to posting. I specified the tile size and now the script will run. I then commented out the tile size parameter, deleted the cellpose-temp folder and reran the script and it worked again. I tried recreating the error following the same steps I did above but cannot recreate it. I don't know if this is helpful or not, but it was very strange, and I do not know how it occurred or how I suddenly "fixed" it. |
Just a guess, maybe maybe there was some rights issues or files locked and erasing the folder was sufficient to fix issues ? Anyway, glad you had it fixed! |
I ran into this issue as well. The solution for me was to run the cellpose gui from command line once before running it through QuPath. |
Hi!
I've recently downloaded the most recent version of the qupath cellpose extension and run into an issue I am not able to solve. When I try to run the "detection script template" or "detect nuclei and cells using Cellpose.groovy" I get the following error:
ERROR: Cannot invoke "ij.ImagePlus.getProcessor()" because "label_imp" is null
java.lang.NullPointerException: Cannot invoke "ij.ImagePlus.getProcessor()" because "label_imp" is null
at qupath.ext.biop.cellpose.Cellpose2D.readObjectsFromTileFile(Cellpose2D.java:1365)
at qupath.ext.biop.cellpose.Cellpose2D.lambda$processCellposeFiles$18(Cellpose2D.java:790)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
I am using brightfield WSI but also tried it out on a smaller tif with the same error.
I've noticed the same issue was posted in this forum https://forum.image.sc/t/cellpose-error-qupath-cannot-invoke-ij-imageplus-getprocessor/103845 very recently.
Any advice much appreciated!
The text was updated successfully, but these errors were encountered: