raamana / visualqc

VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
https://raamana.github.io/visualqc/
Apache License 2.0
73 stars 13 forks source link

Surface Visualization issue #54

Closed MarcKhoury8 closed 2 years ago

MarcKhoury8 commented 2 years ago

Hello Raamana,

Currently trying to use the visualQC output for surfaces visualizations. They work for aparc+aseg/ I have freesurfer installed and sourced to terminal, however, this message keeps popping up:

Attempting to generate the surface visualizations of parcellation ... Freesurfer does not seem to be installed - skipping surface visualizations.

Not sure if this is an issue with running it in terminal or if there's a separate installation procedure needed for visualqc.

raamana commented 2 years ago

Can you give me more details? esp. the output logs on the terminals, with the full traceback, and what datasets you've been using?

can you run this command and give me the output:

echo $FREESURFER_HOME
which tksurfer

if FREESURFER_HOME is not setup correctly, or it can't find tksurfer in its path, visualqc can't generate the surface visualizations, as it depends on them. Check Freesurfer installation instructions to double check it was done properly.

MarcKhoury8 commented 2 years ago

Hi @raamana, thank you for the reply. I've dug a bit into this tksurfer component and it seems as thought it has be deprecated and replaced with "freeview". I have freeview installed and it has also been sourced. My question is if there is a way to get around this issue and visualize the surface outputs? Specifically, if tksurfer is not deprecated or if freeview is now the replacement, are you aware what the process is to utilize either?

Output to echo $FREESURFER_HOME: /Applications/freesurfer/7.2.0 Output to which tksurfer: (Base) labs-iMac:~ lab$

MarcKhoury8 commented 2 years ago

Below is the Output Log:

Attempting to generate the surface visualizations of parcellation ... Freesurfer does not seem to be installed - skipping surface visualizations. Processing SUB001412_1-1-1954455-1 copy Processing SUB002865_1-1-1954446-1 copy Processing SUB003807_1-1-1954473-1 copy Processing SUB001341_1-1-1954422-1 copy Processing SUB001341_2-1-1954470-1 copy Restoring ratings from previous session(s), if they exist .. To be reviewed : 5

/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/freesurfer.py:395: MatplotlibDeprecationWarning: The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.set_window_title or GUI-specific methods instead. self.fig.canvas.set_window_title('VisualQC {} {} : {}' /Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/interfaces.py:39: MatplotlibDeprecationWarning: The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. plt.rcParams[key] = ''

Reviewing SUB001412_1-1-1954455-1 copy Traceback (most recent call last): File "/Users/lab/opt/anaconda3/bin/vqcfs", line 8, in sys.exit(main()) File "/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/freesurfer.py", line 12, in main freesurfer.cli_run() File "/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/freesurfer.py", line 1083, in cli_run wf.run() File "/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/workflows.py", line 82, in run self.loop_through_units() File "/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/workflows.py", line 197, in loop_through_units self.print_rating(unit_id) File "/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/workflows.py", line 309, in print_rating if self.ratings[subject_id] not in cfg.ratings_not_to_be_recorded: KeyError: 'SUB001412_1-1-1954455-1 copy'

raamana commented 2 years ago

Thanks Marc, I didn't realize tksurfer has been deprecated. Let me check on Freesurfer's website, and get back to you shortly on using freeview instead of tksurfer

raamana commented 2 years ago

regarding the other KeyError: 'SUB001412_1-1-1954455-1 copy', please reinstall the latest version and I think the latest version fixes this bug:

pip uninstall visualqc
pip install -U visualqc --no-cache-dir
MarcKhoury8 commented 2 years ago

Hi Raamana,

Thank you for the reply and help on this, much appreciated. I've gone ahead and applied those changes. I do want to mention that I admire the work done with visualQC and Neuropredict, I look forward to any future projects of yours! Thanks, will keep an eye out for your response.

raamana commented 2 years ago

Thanks Marc, glad to hear that. yes, I am happy to collaborate and extend them working with you as needed.

raamana commented 2 years ago

Also, would you be interested in helping adopt freeview or tksurferfv (notice the suffix fv to tksurfer) for this part of VisualQC? If you can't, it's absolutely fine, but I see that you forked it, so I just wanted to avoid us both doing the same thing :)

MarcKhoury8 commented 2 years ago

Thanks @raamana, I am fairly new to Github and accidentally forked the page. However, I am more than open helping in any way that I can. Would this be for the purpose of this specific issue or for future work on VisualQC?

raamana commented 2 years ago

I was thinking of this specific issue to start with, if your time and skills allow it. And we are always open to contributions in the future. Let me know if you want to this take up, then I can walk you through how to get it done rather quickly.

MarcKhoury8 commented 2 years ago

I am a bit new to this territory but if you could walk me that'd be great. Let me know how you would like to proceed and what you think he best approach is. Definitely open to future collaborations as well.

raamana commented 2 years ago

How about a zoom call tomorrow or day after? I am available in the afternoon times 2-4pm. Let me know your email. Mine is raamanap@pitt.edu

MarcKhoury8 commented 2 years ago

That works great for me, will send you a zoom invite for 3pm! Thanks raamana, looking forward to it. My email is marc.khoury.397@gmail.com

MarcKhoury8 commented 2 years ago

**For tomorrow

raamana commented 2 years ago

closing it as #57 fixes this