4.5 KiB
Data Source
After following the steps outlined in Getting Started, you'll notice that the OHIF Viewer has data for several studies and their images. You didn't add this data, so where is it coming from?
By default, the viewer is configured to connect to a remote server hosted by the nice folks over at dcmjs.org. While convenient for getting started, the time may come when you want to develop using your own data either locally or remotely.
Set up a local DICOM server
ATTENTION! Already have a remote or local server? Skip to the configuration section below.
While the OHIF Viewer can work with any data source, the easiest to configure are the ones that follow the DICOMWeb spec.
- Choose and install an Image Archive
- Upload data to your archive (e.g. with DCMTK's storescu or your archive's web interface)
- Keep the server running
For our purposes, we will be using Orthanc, but you can see a list of
other Open Source options below.
Requirements
...
Running Orthanc
# Runs orthanc so long as window remains open
yarn run orthanc:up
After running this command, you can access
Orthanc's web interface at http://127.0.0.1:8042 to
upload DICOM files.
You can see the docker-compose.yml file this command runs at
<project-root>/docker/Orthanc/, and more on Orthanc for Docker in Orthanc's
documentation.
Setting up OHIF Viewer with Orthanc as an example
Once you have Orthanc running with docker either with temporary data storage or persistent data storage we con move forward with the next steps.
-
Load orthanc with a dataset you might want to use. To upload data use http://localhost:8042/app/explorer.html.
orthanc is the username and password for orthanc docker
-
Go under http://localhost:8042/app/explorer.html#upload and upload your DICOM files there
-
After you load the data, open a new terminal tab in the
ohif-viewerdirectory and install all dependency packages via Yarn
yarn install
- Run the application using one of the available configuration files. the
following command assumes you are under the
rootfolder
export REACT_APP_CONFIG=$(cat ./config/local_orthanc.js)
yarn start
This uses the Custom Environment Variables of Create-React-App to pass in your configuration. The example above will not work on Windows. Please visit the link to read about how to set environment variables on Windows.
-
Launch the OHIF Viewer Study List by visiting http://localhost:3000/ in a web browser.
If everything is working correctly, you should see the Study List from your archive when you visit the Study List.
-
Double-click on a Study in the Study List to launch it in the Viewer
If everything is working correctly, you should see your study load into the Viewer.
Open Source DICOM Image Archives
| Archive | Installation |
|---|---|
| DCM4CHEE Archive 5.x | W/ Docker |
| Orthanc | W/ Docker |
| DICOMcloud (DICOM Web only) | Installation |
| OsiriX (Mac OSX only) | Desktop Client |
| Horos (Mac OSX only) | Desktop Client |
Feel free to make a Pull Request if you want to add to this list.