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

For every second image in defacing interface pressing 'p' or clicking 'Pass' checkbox does not record the rating #75

Closed Arshitha closed 1 year ago

Arshitha commented 1 year ago

Description

Describe what you were trying to get done. I'm trying to rate a bunch of defaced images for accuracy.

Tell us what happened, what went wrong, and what you expected to happen. For every second image, pressing 'p' or clicking 'Pass' checkbox gives the "You have not rated the current subject! Please rate it before you can advance to next subject, or to quit.." message. Only when I uncheck the pass rating it moves on to the next image. Here's the standard output.

Reviewing sub-24236/acq-original/T1w
You have not rated the current subject! Please rate it before you can advance to next subject, or to quit..
    id: sub-24236/acq-original/T1w
rating: ['Pass']
 notes: None

Reviewing sub-24139/acq-original/T1w
    id: sub-24139/acq-original/T1w
rating: ['Pass']
 notes: None

Reviewing sub-23601/acq-original/T1w
You have not rated the current subject! Please rate it before you can advance to next subject, or to quit..
You have not rated the current subject! Please rate it before you can advance to next subject, or to quit..
    id: sub-23601/acq-original/T1w
rating: ['Pass']
 notes: None

Reviewing sub-24260/acq-original/T1w
    id: sub-24260/acq-original/T1w
rating: ['Pass']
 notes: None

Reviewing sub-23069/acq-original/T1w
You have not rated the current subject! Please rate it before you can advance to next subject, or to quit..
You have not rated the current subject! Please rate it before you can advance to next subject, or to quit..
    id: sub-23069/acq-original/T1w
rating: ['Pass']
 notes: None

What I Did

I'm not sure how to go about fixing this issue. So I have not tried potential solutions other than re-installing v0.6.2 of visualqc which gave me a different set of errors that were mostly related to dependency conflicts within the environment.

Here's the command I ran which opened up the rating interface successfully but the issue was with the rating itself.

vqcdeface -u defacing_outputs_demo/defacing_QC -i defacing_outputs_demo/defacing_QC/defacing_id_list.txt -m orig.nii.gz -d defaced.nii.gz -r defaced_render
raamana commented 1 year ago

Thanks for the report Arshitha! That’s so weird as I don’t recall touching that part of the code recently. Let me take a look and get back to you.

Arshitha commented 1 year ago

Thanks @raamana , please let me know if I can help out by testing anything on my end!

raamana commented 1 year ago

sorry for the slow response/fix, Arshitha. Been travelling in India, and am just back in PGH. I can confirm this is an issue, and something to do with the Matplotlib's changes to how the checkboxes work. I need to identify and isolate the specific reasons and either fix it or work around it. I will keep you posted. Sorry for the inconvenience.

Arshitha commented 1 year ago

No worries, @raamana , thank you for the update!

raamana commented 1 year ago

Can you copy paste the version info of matplotlib and other libraries output by VisualQC at the start of output log? I think this is due to deprecated changes in matplotlib and I need to ensure my new implementation would work across all MPL versions

raamana commented 1 year ago

the issue seems to be with the deprecations in the latest matplotlib version 3.7.0. I suggest to use older versions for now for a quick fix (with commands below), and I will find a way to make it work on all versions.

pip uninstall matplotlib
pip install matplotlib==3.6.1 --no-cache-dir
Arshitha commented 1 year ago

@raamana Thank you for the update. I'll be using vqcdeface this afternoon so I'll try the fix you suggested and report back!

Arshitha commented 1 year ago

@raamana Just confirming that switching to matplotlib 3.6.1 worked and I didn't see the issue anymore. Thank you!

raamana commented 1 year ago

great, glad to hear that!

ericearl commented 8 months ago

I'm having the same problem with Python v3.10.8, VisualQC v0.6.2 or v0.6.6, and I've tried matplotlib versions 3.7.2 and 3.8.3.

ericearl commented 8 months ago

Aaaaaaaaaaannnnnnddd, now I read the one post you made above... and it's working again!

pip uninstall matplotlib
pip install matplotlib==3.6.1 --no-cache-dir

Sorry!

raamana commented 8 months ago

no worries at all Eric! Glad its working for you.

I haven't found the time to work on this yet, but will try to look into this again and implement a new version that would work with all versions