Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

Unable to open study in worklist; stuck loading

Open mtjvankuik opened this issue 10 years ago • 14 comments

After a while I succeeded in setting up the Orthanc server and meteor server. I uploaded some DICOM images into Orthanc, which I can confirm by going to localhost:8042. However, the Echo test in Orthanc fails. I did not follow the Orthanc tutorial, but the OHIF documentation from this link: https://github.com/OHIF/Viewers/wiki

I changed the paths in localhostOrthanc.json so that the cornerstone packages are found, and ran the shell script in OHIFViewer/bin/localhostOrthanc.sh

Whenever I run the meteor server, and go to to the worklist, all studies from the Orthanc server are correctly uploaded, including all parameters, except the modality tab. The following error message is shown in the orthanc terminal:

E0217 14:33:47.062190 OrthancInitialization.cpp:520] No modality with symbolic name: null

Did I forget to create a configuration file? Or to modify an existing one? Because all other parameters in my worklist are shown correctly. Also the modality parameter is displayed correctly in the Orthanc DICOM server, but not in the meteor server.

Any help would be greatly appreciated.

mtjvankuik avatar Feb 17 '16 14:02 mtjvankuik

Hi there,

We have the same issue with Modalities not displaying but haven't spent much time trying to solve it yet. Orthanc's built-in UI page uses their REST API, whereas we/you are using the Orthanc dicomweb plugin to retrieve the data. I'll post here if we find a solution for it.

Cheers,

Erik

swederik avatar Feb 17 '16 16:02 swederik

Could you try to pull from master again? There were some bugs in there that I fixed around the time of your post.

swederik avatar Feb 17 '16 16:02 swederik

Thanks for the headsup @swederik !

Something went wrong with cloning the project in Netbeans IDE. I had not made the OHIF clone a netbeans project yet. Apparently therefore I cannot pull the master at the moment. If you are really interested, I can still try to test the OHIF viewer. However, since I learned to make use of Netbeans IDE, it is kind of a necessity to be able to make a netbeans project out of the Viewer clone. So far I had some trouble with that.

I did not make a lot of changes, but I am leaning towards using the chafey cornerstone framework. I need a stable core to build my web application on. I did not know OHIF is still under such heavy development. My plans are to create a webapplication in which you can view DICOM images, perform statistics, enhance communication between multiple type of users and more.

Do you have any suggestions or pros/cons for using OHIF instead of the cornerstone framework?

mtjvankuik avatar Feb 18 '16 09:02 mtjvankuik

I just tried to run the application after your changes but I still got an error message inside the viewer.

mtjvankuik avatar Feb 18 '16 12:02 mtjvankuik

Cornerstone is a set of libraries for image viewing. What we are building here is an entire application using the Cornerstone libraries (see https://github.com/OHIF/Viewers/wiki).

Yes it is under heavy development. It is functional but many things will change and we don't have much documentation at the moment.

The current master branch is working, though (as far as I know). You can test it here:

http://viewer.ohif.org/ http://lesiontracker.ohif.org

What error did you receive?

swederik avatar Feb 18 '16 19:02 swederik

I've found out that my proxy is not set up correctly. Because of that I have no CORS enabled and my images won't load. Whenever I try to run the proxy server, I get the following error message (which means that the port is already in use):

Retrieving docker default machine IP address... ./setupLocalOrthanc.sh: line 3: docker-machine: command not found Copying nodeCORSProxy.example to nodeCORSProxy.js sed: can't read s/localhost:8042/:8042/g: No such file or directory Installing node http-proxy from npm... /home/martin └── [email protected]

npm WARN enoent ENOENT: no such file or directory, open '/home/martin/package.json' npm WARN martin No description npm WARN martin No repository field. npm WARN martin No README data npm WARN martin No license field. Running proxy server... In a separate tab/terminal, go to /main and run ./bin/localhostOrthanc.sh to start the Meteor server events.js:154 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::8042 at Object.exports._errnoException (util.js:856:11) at exports._exceptionWithHostPort (util.js:879:20) at Server._listen2 (net.js:1227:14) at listen (net.js:1263:10) at Server.listen (net.js:1359:5) at ProxyServer.listen (/home/martin/node_modules/http-proxy/lib/http-proxy/index.js:135:16) at Object. (/home/martin/NetBeansProjects/DRAsys/Viewers/etc/nodeCORSProxy.js:10:4) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32)

This is my proxy script: // This sets up a proxy to work around CORS. // See http://chafey.blogspot.be/2014/09/working-around-cors.html // For more information var http = require('http'), httpProxy = require('http-proxy');

var proxy = httpProxy.createProxyServer({ target: 'http://127.0.0.1:8042', auth: 'orthanc:orthanc' }).listen(8042);

proxy.on('proxyRes', function(proxyReq, req, res, options) { // add the CORS header to the response res.setHeader('Access-Control-Allow-Origin', '*'); });

proxy.on('error', function(e) { // suppress errors console.log(e); });

Do you have any suggestions?

mtjvankuik avatar Mar 02 '16 08:03 mtjvankuik

Are you running standalone Orthanc or inside Docker?

You can't proxy something on the same port and IP. Those examples were for Orthanc in Docker, and replaces localhost with the docker machine IP. For standalone Orthanc there is a file called OrthancProxy.js which you can run with node to use localhost port 8043 for requests to Orthanc.

Sorry for the confusion, the etc scripts need to be renamed and cleaned up.

swederik avatar Mar 02 '16 10:03 swederik

Thanks so much, that explains a lot. I have set-up a standalone Orthanc indeed. I'm still trying to get it working using the OrthancProxy. I replaced the .listen(8042) with .listen(8043) and running the proxy in the terminal with: node OrthancProxy.js. The CORS header is still missing when I check the console window in my browser.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8042/.....

mtjvankuik avatar Mar 02 '16 11:03 mtjvankuik

Ah yeah again my fault. The Meteor JSON config file should point to 8043 for WADO URI requests, since they need to go through the proxy.

swederik avatar Mar 02 '16 12:03 swederik

@swederik Thanks a lot! I just got it working with pointing the proxy to port 8043 for WADO URI requests. Now I can finally start building further on this existing framework. Once again, thanks for all your assistance. PS: Also it may be useful for future users to insert an additional .readme document in the config file or View folder to inform the necessary changes like changing the file point.

I also had to change the localhostOrthanc.sh in Viewers/OHIFViewer/bin to the following paths to built the server. It may be worth mentioning this as well in the readme, or change it in the repo in the future.

PACKAGE_DIRS="../../Packages" meteor --settings ../../config/localhostOrthanc.json

instead of

PACKAGE_DIRS="../Packages" meteor --settings ../config/localhostOrthanc.json

mtjvankuik avatar Mar 02 '16 13:03 mtjvankuik

Great! Glad to hear it.

The script change is just because you were running the .sh from the bin directory. I should make it more clear that we normally run those from the app's main directory (e.g. LesionTracker or OHIFViewer)

swederik avatar Mar 02 '16 13:03 swederik

I'll leave the issue open until our Wiki is updated.

swederik avatar Mar 02 '16 13:03 swederik

The wiki now states to run the scripts from one of the application directories (https://github.com/OHIF/Viewers/wiki/Getting-Started#getting-started).

swederik avatar Sep 02 '16 09:09 swederik

Hello Experts:

i do have install OHIF following all instructions Installed Docers , Meteor , And running OHIF The all study list list are appearing fine even in OHIF study list pages and orthonc webview also have list perfect BUT when i m clicking on image to view in DIcomViewer is just loading and nothing show to me , Please guid if i am missing any thing,

i did check my ports also open 8042, 4242, 3000 just stuck from last 2 weeks on same thing and tried my best at every point . same time i m check the logs there is no error i have attached couple image for more clear idea

docker

running_ohif

Nadeem123 avatar Mar 13 '17 21:03 Nadeem123