If you intend to contribute back changes, or if you would like to pull updates we make to the OHIF Viewer, then follow these steps:
- Fork the OHIF/Viewers repository
- Create a local clone of your fork
git clone https://github.com/YOUR-USERNAME/Viewers
- Add OHIF/Viewers as a remote repository labled
- Navigate to the cloned project's directory
git remote add upstream https://github.com/OHIF/Viewers.git
With this setup, you can now sync your fork to keep it up-to-date with the upstream (original) repository. This is called a "Triangular Workflow" and is common for Open Source projects. The GitHub blog has a good graphic that illustrates this setup.
Alternatively, if you intend to use the OHIF Viewer as a starting point, and you aren't as concerned with syncing updates, then follow these steps:
- Navigate to the OHIF/Viewers/tree/react repository and branch
Clone or download, and then
- Use the contents of the
.zipfile as a starting point for your viewer
NOTE: It is still possible to sync changes using this approach. However, submitting pull requests for fixes and features are best done with the separate, forked repository setup described in "Fork & Clone"
Navigate to the root of the project's directory in your terminal and run the following commands:
# Restore dependencies yarn install # Start local development server yarn start
You should see the following output:
Compiled successfully! You can now view ohif-viewer in the browser. Local: http://localhost:5000/ On Your Network: http://10.74.20.83:5000/ Note that the development build is not optimized. To create a production build, use yarn build.
More comprehensive guides for building and publishing can be found in our deployment docs
# Build static assets to host a PWA yarn run build:web # Build packaged output yarn run build:package
- If you receive a "No Studies Found" message and do not see your studies, try changing the Study Date filters to a wider range.
- If you see any errors in your server console, check the Troubleshooting page for more in depth advice.