drivendataorg / concept-to-clinic

ALCF Concept to Clinic Challenge
https://concepttoclinic.drivendata.org/
MIT License
367 stars 147 forks source link

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

Closed Serhiy-Shekhovtsov closed 7 years ago

Serhiy-Shekhovtsov commented 7 years ago

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

Serhiy-Shekhovtsov commented 7 years ago

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.

swederik commented 7 years ago

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

cornerstoneTools.mouseWheelInput.enable(element)

Hope that helps!

lamby commented 7 years ago

Merged in https://github.com/concept-to-clinic/concept-to-clinic/commit/4d867a08dd89529ff94e820a95659c6ef0ae52c6 :)