spinalcordtoolbox / manual-correction

Scripts for the manual correction of spinal cord labels
MIT License
4 stars 0 forks source link

Allow specifying additional FSLeyes arguments #13

Closed valosekj closed 1 year ago

valosekj commented 1 year ago

Description

This PR adds the possibility to specify additional FSLeyes arguments:

NOTE: since a second orthoview cannot be opened from CLI, I proposed a function which creates a custom python script to configure individual orthoviews. Example result:

image

How to test this PR

  1. Clone:
git clone https://github.com/spinalcordtoolbox/manual-correction.git
cd manual-correction
git checkout jv/add_fsleyes_options
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Download the testing dataset.

  2. Run:

python manual_correction.py -path-in ~/Downloads/manual_correction_example_dataset/data_processed -config ~/Downloads/manual_correction_example_dataset/files_to_correct.yml -viewer fsleyes -fsleyes-cm blue -fsleyes-dr 0,50 -fsleyes-second-orthoview

FIxes: https://github.com/spinalcordtoolbox/manual-correction/issues/9, https://github.com/spinalcordtoolbox/manual-correction/issues/10

valosekj commented 1 year ago

Thank you for testing Sandrine!

ValueError: unsupported format character 't' (0x74) at index 24

Might this be an error caused by Windows or by the French localization of your laptop?

It opens the ortho views, but I don't see the toolbar and location panel.

Again, might it be caused by Windows? Or maybe by the FSLeyes version? You can check the version by:

fsleyes -V

I'm using FSLeyes 1.5.0.

valosekj commented 1 year ago
  1. When running the help command, I got this error, that I don't get on the main branch
...
ValueError: unsupported format character 't' (0x74) at index 24

Okay, the ValueError was caused by the % character. Fixed in https://github.com/spinalcordtoolbox/manual-correction/pull/13/commits/e3d9cbcf777a44ba4cbcaba37786ca1d46083549. Source

valosekj commented 1 year ago

Thanks for reviewing! The problem with the "ortho view" script seems to be related to Windows. I opened a separate issue. --> merging this PR