-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add FSLeyes plugin #182
Add FSLeyes plugin #182
Conversation
@Stoyan-I-A please add a short description in your commit message in addition to noting the Issue #. The reason being that it makes parsing through the commit log a lot easier (i.e. I don't have to click on the issues to know what was meant to be done in a commit). |
I tried loading this plugin, but encountered an error: System: MacOS 10.14.3 Steps followed:
Three more notes:
Any thoughts @Stoyan-I-A ? |
- Added the watershed algorithm using a chunk of the code that was used to compute the morphometrics. That should be changed in the future since it is basically copying code that is used elsewhere. - Added the axon filling tool. This tool performs flood-fill at the locations of the centroids of the axon-myelin mask.
The centroids are now calculated with the myelin array rather than the axon array when trying to fill the axons.
@mathieuboudreau |
Thanks for the clarification @Stoyan-I-A . I can't test it at the moment unfortunately, as I can't even get FSLeyes to open in my venv anymore. Maybe the steps I reported above aren't exactly what I did, because I don't know what else could have changed. I'm getting this now:
I'll let you know once I debug this and I'm able to test your updated setup. (Edit: woops, sorry about closing for a brief second, it was a misclick.) |
I think installing Now, I'm able to open After that, I was a bit of a loss of where to go to test out your plugin as not instructions appeared, and nothing in the GUI changed. After digging around, I found that there was an option called "ADScontrol" unter I did so, and got this error. Afterwards, nothing else appeared on the GUI, still the basic FSLeyes GUI options. I'm on a MacOS 10.14.3, in the git branch |
Scratch that last point, I had an older version of the plugin in the plugin folder for some reason. The current one has the directory changes you made recently. Now I get this error: I opened |
I resolved the bug in commit fd63f2f (wrong filename, only printing the module path instead of concatenating it) and made the code a bit more robust for OS-independence. Now the plugin loads for me 🎉! |
Awesome!! Thank you @mathieuboudreau and @Stoyan-I-A for your contribution |
@Stoyan-I-A I did a git pull, then (after activating the environment):
When loading the plugin, a window pops up with the following error message: Error installing plugin file, Details: no module named: 'wx.lib.agw.hyperlink' And the terminal output says:
UPDATE: 2019-09-03 12:02:54: After uninstall/reinstall again:
Opening FSLeyes, no need to relead the plugin (still there), and it works fine (i can open the plugin and it works). Additional, info about PIL (maybe overwritten by fsleyes install):
|
@Stoyan-I-A I tried to follow the steps for debugging the GUI in the wiki (https://github.com/neuropoly/axondeepseg/wiki/How-to-test-the-plugin-script-in-debug-mode), however the instructions weren't clear/detailed enough for me to be able to do so on my computer. Could you possibly take a video screen capture of you following the steps required to do so as an example, and I'll try to follow that along, and I'll fill in the missing information that I thought I would have needed in the wiki? One large issue I think may be that your steps may not be identical for all IDEs (I use Visual Studio Code). |
@mathieuboudreau I'll see what I can do. Do you think it would help if I added pictures? |
We'll see after I see the video, it depznds on how exact some instructuions might need to be. |
- The plugin now checks suffixes instead of the entire name - The fill option now creates a new corrected axon overlay - The plugin now verifies if another version is present in the ADS directory
@mathieuboudreau I added the video to AxonDeepSeg's google drive. |
I found it easier to check the version this way. But I should change this. |
sorry i missed that on line 2, the version is a comment (part of the header). I would definitely remove this from the header (if we change the version in the future, we need to update both the code and the header, which is prone to errors). moreover, instead of having the version lost in the code, i would create a global variable and put it at the top of the file, so it is visible by anyone reading your code. Something like:
that you can put right after all the imports. |
ads_plugin.py
Outdated
@@ -36,6 +34,8 @@ | |||
|
|||
from AxonDeepSeg.morphometrics.compute_morphometrics import * | |||
|
|||
VERSION = "0.2.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would specify in the name that it's the plugin version, to avoid confusion with the ADS version. so maybe rename it to PLUGIN_VERSION
@Stoyan-I-A I updated instructions for debugging with a bit more details, it works for me now! https://github.com/neuropoly/axondeepseg/wiki/fsleyes-plugin |
Do we know if this plugin/fsleyes will/should work on Windows OS? |
FSLeyes isn't supported on Windows. I tried to install it with the PyPi package and it wasn't working correctly. That being said, I did find some instructions to run FSLeyes on Windows with a Linux Subsystem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per Julien's recommendation on Slack, and since we've likely reviewed this branch/feature more-or-less 10 times & users are already beginning to use it, I'm going to approve this PR and merge so that I can record a tutorial video for it. Any remaining fixes/changes should now be done by opening small (i.e. single-issue or single-feature) pull requests, and not in another big one like this.
Great job @Stoyan-I-A ! This feature is going to be incredibly useful!
This PR implements the following changes:
Fixes #159, Fixes #162, Fixes #191, Fixes #192, Fixes #193, Fixes #201, Fixes #209
TODO
How to test / install
The installation procedure can by found here : https://github.com/neuropoly/axondeepseg/blob/FSLeyes_integration/docs/source/documentation.rst
Tools description
Tooltips were added to the GUI. If you hover your cursor over a button on the plugin, a description should popup