More data-source fun
This commit is contained in:
parent
399c71b22c
commit
a0feaa3dad
@ -12,7 +12,7 @@ remotely.
|
|||||||
## Set up a local DICOM server
|
## Set up a local DICOM server
|
||||||
|
|
||||||
> ATTENTION! Already have a remote or local server? Skip to the
|
> ATTENTION! Already have a remote or local server? Skip to the
|
||||||
> [configuration section](#) below.
|
> [configuration section](#configuration-learn-more) below.
|
||||||
|
|
||||||
While the OHIF Viewer can work with any data source, the easiest to configure
|
While the OHIF Viewer can work with any data source, the easiest to configure
|
||||||
are the ones that follow the [DICOMWeb][dicom-web] spec.
|
are the ones that follow the [DICOMWeb][dicom-web] spec.
|
||||||
@ -31,63 +31,63 @@ For our purposes, we will be using `Orthanc`, but you can see a list of
|
|||||||
|
|
||||||
### Running Orthanc
|
### Running Orthanc
|
||||||
|
|
||||||
|
_Start Orthanc:_
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Runs orthanc so long as window remains open
|
# Runs orthanc so long as window remains open
|
||||||
yarn run orthanc:up
|
yarn run orthanc:up
|
||||||
```
|
```
|
||||||
|
|
||||||
After running this command, you can access
|
_Upload your first Study:_
|
||||||
[Orthanc's web interface](http://127.0.0.1:8042) at `http://127.0.0.1:8042` to
|
|
||||||
upload DICOM files.
|
1. Navigate to [Orthanc's web interface](http://localhost:8899) at
|
||||||
|
`http://localhost:8899` in a web browser.
|
||||||
|
2. In the top right corner, click "Upload"
|
||||||
|
3. Click "Select files to upload..." and select one or more DICOM files
|
||||||
|
4. Click "Start the upload"
|
||||||
|
|
||||||
|
#### Orthanc: Learn More
|
||||||
|
|
||||||
You can see the `docker-compose.yml` file this command runs at
|
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
|
[`<project-root>/docker/Nginx-Docker/`](#), and more on Orthanc for Docker in
|
||||||
documentation][orthanc-docker].
|
[Orthanc's documentation][orthanc-docker].
|
||||||
|
|
||||||
### Setting up OHIF Viewer with Orthanc as an example
|
### Connecting to Orthanc
|
||||||
|
|
||||||
Once you have Orthanc running with docker either with temporary data storage or
|
Now that we have a local Orthanc instance up and running, we need to configure
|
||||||
persistent data storage we con move forward with the next steps.
|
our web application to connect to it. Open a new terminal window, navigate to
|
||||||
|
this project's root directory, and run:
|
||||||
1. Load orthanc with a dataset you might want to use. To upload data use
|
|
||||||
[http://localhost:8042/app/explorer.html](http://localhost:8042/app/explorer.html).
|
|
||||||
|
|
||||||
**orthanc is the username and password for orthanc docker**
|
|
||||||
|
|
||||||
2. Go under
|
|
||||||
[http://localhost:8042/app/explorer.html#upload](http://localhost:8042/app/explorer.html#upload)
|
|
||||||
and upload your DICOM files there
|
|
||||||
|
|
||||||
3. After you load the data, open a new terminal tab in the `ohif-viewer`
|
|
||||||
directory and install all dependency packages via Yarn
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# If you haven't already, restore dependencies
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
|
# Run our dev command, but with the local orthanc config
|
||||||
|
yarn run dev:orthanc
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the application using one of the available configuration files. **the
|
#### Configuration: Learn More
|
||||||
following command assumes you are under the `root` folder**
|
|
||||||
|
|
||||||
```bash
|
> For more configuration fun, check out the
|
||||||
export REACT_APP_CONFIG=$(cat ./config/local_orthanc.js)
|
> [Essentials Configuration](./configuration.md) guide.
|
||||||
yarn start
|
|
||||||
|
Let's take a look at what's going on under the hood here. `yarn run dev:orthanc`
|
||||||
|
is running the `dev:orthanc` script in our project's `package.json`. That script
|
||||||
|
is:
|
||||||
|
|
||||||
|
```js
|
||||||
|
cross-env PORT=5000 REACT_APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start
|
||||||
```
|
```
|
||||||
|
|
||||||
This uses the
|
- `cross-env` sets two environment variables
|
||||||
[Custom Environment Variables of Create-React-App](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables)
|
- PORT: 5000
|
||||||
to pass in your configuration. The example above will not work on Windows.
|
- REACT_APP_CONFIG: `config/docker_nginx-orthanc.js`
|
||||||
Please visit the link to read about how to set environment variables on Windows.
|
- `react-scripts` runs it's `start` script. This is [the de-facto
|
||||||
|
way][cra-start] to run a "Create React App" in development mode.
|
||||||
|
|
||||||
4. Launch the OHIF Viewer Study List by visiting
|
The `REACT_APP_CONFIG` value tells our app which file to load on to
|
||||||
[http://localhost:3000/](http://localhost:3000/) in a web browser.
|
`window.config`. By default, our app uses the file at
|
||||||
|
`<project-root>/public/config/default.js`.
|
||||||
**If everything is working correctly, you should see the Study List from your
|
|
||||||
archive when you visit the Study List.**
|
|
||||||
|
|
||||||
5. 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
|
## Open Source DICOM Image Archives
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ _Feel free to make a Pull Request if you want to add to this list._
|
|||||||
[dcmjs-org]: https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado
|
[dcmjs-org]: https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado
|
||||||
[dicom-web]: https://en.wikipedia.org/wiki/DICOMweb
|
[dicom-web]: https://en.wikipedia.org/wiki/DICOMweb
|
||||||
[storescu]: http://support.dcmtk.org/docs/storescu.html
|
[storescu]: http://support.dcmtk.org/docs/storescu.html
|
||||||
|
[cra-start]: https://github.com/facebook/create-react-app#npm-start-or-yarn-start
|
||||||
<!-- Archives -->
|
<!-- Archives -->
|
||||||
[dcm4chee]: https://github.com/dcm4che/dcm4chee-arc-light
|
[dcm4chee]: https://github.com/dcm4che/dcm4chee-arc-light
|
||||||
[dcm4chee-docker]: https://github.com/dcm4che/dcm4chee-arc-light/wiki/Running-on-Docker
|
[dcm4chee-docker]: https://github.com/dcm4che/dcm4chee-arc-light/wiki/Running-on-Docker
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user