-
Notifications
You must be signed in to change notification settings - Fork 3
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
Export to Qupath does not work in headless mode from a script #9
Comments
Hey,
I meant : there is no new files written by ABBA in the Qupath project, eg. no "Adult Mouse Brain - Allen Brain Atlas V3p1-Ontology.json" in the root of the project, and no "ABBA...zip" nor "ABBA...json" files in the image entries. But those files are created as expected without headless mode (but not touching the GUI except the angles changed prompt).
Guillaume Le Goc
…------- Original Message -------
On Tuesday, July 25th, 2023 at 15:16, Nicolas Chiaruttini ***@***.***> wrote:
> But there is nothing written in the Qupath project.
Just to be sure: you do not see any file in the project entry ?
—
Reply to this email directly, [view it on GitHub](#9 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AFH52X2A3UNBWW2RSO57773XR7BJLANCNFSM6AAAAAA2XBLSPM).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yeah, I read more carefully your message and got it, that's why I deleted my message sorry ! I'll need a bit of time, debugging java in python is not sure super straightforward |
I've looked quickly and there's no clear dependency on the user interface. |
Regarding the first error: I had a bunch of graphical classes for logging even in the one that's suppose to work headless. So I'll remove them. |
Hum, I can't reproduce the issue. Have you waited enough time ? Maybe the issue is that it's not a blocking command ? Can you try on one slice:
Wait ~30s and check if the expected file is written on the entry folder of this slice ? Maybe double check that you are targetting the right QuPath project ? If it's something else that can be tricky. Maybe there's an error which is swallowed because of the error log. If none of this works, I can make a special jar that logs a bunch of other things to see where the problem |
Hi, sorry for the late reply, I was away for a while.
It also works from a regular python console, but does not work (eg. files are not exported) executing the python script ( |
Ah! Then I think the issue comes from the asynchronous nature of the method. Please try to add at the end of your script:
If that's the issue, then I need to change the method or improve the documentation. Probably I'll add an extra parameter |
Yay, you nailed it ! It works fine from a script now. Cheers ! |
Reopening the issue to keep track of the documentation modification |
Hey, I checked, indeed it seems transformations done through "Interactive Transform" are not applied before exporting (I rotated a slice by a large angle, it shows when exporting from the UI but not from python). (*) Exporting from the UI launched from Python yields the same result as in regular Fiji UI. I can open a new issue to help you track this if you prefer. Cheers ! And again, sorry... Do you have echoes from other users of abba_python ? It feels like I'm either the only one to use it, the only one to complain or the only for who it does not work as expected :'( [EDIT] (*) |
Hi @GuillaumeLeGoc and thanks for the report!
:-) Yes, there's much less users in python than within the regular Fiji. You may be the only one or not far from it. I'm not sure about this new issue. I'll try to contact you by email |
The python script used to export to QuPath.
|
Description
I want to export registration to the Qupath project programmatically from python.
To do this, I launch an ABBA instance in headless mode, I load a state file and run the export registration command :
The following line is printed :
Exporting slice img_001.ome.tiff registration to QuPath
But there is nothing written in the Qupath project.
There is an error raised during the loading of the state file (see below), but this error did not prevent me from doing things with abba_python previously (eg. converting coordinates).
Doing the same thing not in headless mode (eg.
aligner = abba.Abba('Adult Mouse Brain - Allen Brain Atlas V3p1')
), the output is more talkative, those lines are also printed :And the files are indeed exported.
So it seems the multipositionner does not really exist in headless mode and Qupath export relies on it (but converting coordinates does not so that is why the latter works) ?
Output
The text was updated successfully, but these errors were encountered: