drivendataorg / concept-to-clinic

ALCF Concept to Clinic Challenge

Home Page:https://concepttoclinic.drivendata.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DICOM viewer: errors in console and can't select slice

Serhiy-Shekhovtsov opened this issue · comments

When importing\browsing DICOM images the viewer is showing only once slice and doesn't allow scrolling. I can see following errors in console:

[Vue warn]: Error in callback for watcher "view.paths": "Error: updateImage: image has not been loaded yet"

found in

---> at src/components/open-image/OpenDICOM.vue
at src/components/open-image/ImageSeries.vue
at src/views/OpenImage.vue
at src/App.vue

And this one:

updateImage: image has not been loaded yet
at Object.exports.default (cornerstone.js?f051:309)
at Object.enable (cornerstoneTools.js?a9d4:1797)
at VueComponent.initCS (OpenDICOM.vue?67e0:112)
at VueComponent.boundFn [as initCS] (vue.esm.js?65d7:188)
at VueComponent.viewPaths (OpenDICOM.vue?67e0:49)
at Watcher.run (vue.esm.js?65d7:3175)
at flushSchedulerQueue (vue.esm.js?65d7:2927)
at Array.eval (vue.esm.js?65d7:1792)
at MessagePort.flushCallbacks (vue.esm.js?65d7:1713)

Steps to Reproduce

  1. Open home page
  2. Click Import
  3. Unfold until you find an image file
  4. Click on image file

Checklist before submitting

  • I have confirmed this using the officially supported Docker Compose setup using the local.yml configuration and ensured that I built the containers again and they reflect the most recent version of the project at the HEAD commit on the master branch
  • I have searched through the other currently open issues and am confident this is not a duplicate of an existing bug
  • I provided a minimal code snippet or list of steps that reproduces the bug.
  • I provided screenshots where appropriate
  • I filled out all the relevant sections of this template

I have created a task for all features the DICOM viewer should have - #240 and probably it will take some time to implement them. Till that time this bug can fixed separately.

Two issues I noticed in the code:

https://github.com/concept-to-clinic/concept-to-clinic/blob/54ce001d3fad2c18bd9c01dcf9b2907dda3a6448/interface/frontend/src/components/open-image/OpenDICOM.vue#L104-L112

  • You need to enable mouseWheelInput or your stackScrollWheel tool will not work:
cornerstoneTools.mouseWheelInput.enable(element)
  • You have both windowing and stack scrolling bound to the left mouse button, so it will probably act very strange

Hope that helps!

Merged in 4d867a0 :)