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

Introduce QC report generation #1251

Merged
merged 34 commits into from
Apr 20, 2017
Merged

Introduce QC report generation #1251

merged 34 commits into from
Apr 20, 2017

Conversation

peristeri
Copy link
Contributor

For the commands sct_propseg, sct_label_vertebrae and
sct_register_to_template, an extra parameter is added. The parameter takes a
output path and generates png images of the input and segmentaion output as well
as log of output values.

Partial implements #1247

For the commands `sct_propseg`, `sct_label_vertebrae` and
`sct_register_to_template`, an extra parameter is added. The parameter takes a
output path and generates png images of the input and segmentaion output as well
as log of output values.

Partial implements #1247
@jcohenadad
Copy link
Member

is it ready to be tested?

@peristeri
Copy link
Contributor Author

@jcohenadad yes it is.

@jcohenadad
Copy link
Member

jcohenadad commented Apr 19, 2017

warning after propseg, then error after sct_qc (the folder ~/qc_data is empty):


Done! To view results, type:
fslview t2.nii.gz t2_seg.nii.gz -l Red -b 0,1 -t 0.7 &

/Users/julien/code/sct/python/lib/python2.7/site-packages/scipy/ndimage/measurements.py:1301: RuntimeWarning: invalid value encountered in double_scalars
  for dir in range(input.ndim)]
WARNING:/Users/julien/code/sct/spinalcordtoolbox/reports/qc.py:Can not get GIT hash value
Sucessfully generate the QC results in ~/qc_data/qc_results.json
Use "sct_qc -folder ~/qc_data" to see the results on a browser
julien-macbook:~/data/temp/sct_015/t2 $ sct_qc -folder ~/qc_data

--
Spinal Cord Toolbox (qc-generator/af8edf141656c541c5d75d7bad47387ae46d690b)
Running /Users/julien/code/sct/scripts/sct_qc.py -folder /Users/julien/qc_data
Check folder existence...
Can not start the quality control viewer. This is not a proper QC folder

/Users/julien/code/sct/scripts/sct_qc.pyNone

@peristeri
Copy link
Contributor Author

@jcohenadad can you list me the contents of the ~/qc_data folder?

@jcohenadad
Copy link
Member

it is empty

@jcohenadad
Copy link
Member

jcohenadad commented Apr 19, 2017

I do this and nothing happens (nothing in my browser):

sct_qc -folder ~/qc_data/

--
Spinal Cord Toolbox (qc-generator/dcb7cbff9c58599894aa0ba145c1d0fa8ef9c5dc)
Running /Users/julien/code/sct/scripts/sct_qc.py -folder /Users/julien/qc_data/
Check folder existence...
QC viewer started on http://127.0.0.1:8888
Press "Ctrl" + "C" to stop sct_qc

Update: if i copy/paste URL in browser, it works. But people cannot guess it. Possible to open browser automatically? If not, indicate to the user that he/she has to click on index.html

@jcohenadad
Copy link
Member

can you please make the segmentation blink twice as fast?

@jcohenadad
Copy link
Member

I've added another command for the same subject (label_vertebrae), but when generating the report i only get the view for propseg.

@jcohenadad
Copy link
Member

jcohenadad commented Apr 19, 2017

  • error with label_vertebrae: /Users/julien/code/sct/python/lib/python2.7/site-packages/scipy/ndimage/measurements.py:1301: RuntimeWarning: invalid value encountered in double_scalars
    for dir in range(input.ndim)]
  • bug: update the json if the html server is running
  • get rid of the warning
  • use top/down instead of left/right to switch between rows
  • I've added another command for the same subject (label_vertebrae), but when generating the report i only get the view for propseg.
  • sct_register_to_template does not show up in the report either
  • under qc_data, i would put subject then contrast, instead of the other way around (to keep consistency with data structure)
  • QC for label_vertebrae and register_to_template: divide width by factor 4
  • can you please make the segmentation blink twice as fast?
  • Sucessfully generate --> Sucessfully generated
  • put in next line: sct_qc -folder /Users/julien/qc_data, and in green ('info' in printv)
  • change sct_qc message for "Please open a browser and copy/paste this link "next line" sct_qc -folder /Users/julien/qc_data ('info' in printv)
  • add small space between picture and table
  • highlight the selected table in the browser
  • enable arrow up/down to go through rows

@jcohenadad
Copy link
Member

jcohenadad commented Apr 20, 2017

i unchecked some boxes after testing it:

thw warning:

WARNING:/Users/julien/code/sct/spinalcordtoolbox/reports/qc.pyc:Can not get GIT hash value

and also, after running "sct_label_vertebrae -i t1.nii.gz -s t1_seg.nii.gz -c t1", it does not show up in the html report, nor in the json

@jcohenadad jcohenadad added this to the Release v3.0.2 milestone Apr 20, 2017
Copy link
Member

@jcohenadad jcohenadad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic contribution 👍

@peristeri peristeri merged commit 3884d1e into master Apr 20, 2017
@peristeri peristeri deleted the qc-generator branch April 20, 2017 21:15
@peristeri peristeri changed the title [FEATURE] Introduce QC report generation Introduce QC report generation Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature category: new functionality sct_label_vertebrae context: sct_propseg context: sct_register_to_template context:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants