Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7e2dcc4b6 | ||
|
|
3f7d29dd76 | ||
|
|
d46cccc652 | ||
|
|
38ea92d2a3 | ||
|
|
98c40bc607 | ||
|
|
51472b2276 | ||
|
|
63a9b3464d | ||
|
|
20d8f0f5db |
No files matched your search
@@ -27,4 +27,4 @@ mv platform/viewer/dist/* .netlify/www/pwa -v
|
|||||||
echo 'Nothing left to see here. Go home, folks.'
|
echo 'Nothing left to see here. Go home, folks.'
|
||||||
|
|
||||||
# Build using react-scripts
|
# Build using react-scripts
|
||||||
# npx cross-env PUBLIC_URL=/demo REACT_APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build
|
# npx cross-env PUBLIC_URL=/demo APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build
|
||||||
@@ -22,6 +22,7 @@ module.exports = {
|
|||||||
// https://babeljs.io/docs/en/options#babelrcroots
|
// https://babeljs.io/docs/en/options#babelrcroots
|
||||||
babelrcRoots: ['./platform/*', './extensions/*'],
|
babelrcRoots: ['./platform/*', './extensions/*'],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
'react-hot-loader/babel',
|
||||||
'inline-react-svg',
|
'inline-react-svg',
|
||||||
'@babel/plugin-proposal-class-properties',
|
'@babel/plugin-proposal-class-properties',
|
||||||
'@babel/plugin-proposal-object-rest-spread',
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Images can even be transcoded on the fly if this is desired.
|
|||||||
```bash
|
```bash
|
||||||
cd OHIFViewer
|
cd OHIFViewer
|
||||||
yarn install
|
yarn install
|
||||||
REACT_APP_CONFIG=config/google.js yarn run dev
|
APP_CONFIG=config/google.js yarn run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running via Docker
|
## Running via Docker
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ how to configure the project for your own imaging archive below.
|
|||||||
|
|
||||||
The configuration for our project is in the `/public/config` directory. Our
|
The configuration for our project is in the `/public/config` directory. Our
|
||||||
build process knows which configuration file to use based on the
|
build process knows which configuration file to use based on the
|
||||||
`REACT_APP_CONFIG` environment variable. By default, its value is
|
`APP_CONFIG` environment variable. By default, its value is
|
||||||
[`default.js`](https://github.com/OHIF/Viewers/blob/react/public/config/default.js).
|
[`default.js`](https://github.com/OHIF/Viewers/blob/react/public/config/default.js).
|
||||||
When we build, the `%REACT_APP_CONFIG%` value in
|
When we build, the `%APP_CONFIG%` value in
|
||||||
our[`/public/index.html`](https://github.com/OHIF/Viewers/blob/react/public/index.html#L12-L15)
|
our[`/public/index.html`](https://github.com/OHIF/Viewers/blob/react/public/index.html#L12-L15)
|
||||||
file is substituted for the correct configuration file's name. This sets
|
file is substituted for the correct configuration file's name. This sets
|
||||||
the`window.config` equal to our configuration file's value.
|
the`window.config` equal to our configuration file's value.
|
||||||
@@ -108,13 +108,13 @@ window.config = {
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can also create a new config file and specify its path relative to the build
|
You can also create a new config file and specify its path relative to the build
|
||||||
output's root by setting the `REACT_APP_CONFIG` environment variable. You can
|
output's root by setting the `APP_CONFIG` environment variable. You can
|
||||||
set the value of this environment variable a few different ways:
|
set the value of this environment variable a few different ways:
|
||||||
|
|
||||||
- [Add a temporary environment variable in your shell](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-temporary-environment-variables-in-your-shell)
|
- [Add a temporary environment variable in your shell](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-temporary-environment-variables-in-your-shell)
|
||||||
- [Add environment specific variables in `.env` file(s)](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env)
|
- [Add environment specific variables in `.env` file(s)](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env)
|
||||||
- Using the `cross-env` package in an npm script:
|
- Using the `cross-env` package in an npm script:
|
||||||
- `"build": "cross-env REACT_APP_CONFIG=config/my-config.js react-scripts build"`
|
- `"build": "cross-env APP_CONFIG=config/my-config.js react-scripts build"`
|
||||||
|
|
||||||
After updating the configuration, `yarn run build:web` to generate updated build
|
After updating the configuration, `yarn run build:web` to generate updated build
|
||||||
output.
|
output.
|
||||||
|
|||||||
@@ -124,10 +124,10 @@ likely want to update:
|
|||||||
The OHIF Viewer's configuration is imported from a static `.js` file and made
|
The OHIF Viewer's configuration is imported from a static `.js` file and made
|
||||||
available globally at `window.config`. The configuration we use is set to a
|
available globally at `window.config`. The configuration we use is set to a
|
||||||
specific file when we build the viewer, and determined by the env variable:
|
specific file when we build the viewer, and determined by the env variable:
|
||||||
`REACT_APP_CONFIG`. You can see where we set its value in the `dockerfile` for
|
`APP_CONFIG`. You can see where we set its value in the `dockerfile` for
|
||||||
this solution:
|
this solution:
|
||||||
|
|
||||||
`ENV REACT_APP_CONFIG=config/docker_openresty-orthanc.js`
|
`ENV APP_CONFIG=config/docker_openresty-orthanc.js`
|
||||||
|
|
||||||
You can find the configuration we're using here:
|
You can find the configuration we're using here:
|
||||||
`/public/config/docker_openresty-orthanc.js`
|
`/public/config/docker_openresty-orthanc.js`
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ likely want to update:
|
|||||||
The OHIF Viewer's configuration is imported from a static `.js` file and made
|
The OHIF Viewer's configuration is imported from a static `.js` file and made
|
||||||
available globally at `window.config`. The configuration we use is set to a
|
available globally at `window.config`. The configuration we use is set to a
|
||||||
specific file when we build the viewer, and determined by the env variable:
|
specific file when we build the viewer, and determined by the env variable:
|
||||||
`REACT_APP_CONFIG`. You can see where we set its value in the `dockerfile` for
|
`APP_CONFIG`. You can see where we set its value in the `dockerfile` for
|
||||||
this solution:
|
this solution:
|
||||||
|
|
||||||
`ENV REACT_APP_CONFIG=config/docker_openresty-orthanc-keycloak.js`
|
`ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js`
|
||||||
|
|
||||||
You can find the configuration we're using here:
|
You can find the configuration we're using here:
|
||||||
`/public/config/docker_openresty-orthanc-keycloak.js`
|
`/public/config/docker_openresty-orthanc-keycloak.js`
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
The configuration for our project is in the `/public/config` directory. Our
|
The configuration for our project is in the `/public/config` directory. Our
|
||||||
build process knows which configuration file to use based on the
|
build process knows which configuration file to use based on the
|
||||||
`REACT_APP_CONFIG` environment variable. By default, its value is
|
`APP_CONFIG` environment variable. By default, its value is
|
||||||
[`default.js`](https://github.com/OHIF/Viewers/blob/react/public/config/default.js).
|
[`default.js`](https://github.com/OHIF/Viewers/blob/react/public/config/default.js).
|
||||||
When we build, the `%REACT_APP_CONFIG%` value in
|
When we build, the `%APP_CONFIG%` value in
|
||||||
our[`/public/index.html`](https://github.com/OHIF/Viewers/blob/react/public/index.html#L12-L15)
|
our[`/public/index.html`](https://github.com/OHIF/Viewers/blob/react/public/index.html#L12-L15)
|
||||||
file is substituted for the correct configuration file's name. This sets the
|
file is substituted for the correct configuration file's name. This sets the
|
||||||
`window.config` equal to our configuration file's value.
|
`window.config` equal to our configuration file's value.
|
||||||
@@ -44,13 +44,13 @@ window.config = {
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can also create a new config file and specify its path relative to the build
|
You can also create a new config file and specify its path relative to the build
|
||||||
output's root by setting the `REACT_APP_CONFIG` environment variable. You can
|
output's root by setting the `APP_CONFIG` environment variable. You can
|
||||||
set the value of this environment variable a few different ways:
|
set the value of this environment variable a few different ways:
|
||||||
|
|
||||||
- [Add a temporary environment variable in your shell](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-temporary-environment-variables-in-your-shell)
|
- [Add a temporary environment variable in your shell](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-temporary-environment-variables-in-your-shell)
|
||||||
- [Add environment specific variables in `.env` file(s)](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env)
|
- [Add environment specific variables in `.env` file(s)](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env)
|
||||||
- Using the `cross-env` package in an npm script:
|
- Using the `cross-env` package in an npm script:
|
||||||
- `"build": "cross-env REACT_APP_CONFIG=config/my-config.js react-scripts build"`
|
- `"build": "cross-env APP_CONFIG=config/my-config.js react-scripts build"`
|
||||||
|
|
||||||
After updating the configuration, `yarn run build:web` to generate updated build
|
After updating the configuration, `yarn run build:web` to generate updated build
|
||||||
output.
|
output.
|
||||||
@@ -87,16 +87,16 @@ is running the `dev:orthanc` script in our project's `package.json`. That script
|
|||||||
is:
|
is:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
cross-env PORT=5000 REACT_APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start
|
cross-env PORT=5000 APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start
|
||||||
```
|
```
|
||||||
|
|
||||||
- `cross-env` sets two environment variables
|
- `cross-env` sets two environment variables
|
||||||
- PORT: 5000
|
- PORT: 5000
|
||||||
- REACT_APP_CONFIG: `config/docker_nginx-orthanc.js`
|
- APP_CONFIG: `config/docker_nginx-orthanc.js`
|
||||||
- `react-scripts` runs it's `start` script. This is [the de-facto
|
- `react-scripts` runs it's `start` script. This is [the de-facto
|
||||||
way][cra-start] to run a "Create React App" in development mode.
|
way][cra-start] to run a "Create React App" in development mode.
|
||||||
|
|
||||||
The `REACT_APP_CONFIG` value tells our app which file to load on to
|
The `APP_CONFIG` value tells our app which file to load on to
|
||||||
`window.config`. By default, our app uses the file at
|
`window.config`. By default, our app uses the file at
|
||||||
`<project-root>/public/config/default.js`. Here is what that configuration looks
|
`<project-root>/public/config/default.js`. Here is what that configuration looks
|
||||||
like:
|
like:
|
||||||
|
|||||||
@@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.1...@ohif/extension-vtk@0.50.2) (2019-08-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Update vtk and viewport dependencies ([98c40bc](https://github.com/OHIF/Viewers/commit/98c40bc))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.0-alpha.10...@ohif/extension-vtk@0.50.1) (2019-08-14)
|
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.0-alpha.10...@ohif/extension-vtk@0.50.1) (2019-08-14)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ohif/extension-vtk
|
**Note:** Version bump only for package @ohif/extension-vtk
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-vtk",
|
"name": "@ohif/extension-vtk",
|
||||||
"version": "0.50.1",
|
"version": "0.50.2",
|
||||||
"description": "OHIF extension for VTK.js",
|
"description": "OHIF extension for VTK.js",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -48,15 +48,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"react-vtkjs-viewport": "0.0.9",
|
"react-vtkjs-viewport": "0.0.11",
|
||||||
"vtk.js": "^8.11.0"
|
"vtk.js": "^9.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ohif/core": "^0.50.1",
|
"@ohif/core": "^0.50.1",
|
||||||
"@ohif/ui": "^0.50.1",
|
"@ohif/ui": "^0.50.1",
|
||||||
"cornerstone-tools": "^3.13.0",
|
"cornerstone-tools": "^3.13.0",
|
||||||
"cornerstone-wado-image-loader": "^3.0.0",
|
"cornerstone-wado-image-loader": "^3.0.0",
|
||||||
"dcmjs": "^0.4.7",
|
"dcmjs": "^0.5.1",
|
||||||
"dicom-parser": "^1.8.3",
|
"dicom-parser": "^1.8.3",
|
||||||
"gh-pages": "^2.0.1",
|
"gh-pages": "^2.0.1",
|
||||||
"i18next": "^17.0.3",
|
"i18next": "^17.0.3",
|
||||||
|
|||||||
+1
-1
@@ -70,7 +70,7 @@
|
|||||||
"prettier": "^1.18.2",
|
"prettier": "^1.18.2",
|
||||||
"react": "^16.8.6",
|
"react": "^16.8.6",
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.8.6",
|
||||||
"react-scripts": "^3.0.1",
|
"react-hot-loader": "^4.12.11",
|
||||||
"redux-testkit": "^1.0.6",
|
"redux-testkit": "^1.0.6",
|
||||||
"shader-loader": "^1.3.1",
|
"shader-loader": "^1.3.1",
|
||||||
"style-loader": "^1.0.0",
|
"style-loader": "^1.0.0",
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ services:
|
|||||||
# - orthanc
|
# - orthanc
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- REACT_APP_CONFIG=config/local_dcm4chee
|
- APP_CONFIG=config/local_dcm4chee
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- dcm4che_default
|
- dcm4che_default
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ FROM node:11.2.0-slim as builder
|
|||||||
RUN mkdir /usr/src/app
|
RUN mkdir /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
ENV REACT_APP_CONFIG=config/docker_openresty-orthanc-keycloak.js
|
ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js
|
||||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
COPY package.json /usr/src/app/package.json
|
COPY package.json /usr/src/app/package.json
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ FROM node:11.2.0-slim as builder
|
|||||||
RUN mkdir /usr/src/app
|
RUN mkdir /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
ENV REACT_APP_CONFIG=config/docker_openresty-orthanc.js
|
ENV APP_CONFIG=config/docker_openresty-orthanc.js
|
||||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
COPY package.json /usr/src/app/package.json
|
COPY package.json /usr/src/app/package.json
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.3...@ohif/viewer@0.50.4) (2019-08-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.2...@ohif/viewer@0.50.3) (2019-08-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.1...@ohif/viewer@0.50.2) (2019-08-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.0-alpha.13...@ohif/viewer@0.50.1) (2019-08-14)
|
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.0-alpha.13...@ohif/viewer@0.50.1) (2019-08-14)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ohif/viewer
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/viewer",
|
"name": "@ohif/viewer",
|
||||||
"version": "0.50.1",
|
"version": "0.50.4",
|
||||||
"description": "OHIF Viewer",
|
"description": "OHIF Viewer",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
"@ohif/extension-dicom-html": "^0.50.1",
|
"@ohif/extension-dicom-html": "^0.50.1",
|
||||||
"@ohif/extension-dicom-microscopy": "^0.50.1",
|
"@ohif/extension-dicom-microscopy": "^0.50.1",
|
||||||
"@ohif/extension-dicom-pdf": "^0.50.1",
|
"@ohif/extension-dicom-pdf": "^0.50.1",
|
||||||
"@ohif/extension-vtk": "^0.50.1",
|
"@ohif/extension-vtk": "^0.50.2",
|
||||||
"@ohif/i18n": "^0.50.1",
|
"@ohif/i18n": "^0.50.1",
|
||||||
"@ohif/ui": "^0.50.1",
|
"@ohif/ui": "^0.50.1",
|
||||||
"@tanem/react-nprogress": "^1.1.25",
|
"@tanem/react-nprogress": "^1.1.25",
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
import { hot } from 'react-hot-loader/root';
|
||||||
|
|
||||||
import './config';
|
import './config';
|
||||||
|
|
||||||
// Polyfills
|
// Polyfills
|
||||||
// PWA Only?
|
// PWA Only?
|
||||||
import 'core-js/features/array/flat';
|
import 'core-js/features/array/flat';
|
||||||
@@ -194,5 +197,5 @@ function _makeAbsoluteIfNecessary(url, base_url) {
|
|||||||
return base_url + url;
|
return base_url + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App;
|
export default hot(App);
|
||||||
export { commandsManager, extensionManager, hotkeysManager };
|
export { commandsManager, extensionManager, hotkeysManager };
|
||||||
Reference in new issue
Block a user