visualqc icon indicating copy to clipboard operation
visualqc copied to clipboard

Add a flexible VisualQC preparation script to go from as-is files to VisualQC-ready

Open ericearl opened this issue 2 years ago • 7 comments

Description

I would like to contribute a "vqcprep" or "visualqc_prep" command-line interface (CLI) that will be able to prepare from files on my filesystem in arbitrary folder trees (or BIDS trees) to a valid and ready VisualQC tree using a CSV as input.

My typical VisualQC use case is for evaluating the quality of defacing or alignment, but I imagine this as a flexible enough utility to be able to handle any of the use cases provided as input to vqc* CLIs.

What I Am Planning To Do Right Now

  1. I will use argparse to create the CLI in Python.
  2. It will require as input a header with the keyword column names for the files you would like to soft/symbolic link (Linux or Mac default) or copy (Windows default, Linux or Mac optional).
  3. I will read the contributing guide in the top of the repo.
  4. I will make it flexible enough to take in a variable amount of columns, an enumerable set of column names, and a variable number of rows (one row for each set of "related" files, for instance "original" and "defaced").
  5. I will make it produce 3D renders as an opt-in option.
  6. I will submit a readthedocs page about it along with the final pull request.

What I Would Like To Know

  1. Should we converse about adding this CLI here on the Issue or would you prefer a meeting to discuss the preferred architecture before I get too deep into it?
  2. Are there additional features you would like to see from a CLI with this intention?

ericearl avatar Dec 27 '22 16:12 ericearl

Thanks Eric - appreciate this. Please go ahead and customize it as you see fit.

Few comments:

  • If this is specific to defacing alone, I'd suggest calling the cmd vqcdeface_prep
  • is the motivation to generate screenshots of defaced overlay on MRI, for future reference, or review elsewhere?
  • if the former, its better to incorporate it within the main workflow (BaseWorkflowVisualQC), as others had been requesting it within Freesurfer and other modules of VisualQC. I resisted it as I didn't see the benefit, esp. when the interactive review is so fast and works on the latest version of the data.. and also because the screenshot can become out of sync with the latest version of the data, if great care hasn't been taken to keep them in sync.
  • if the latter, it makes sense, although I'd be curious to learn the features of the external viewer that we can consider adding to visualqc
  • most importantly for me is the ability to generate 3D renders natively within Python, that Arshitha, you and I discussed before. I understand you may not have had the time to work on it, but if you did make progress, I'd love to incorporate it within VisualQC.

Happy to chat anytime if it helps. If I don't reply quickly here, don't hesitate to email me.

raamana avatar Dec 28 '22 15:12 raamana

i had been wanting to work on methods to generate 3D renders natively within Python, and these holidays might be a good time.. Can I request you and @Arshitha to share what you have done so far on it, so I avoid reinventing? I'll be sure to mention your contribs.

raamana avatar Dec 28 '22 15:12 raamana

did you get a chance to work on this, Eric? it's okay if you didn't.

raamana avatar Mar 16 '23 15:03 raamana

Hey @raamana! Yeah, sorry for the silence. Shortly after I wrote this up I shifted gears for a while. I think I'll get back to this soon, but I can't say if it's going to be this month or next month. There's a few new projects in-between me and working on this.

ericearl avatar Mar 16 '23 15:03 ericearl

NP Eric. I made decent progress on batch generation of screenshots in the branch screenshots_batch_generation, both for alignment and defacing modules, and you can perhaps use or adapt it as needed for your usecase!

https://github.com/raamana/visualqc/compare/master...screenshots_batch_generation

raamana avatar Mar 16 '23 21:03 raamana

instructions to try in case you are interested: https://github.com/raamana/visualqc/issues/37#issuecomment-1474181538

raamana avatar Mar 17 '23 17:03 raamana

Awesome! Thanks for the instructions! Documentation always helps. We'll check this out on our next occasion of using VisualQC for defacing evaluations.

ericearl avatar Mar 17 '23 19:03 ericearl