Connecting to OHIF server remotely ?

327 views
Skip to first unread message

Stephen Douglas Scotti

unread,
Apr 28, 2020, 11:54:44 PM4/28/20
to cornerstone platform
I just installed an instance of OHIF on an UBUNTU server.  It is up and running, but I cannot connect to it remotely.  I can connect to it if I connect via a VNC connection and point the browser at localhost or 127.0.0.1.  I presume that that is related to the Node server not accepting connections except from the localhost.

I am sure there is a way to change that to 0.0.0.0, or whatever is necessary to accept connections from a remote host.   That is mainly for development purposes without any clinical images.

It is colocated with an instance of Orthanc, so I will want to configure that as well, but I see that that can be done through the env file and the config files, with some tweaking.  Also, speed is important, so if there are a couple of ways to connect OHIF to Orthanc, I would want the faster method.

Also, the setup we currently have is:

1.  A web app (PHP, MySQL, etc.), an Orthanc Server, and OHIF.  We are going to want some method to limit access to studies that a user is actually "authorized" to look at, probably based upon a unique ID

I just joined this forum and will probably have a number a questions.

Thanks.

Pedro Affonso

unread,
Apr 29, 2020, 1:06:25 AM4/29/20
to cornerstone platform
I'm not a specialist in ohif, but i had a similar problem a while ago while testing the viewer. My workaround was to build a docker image out of the code i had changed, along with the correct app-config.js file in the Dockerfile that's already available in the repository.

Another option is to run the public image of ohif and change the app-config.js file (which is located in /usr/share/nginx/html/app-config.js inside the container) and replace it using docker cp

Marc McLean

unread,
Apr 29, 2020, 7:14:46 AM4/29/20
to Stephen Douglas Scotti, cornerstone platform
Stephen,

Is your server behind a firewall?

Marc

--
You received this message because you are subscribed to the Google Groups "cornerstone platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cornerstone-plat...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cornerstone-platform/429e027d-d39d-4f3b-b130-859a4b768446%40googlegroups.com.


--
Marc McLean

Stephen Douglas Scotti

unread,
Apr 29, 2020, 8:23:38 AM4/29/20
to cornerstone platform
It is on a dedicated server, but the firewall is not active right now.  I can connect via ssh and vnc connection and then browse to localhost:3000, so it is running locally.  I actually do not see where there is a config file like app-config.js nor do I see where an nginx server is.

I followed the instructions here to install:

OHIF 2.0 installation

and had to install node.js, nvm and yarn to get it all working.  It does startup with yarn run dev, with quite a few warnings and such, but it works fine and connects to the public image server.  I know that there is away to specify listening ports and ip's for applications, so the base install in probably listening on localhost or 127.0.0.1, but on port 3000.

Marc McLean

unread,
Apr 29, 2020, 8:51:05 AM4/29/20
to Stephen Douglas Scotti, cornerstone platform
Can you connect remotely at http://<your_ip>:3000

Marc

--
You received this message because you are subscribed to the Google Groups "cornerstone platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cornerstone-plat...@googlegroups.com.


--
Marc McLean

Marc McLean

unread,
Apr 29, 2020, 9:02:53 AM4/29/20
to Stephen Douglas Scotti, cornerstone platform
Is port 3000 open on your Ubuntu server?
What does this show?
sudo ufw status
--
Marc McLean

Stephen Douglas Scotti

unread,
Apr 29, 2020, 9:51:41 AM4/29/20
to cornerstone platform
I was able to get it running and publicly accessible by:

1.  Stopping my native build I built with the instructions in the link in my previous post.
2.  Installing / running the Docker image:

docker pull ohif/viewer
# Downloaded newer image for ohif/viewer:latest
docker run -p 3000:80 ohif/viewer:latest

I am a newbie when it comes to running docker.  I have docker installed on UBUNTU.  If I want to do some development work, am I able to browse the files in the docker image and also modify them so that they persist, or will I need to use my build and somehow figure out how to configure it to be available publicly.  I do also have a running Orthanc instance, so I will want to configure OHIF to use the image database on the Orthanc server.

Once most of that is setup, I'm going to need to find a way to pre-process request for studies such that Orthanc and/or OHIF only display that studies that a user is authorized to see, with really 3 categories of users:

1.  Admin, can see the entire Orthanc archive, or possibly some subset based on a query to the Orthanc server.  The REST API for Orthanc allows you to make such queries in a number of ways, for example with tools/find, where you provide a JSON string of the items to filter on.

2.  Referring Physician.  Studies on Orthanc have searchable fields, e.g.:  So the Patient ID and Referring Physician ID's are unique, you could use that.  Otherwise, the StudyInstanceUID is supposedly globally unique, so it might be possible to use those to keep a list of which studies a user is authorized to view.  Within a single institution, search on the PatientID and the Referring doctor ID might suffice.

                    [ID] => 74518f67-e31ecfdc-880e84dc-f6a900c7-c3206219
                    [IsStable] => 1
                    [LastUpdate] => 20200426T233816
                    [MainDicomTags] => stdClass Object
                        (
                            [AccessionNumber] => 
                            [InstitutionName] => 
                            [ReferringPhysicianName] => LAST^FIRST^MIDDLE^ID
                            [StudyDate] => 
                            [StudyDescription] => 
                            [StudyID] => 512492059
                            [StudyInstanceUID] => 1.3.76.2.1.1.4.1.2.7211.512492059
                            [StudyTime] => 155425
                        )

                    [ParentPatient] => fa21ff2d-33e9b60a-daedf6a0-64d018da-682fd0a4
                    [PatientMainDicomTags] => stdClass Object
                        (
                            [PatientBirthDate] => 
                            [PatientID] => DEV0000001
                            [PatientName] => 
                            [PatientSex] => 
                        )

                    [Series] => Array
                        (
                            [0] => 4c9dac48-684b4dc8-696e4c39-07f57de0-faeca2bc
                            [1] => 3e2d7dd8-8767484b-9f30086d-1ed5f46a-34f0ab6b
                            [2] => ddae7fa0-7421cc1d-0a29822d-5d3a7c0c-4c1aa5a3
                            [3] => 705d9a40-77e4da23-d930f261-b2e7ba55-23b07064
                            [4] => da0c40e8-27c2efaf-c4cbb15f-29901035-f48b43c9
                        )

                    [Type] => Study
                )

3. Patient.

So I am really curious to know if there is a way to customize Orthanc and/or OHIF to server a subset of exams.

I've already figured out how to use the REST API to get the data set, and it is possible to view a single study in OHIF with just the uuid for the study.
But the OHIF viewer has a link back to the study list, which shows the entire database, at least with the default setup.

The OHIF viewer is relatively nice, although the Osimis Pro viewer seems a little faster and better in some ways. Unfortunately, I guess
that is going to be discontinued.

Thanks.

Augmented Reporting

unread,
Jun 26, 2022, 5:42:35 PM6/26/22
to cornerstone platform
Reply all
Reply to author
Forward
0 new messages