I'm testing Orthanc with the dwv viewer plugin. I uploaded a DICOM series with 362 instances and when I tried to launch the viewer I get the following error:
Error 500: Server Error Request Too Large
My sense is that the URI request is larger than the max expected value for the MongooseServer.
Have anybody found a similar problem? I don't have much experience with MongooseSever but I was wondering if there is a setting to increase the max request length.
As any Orthanc identifier has a length of 44 characters, this limits the size of the series DWV can display to about 180 instances (= 8000/44). According to this rough computation, any series that is made of more than 180 instances will result in an error.
At this point, you have two possibilities:
Ask Yves (DWV’s author) to support POST requests instead of GET requests. This will remove any limitation on the number of instances in the series.
The other solution could be to use HTML5 local storage. Storage can be shared between pages of the same origin so that means that the viewer is on the same server as Orthanc which is the case here. Would that be ok and solve this problem?
AFAIC, I would rather favor a handling of the POST body by the C/C++ plugin.
The callback could render a HTML page that would contain a dynamically generated JavaScript array that is filled with the instances identifiers that were found in the POST body.
OK, I'm looking into the dynamical JavaScript generation in the C/C++ plugin. Would you have any pointers to help/examples on the topic? I can put the array definition in a std::string but then, how do you 'append' it to the AnswerBuffer.
Ok, I have a working version on a branch: https://github.com/ivmartel/dwv-orthanc-plugin/tree/11-http-post.
Sébastien, I followed your advice, if you have a second to check it that would be nice.
If no one has problems with it, I will merge it into master.
You will find attached a patch to make your plugin work against the forthcoming Orthanc 0.9.5 release.
Unfortunately, I still get the same error when opening a CT series with about 500 images (by clicking on the “Series viewer” button):
By clicking on this button, a GET request is trigger (to an URL that still contains the full list of instances), instead of the POST request. I use the code in branch “11-http-post”.
Sorry, my mistake: I was not in the proper branch. Everything works fine!
You will find attached the patch against the right branch.
The only problem I see now is that when opening a large series, the spinner indicating the progress of the load process does not go from 1% to 100%, but is constantly reset to 1%.
Ok, all good then! I will first merge this branch, apply your patch and update dwv to the latest version. I will have a look at the progress and fix it in the next dwv release.
Hi, I've merged this branch in the master of the plugin and integrated the patch from Sébastien.
Until now, I was testing using Google Chrome and everything works if you allow pop-ups for the Orthanc server host. I realised that the view buttons do not work in Firefox. Does anyone know if it is an error in the code or some Firefox setting I am missing?