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

fsleyes: allow user to specify output folder #2941

Merged
merged 2 commits into from
Oct 19, 2020

Conversation

Drulex
Copy link
Collaborator

@Drulex Drulex commented Oct 7, 2020

Closes #2579

Implement: #2579 (comment)

@Drulex Drulex added enhancement category: improves performance/results of an existing feature sct_plugin.py (FSLeyes) context: Related to FSLeyes plugin labels Oct 7, 2020
@Drulex Drulex self-assigned this Oct 7, 2020
@Drulex
Copy link
Collaborator Author

Drulex commented Oct 7, 2020

Do you mind giving the updated GUI a try @valosekj ?

@valosekj
Copy link
Member

valosekj commented Oct 7, 2020

Do you mind giving the updated GUI a try @valosekj ?

Sure! But now I am somehow struggling with running the sct_plugin.py script from fsleyes. I start fsleyes from terminal, then i do File/Run script and then I get invalid syntax error on line 110:

https://github.com/neuropoly/spinalcordtoolbox/blob/bacf0325eaafa71e3f6cfa4be83f0996c903dd3b/contrib/fsl_integration/sct_plugin.py#L110

It is probably related to f-strings formatting. This formatting is available from Python3.6, right? Is it possible that my fsleyes tries to run the sct_plugin.py by older version of python?
How do you run fsleyes and the plugin? Thanks!

@jcohenadad
Copy link
Member

@valosekj i just tried and it works fine. What version/os are you on? Me:

  • OS: macOs 10.15.7
  • fsleyes/FSLeyes version 0.31.0+build0

@valosekj
Copy link
Member

valosekj commented Oct 7, 2020

macOS Catalina 10.15.7
fsleyes/FSLeyes version 0.27.3+build0

I am going to update FSLeyes and I will see.

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 7, 2020

It is probably related to f-strings formatting. This formatting is available from Python3.6, right?

Yes it is a feature from 3.6. Considering that the python version we bundle with install_sct is 3.6 I assumed it was ok.

@valosekj
Copy link
Member

valosekj commented Oct 7, 2020

I have updated FSLeyes to 0.34.2 and now I am able to run sct_plugin.py but when I click on Run button e.g. for sct_propseg I get:
image
Probably some other problem with my environment. I will try to figure out what is reason.

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 7, 2020

Probably some other problem with my environment. I will try to figure out what is reason.

I was running 0.33, but I upgraded to 0.34.2 and confirm that the feature still works as expected (python 3.8.5 on Linux 5.4)

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 7, 2020

@valosekj I think if you run fsleyes from the conda environment it will pickup the 3.6 version.

source $SCT_DIR/python/etc/profile.d/conda.sh && conda activate venv_sct && fsleyes

@valosekj
Copy link
Member

valosekj commented Oct 7, 2020

@valosekj I think if you run fsleyes from the conda environment it will pickup the 3.6 version.

source $SCT_DIR/python/etc/profile.d/conda.sh && conda activate venv_sct && fsleyes

I was running fsleyes in conda environment in #2941 (comment). Strange. It will be probably something related to MacOS Catalina - https://stackoverflow.com/a/59150657. I am digging into it.

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 7, 2020

I was running fsleyes in conda environment in #2941 (comment). Strange. It will be probably something related to MacOS Catalina - https://stackoverflow.com/a/59150657. I am digging into it.

Ah ok. That's a weird one.. good luck. 😬

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 16, 2020

Any luck @valosekj ?

@valosekj
Copy link
Member

Any luck @valosekj ?

Unfortunatelly not. But I think, PR can me merger, because it is working for you and also for Julien who has MacOS. It looks that my issue is probably caused by some problem related to my computer and SW versions.

@Drulex
Copy link
Collaborator Author

Drulex commented Oct 19, 2020

Unfortunatelly not. But I think, PR can me merger, because it is working for you and also for Julien who has MacOS. It looks that my issue is probably caused by some problem related to my computer and SW versions.

@jcohenadad ok with the changes to be merged?

@Drulex Drulex force-pushed the aj/2579-add-output-dir-to-fsleyes branch from bacf032 to a65bb10 Compare October 19, 2020 14:47
@jcohenadad jcohenadad added this to the 5.0.0 milestone Oct 19, 2020
@Drulex Drulex merged commit 2cf7545 into master Oct 19, 2020
@Drulex Drulex deleted the aj/2579-add-output-dir-to-fsleyes branch January 18, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement category: improves performance/results of an existing feature sct_plugin.py (FSLeyes) context: Related to FSLeyes plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fsleyes integration saves outputs to directory from which fsleyes is opened
3 participants