Osimis web viewer plugin on Linux

Hi,

I have installed and deployed orthanc on a ubuntu 16 (non docker) and i would like to add the osimis viewer, just like the binaries of windows, but i cannot find the plugin, binaries+compilation instructions.

Can anyone help me?

Hello,

Under Linux, you can use the Docker package by Osimis:
https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images

For instance:

sudo docker run -p 4242:4242 -p 8042:8042 --rm -e WVB_ENABLED=true osimis/orthanc:18.5.0

Or you can compile the plugin from source by yourself:
https://bitbucket.org/osimis/osimis-webviewer-plugin/src/master/

Sébastien-

Thanks for the info, but i still need help with the plugin. I want to try the nondocker version first, so the compile the plugin is the way i want to go.

I’ve tried the backend manual build:

cd backend/
$ mkdir build
$ cd build/
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DALLOW_DOWNLOADS=ON -DSTANDALONE_BUILD=ON
  -DSTATIC_BUILD=ON

The cmake has an error XXXXX-dirty.zip not found after downloading or not a zip file.

Could you explain me how to compile the plugin? I’m kinda lost in this

Hello,

In the Osimis Web viewer, you have to specify the “VIEWER_VERSION_FULL” argument instead of “STATIC_BUILD” while invoking CMake:

$ git clone https://bitbucket.org/osimis/osimis-webviewer-plugin.git
$ cd osimis-webviewer-plugin/
$ git checkout 1.1.0
$ cd backend/
$ mkdir build
$ cd build/
$ cmake … -DCMAKE_BUILD_TYPE=Debug -DSTANDALONE_BUILD=ON -DVIEWER_VERSION_FULL=1.1.0

$ make

HTH,
Sébastien-

Thanks, thanks and thanks again. Looks like that was the solution.

Sebastien, Alberto how are you?
I did similar installation on Centos 7 No Docker
I compile the basic Orthanc package.
Then I proceeded with the Oaimis Web Viewewr plugin as mentioned by Sebastien
But in the web login from a remote computer, what are the access credentials?
Or is a procedure missing?
Thanks and best regards

I don’t understand, are you talking about the login when you try to access to the osimis viewer?

I mean when you access in the browser: IP_OrthancServer: 8042 / app / explorer.html
The login of the Orthanc Secure Zone is displayed, and user and password are requested
I have tried modifying the Security-related options for the HTTP Server of the Configuration.json without success.
Perhaps it is because Mongoose Web Server is embedded with the Plugin?

best regards

As far as i know, orthanc has a “AuthenticationEnabled” field in Configuration.json (name might be different). If set to true, you will be asked a login in order to access the server. All the logins allowed are in the “RegisteredUsers” field in Configuration.json. Check it and tell us how it is.

That’s what I did and it did not work. I tried the same configurations that I tried when I installed other plugins like PostgreSQL, DICOMWeb, Orthanc Web Viewer

But in this case, that web authentication does not work

That surpass my knowledge about orthanc. Maybe it is something related to mangoose. Try disabling it. I can’t help you, sorry.

Did you make sure that “RemoteAccessAllowed” is set to true in your config file ?

Hi Alain
Yes, I copy the data:
Version of Orthanc 1.3.2
Plugin Osimis Viewer via https://bitbucket.org/osimis/osimis-webviewer-plugin.git

verbose LOG
[root@host151-147 Orthanc-1.3.2-Build]# ./Orthanc Configuration.json --verbose
W0524 10:08:10.781327 main.cpp:1298] Orthanc version: 1.3.2
W0524 10:08:10.781589 main.cpp:1146] Performance warning: Non-release build, runtime debug assertions are turned on
W0524 10:08:10.784258 OrthancInitialization.cpp:120] Reading the configuration from: “Configuration.json”
I0524 10:08:10.784740 Toolbox.cpp:1363] Using locale: “en_US.UTF-8” for case-insensitive comparison of strings
I0524 10:08:10.784900 Enumerations.cpp:1819] Default encoding for DICOM was changed to: Latin1
I0524 10:08:10.785174 FromDcmtkBridge.cpp:206] Using DCTMK version: 362
I0524 10:08:10.785267 FromDcmtkBridge.cpp:214] Loading the embedded dictionaries
I0524 10:08:10.810231 FromDcmtkBridge.cpp:226] Loading the embedded dictionary of private tags
I0524 10:08:10.825241 FromDcmtkBridge.cpp:2091] Registering JPEG Lossless codecs in DCMTK
I0524 10:08:10.825287 FromDcmtkBridge.cpp:2096] Registering JPEG codecs in DCMTK
W0524 10:08:10.862129 main.cpp:671] Loading plugin(s) from: /root/osimis-webviewer-plugin/backend/build/libOsimisWebViewer.so
W0524 10:08:11.199691 PluginsManager.cpp:269] Registering plugin ‘osimis-web-viewer’ (version 1.1.0.1.1.0-1.1.0)
W0524 10:08:11.199777 PluginsManager.cpp:168] Performance warning in Web viewer: Non-release build, runtime debug assertions are turned on
W0524 10:08:11.199794 PluginsManager.cpp:168] Initializing the Web viewer
W0524 10:08:11.225691 PluginsManager.cpp:168] Using GDCM instead of the DICOM decoder that is built in Orthanc
I0524 10:08:11.225754 OrthancPlugins.cpp:1111] Plugin has registered a callback to decode DICOM images (1 decoder(s) now active)
I0524 10:08:11.225785 OrthancPlugins.cpp:1038] Plugin has registered an OnChange callback
I0524 10:08:11.225803 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/images/?(.)
I0524 10:08:11.225967 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/series/?(.
)
I0524 10:08:11.226009 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/config.js?(.)
I0524 10:08:11.226046 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/studies/?(.
)
I0524 10:08:11.226086 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/languages/?(.)
I0524 10:08:11.226143 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /osimis-viewer/app/(.
)
W0524 10:08:11.226246 OrthancInitialization.cpp:1004] SQLite index directory: “OrthancStorage”
W0524 10:08:11.239750 OrthancInitialization.cpp:1074] Storage directory: “OrthancStorage”
I0524 10:08:11.245896 DatabaseWrapper.cpp:307] Version of the Orthanc database: 6
W0524 10:08:11.245945 HttpClient.cpp:686] No certificates are provided to validate peers, set “HttpsCACertificates” if you need to do HTTPS requests
I0524 10:08:11.245974 HttpClient.cpp:157] Setting the default timeout for HTTP client connections: 0 seconds
I0524 10:08:11.246039 HttpClient.cpp:141] Setting the default proxy for HTTP client connections:
I0524 10:08:11.246059 DicomUserConnection.cpp:1216] Default timeout for DICOM connections if Orthanc acts as SCU (client): 10 seconds (0 = no timeout)
I0524 10:08:11.251325 ServerIndex.cpp:365] Starting the database flushing thread (sleep = 10)
I0524 10:08:11.251330 ServerIndex.cpp:1888] Starting the monitor for stable resources (stable age = 60)
W0524 10:08:11.251593 ServerScheduler.cpp:135] The server scheduler has started
W0524 10:08:11.252193 LuaContext.cpp:103] Lua says: Lua toolbox installed
W0524 10:08:11.252297 ServerContext.cpp:182] Disk compression is disabled
I0524 10:08:11.252314 ServerContext.cpp:530] Storing MD5 for attachments: yes
W0524 10:08:11.252331 ServerIndex.cpp:1403] No limit on the number of stored patients
W0524 10:08:11.252388 ServerIndex.cpp:1420] No limit on the size of the storage area
I0524 10:08:11.253184 DicomServer.cpp:125] Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
W0524 10:08:11.254707 main.cpp:863] DICOM server listening with AET ORTHANC on port: 4242
I0524 10:08:11.254735 DicomServer.cpp:62] DICOM server started
I0524 10:08:11.254842 MongooseServer.cpp:1049] HTTP keep alive is disabled
W0524 10:08:11.254870 MongooseServer.cpp:1075] HTTP compression is enabled
I0524 10:08:11.254889 MongooseServer.cpp:948] Starting embedded Web server using Mongoose
W0524 10:08:11.271152 main.cpp:796] HTTP server listening on port: 8042
W0524 10:08:11.271218 main.cpp:683] Orthanc has started

Partial copy Configuratin.json:

“Plugins” : [
// Uncomment one of the following lines according to your platform.
// Update the path to the DLL on your system. The path is relative to the working folder
// Orthanc will start from. If you are unsure what the working folder is,
// use and absolute path

// “C:\Program Files (x86)\Orthanc\Orthanc Server 1.1.0\OsimisWebViewer.dll” // for Windows
“/root/osimis-webviewer-plugin/backend/build/libOsimisWebViewer.so”
// “libOsimisWebViewer.dylib” // for OSX
],

/**

  • Osimis WebViewer Configuration
    **/
    “WebViewer” : {
    // Show the download study button in the frontend.
    // You may want to disable this feature if you disable access to
    // the underlying REST route for authentication reasons.
    // Default: true
    “StudyDownloadEnabled”: true,

// Display MPEG-4 DICOM video (non-bd only) within the frontend. You
// may disable this feature if you disable access to the underlying
// REST route for authentication reasons.
// Default: true
“VideoDisplayEnabled”: true,

// Store image annotations made by users as Orthanc Attachment 9999 and
// retrieve them autommatically each time the viewer is opened.
// Default: false
“AnnotationStorageEnabled”: false,

// This option displays a button on each viewport. When the user clicks
// on the button, a new DICOM series is created with the image of the
// viewport, including the annotations. You must ensure your server allows
// large requests. You must also includes a new dicom tag in the
// dictionary (see the Dictionary json attribute below).
// Default: false
“KeyImageCaptureEnabled”: false,

// Store low/high quality images in a short term cache
“ShortTermCacheEnabled”: true,

// Path where the short term cache is stored
“ShortTermCachePath”: “/OrthancStorage/WebViewerCache”,

// Maximum size of the short term cache (in MB)
“ShortTermCacheSize”: 1000,

// Start pre-computing the low/high quality images as soon as they are
// received in Orthanc.
“ShortTermCachePrefetchOnInstanceStored”: false,

// Number of threads used by the short term cache to pre-compute the
// low/high quality images.
“ShortTermCacheThreads”: 4,

// Display cache debug logs (mainly for developers)
“ShortTermCacheDebugLogsEnabled”: false,

// Preload high quality images on the frontend before the user actually
// needs them
“HighQualityImagePreloadingEnabled”: true
}
}


/**

  • Security-related options for the HTTP server
    **/

// Whether remote hosts can connect to the HTTP server
“RemoteAccessAllowed” : true,

// Whether or not SSL is enabled
“SslEnabled” : false,

// Path to the SSL certificate in the PEM format (meaningful only if
// SSL is enabled)
“SslCertificate” : “certificate.pem”,

// Whether or not the password protection is enabled
“AuthenticationEnabled” : true,

// The list of the registered users. Because Orthanc uses HTTP
// Basic Authentication, the passwords are stored as plain text.
“RegisteredUsers” : {
// “alice” : “alicePassword”
“orthanc” : “orthanc”,
“root” : “my_passwd”
},

Remote login capture

Credentials not work
Ok button not work

Best regards

Everything looks good in your configuration. Note that the authentication is in now way related to the viewer.
Please try with/without AuthenticationEnabled=true, check the error message in the browser console/dev tools …

Auto Generated Inline Image 1.png

Ok, I set AuthenticationEnabled=false
Start service
and this is capture

I think your configuration file is not taken into account and therefore, it starts with the default value for “RemoteAccessAllowed” which is false → you get a 401 when accessing it from another computer.

Auto Generated Inline Image 1.png

Yes, I access from a remote computer that was from where I captured the login screen that I sent. I am in the same network 10.202.151.X.
When I try to leave the “RemoteAccessAllowed” in true the result is the same.
I thought as a hypothesis that the Mongoose only enabled local access (127.0.0.1) when observing in github:
orthanc / Core / HttpServer / MongooseServer.cpp


#define ORTHANC_REALM “Orthanc Secure Area”

static const long LOCALHOST = (127ll << 24) + 1ll;


Thousands of Orthanc are accessed everyday from remote computers so I guess there’s no bug in the code.
Have you checked that your configuration file was really taken into account ?

I fully agree with Alain: You are not using the right configuration file.

Yes thanks
If I think it’s possible,
I have compiled the sources of Orthanc 1.3.2 then built the Configration.json
Then download the Osimis Web Viewer sources and follow the Compilation procedure mentioned in this thread by Sebastien in response to Alberto.
I do not know if I should configure something in the frontend
The Orthanc Secure Area … checks users against the database for authentication?
I checked the permissions of the files and they are all ok.
When he did it with PostgreSQL he created the user.

Now this installation was without PostgreSQL or its plugin.

Is it possible that the access user is now managed by the SQLLite? Are any by default?

If I use Docker … Is the Configuration.json created the same as in a classic installation?
Attaching to the Container via bin / bash I manage to customize the Container with Modalities, AETs, and other modifiable parameters like the old style?

Best regards

In