Pagination Tool

It looks like I have a partially working demo of a front-end for paginating studies on Orthanc. I am using the ServerFolders Plug-in and have the package running on that. It should work when using http://localhost:8042/browsestudies/index.html as explained below, although it can use a proxy. That requires tweaking a bit. The index.html file and the Python script have comments that help explain things.

I took a page from one of my projects and took out most code that is not relevant. The search tools and date tools do not work yet because I have not refactored those yet. That is a to do. Can probably do that client side now and then submit the query that way, so not hard. The search query is hardcoded in the index.html page, but you can change the pagenumber and the number or rows per page, and you can edit the hardcoded stuff to play around with it. The Python script actually returns the widget optionally. It is setup to return the Widget currently.

In the Config.json I have.

“ServeFolders” : {

“AllowCache” : false,
“GenerateETag” : true,
“Extensions” : {
“.mp4” : “video/mp4”,
“.pdf” : “application/pdf”,
“.ico” : “image/”,
“.php” : “application/x-httpd-php”
“Folders” : {
“/browsestudies” : “/Users/sscotti/Desktop/orthancAndPluginsOSX.stable/browsestudies”

With localhost, you should be able to point you browser to:


and see a screen like the attached image. I’ve only tested on my own server with about 10 studies. and the Widget might have some bugs with a large number of studies. I’d like to test it.

The .zip file contains a python plug-in also. That has to be installed as well. In the config.json, you’ll need the Python plug-in and:

“PythonScript” : “”,
“PythonVerbose” : true,

set up.

The set-up with a proxy server is a little trickier, but not too hard. I’m using NGINX as a proxy server.

If you are interested, I’d recommend trying it only on a dev server or maybe a docker image if the Python Plug-in and script can be installed.

I might just create a GitHub project if people are interested because I can’t upload much here.




Thanks for your contributions.

However, it would be much better to create dedicated GitHub projects, index them in the Orthanc Book and in the dedicated “OrthancContributed” repository, then make one single public announcement on this forum:

Please have a look at how Salim Kanoun communicates about OrthancToolsJS on this forum: This is a great balance that avoids cluttering this forum with many long messages that are hard to follow.



Thanks. I created a project on my Github account:

It should be easy to setup since there are very few files. Just the ServerFolders Setup and the Python script on the Orthanc Side.

Need to read up a bit about using Github. Also, not sure how to put an announcement in your repo ? Would be interesting benchmark the Python script somehow since it also now calculates the actual number of instances and the modalities with the study by iterating over all of the Series in the truncated result set. If the total number of rows returned is only about 20 -50 that doesn’t seem to be a big deal. It is really convenient to have an accurate instance count, as well of all of the modalities with the study.

Great, just indexed it in the Orthanc Book: