@ohif/app 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +207 -0
  3. package/package.json +110 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Open Health Imaging Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ <!-- prettier-ignore-start -->
2
+ <!-- markdownlint-disable -->
3
+ <div align="center">
4
+ <h1>@ohif/app</h1>
5
+ <p><strong>@ohif/app</strong> is a zero-footprint medical image viewer provided by the <a href="https://ohif.org/">Open Health Imaging Foundation (OHIF)</a>. It is a configurable and extensible progressive web application with out-of-the-box support for image archives which support <a href="https://www.dicomstandard.org/dicomweb/">DICOMweb</a>.</p>
6
+ </div>
7
+
8
+
9
+ <div align="center">
10
+ <a href="https://docs.ohif.org/"><strong>Read The Docs</strong></a> |
11
+ <a href="https://github.com/OHIF/Viewers/tree/master/docs/latest">Edit the docs</a>
12
+ </div>
13
+ <div align="center">
14
+ <a href="https://docs.ohif.org/demo">Demo</a> |
15
+ <a href="https://react.ohif.org/">Component Library</a>
16
+ </div>
17
+
18
+
19
+ <hr />
20
+
21
+ [![NPM version][npm-version-image]][npm-url]
22
+ [![NPM downloads][npm-downloads-image]][npm-url]
23
+ [![Pulls][docker-pulls-img]][docker-image-url]
24
+ [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
25
+ [![MIT License][license-image]][license-url]
26
+ <!-- markdownlint-enable -->
27
+ <!-- prettier-ignore-end -->
28
+
29
+ > ATTENTION: If you are looking for Version 1 (the Meteor Version) of this
30
+ > repository, it lives on
31
+ > [the `v1.x` branch](https://github.com/OHIF/Viewers/tree/v1.x)
32
+
33
+ ## Why?
34
+
35
+ Building a web based medical imaging viewer from scratch is time intensive, hard
36
+ to get right, and expensive. Instead of re-inventing the wheel, you can use the
37
+ OHIF Viewer as a rock solid platform to build on top of. The Viewer is a
38
+ [React][react-url] [Progressive Web Application][pwa-url] that can be embedded
39
+ in existing applications via it's [packaged source
40
+ (ohif-viewer)][ohif-viewer-url] or hosted stand-alone. The Viewer exposes
41
+ [configuration][configuration-url] and [extensions][extensions-url] to support
42
+ workflow customization and advanced functionality at common integration points.
43
+
44
+ If you're interested in using the OHIF Viewer, but you're not sure it supports
45
+ your use case [check out our docs](https://docs.ohif.org/). Still not sure, or
46
+ you would like to propose new features? Don't hesitate to
47
+ [create an issue](https://github.com/OHIF/Viewers/issues) or open a pull
48
+ request.
49
+
50
+ ## Getting Started
51
+
52
+ This readme is specific to testing and developing locally. If you're more
53
+ interested in production deployment strategies,
54
+ [you can check out our documentation on publishing](https://docs.ohif.org/).
55
+
56
+ Want to play around before you dig in?
57
+ [Check out our LIVE Demo](https://viewer.ohif.org/)
58
+
59
+ ### Setup
60
+
61
+ _Requirements:_
62
+
63
+ - [NodeJS & NPM](https://nodejs.org/en/download/)
64
+ - [Yarn](https://yarnpkg.com/lang/en/docs/install/)
65
+
66
+ _Steps:_
67
+
68
+ 1. Fork this repository
69
+ 2. Clone your forked repository (your `origin`)
70
+
71
+ - `git clone git@github.com:YOUR_GITHUB_USERNAME/Viewers.git`
72
+
73
+ 3. Add `OHIF/Viewers` as a `remote` repository (the `upstream`)
74
+
75
+ - `git remote add upstream git@github.com:OHIF/Viewers.git`
76
+
77
+ ### Developing Locally
78
+
79
+ In your cloned repository's root folder, run:
80
+
81
+ ```js
82
+ // Restore dependencies
83
+ yarn install
84
+
85
+ // Stands up local server to host Viewer.
86
+ // Viewer connects to our public cloud PACS by default
87
+ yarn start
88
+ ```
89
+
90
+ For more advanced local development scenarios, like using your own locally
91
+ hosted PACS and test data,
92
+ [check out our Essential: Getting Started](https://docs.ohif.org/getting-started.html)
93
+ guide.
94
+
95
+ ### E2E Tests
96
+
97
+ Using [Cypress](https://www.cypress.io/) to create End-to-End tests and check
98
+ whether the application flow is performing correctly, ensuring that the
99
+ integrated components are working as expected.
100
+
101
+ #### Why Cypress?
102
+
103
+ Cypress is a next generation front end testing tool built for the modern web.
104
+ With Cypress is easy to set up, write, run and debug tests
105
+
106
+ It allow us to write different types of tests:
107
+
108
+ - End-to-End tests
109
+ - Integration tests
110
+ - Unit tets
111
+
112
+ All tests must be in `./cypress/integration` folder.
113
+
114
+ Commands to run the tests:
115
+
116
+ ```js
117
+ // Open Cypress Dashboard that provides insight into what happened when your tests ran
118
+ yarn run cy
119
+
120
+ // Run all tests using Electron browser headless
121
+ yarn run cy:run
122
+
123
+ // Run all tests in CI mode
124
+ yarn run cy:run:ci
125
+ ```
126
+
127
+ ### Contributing
128
+
129
+ > Large portions of the Viewer's functionality are maintained in other
130
+ > repositories. To get a better understanding of the Viewer's architecture and
131
+ > "where things live", read
132
+ > [our docs on the Viewer's architecture](https://docs.ohif.org/architecture/index.html#overview)
133
+
134
+ It is notoriously difficult to setup multiple dependent repositories for
135
+ end-to-end testing and development. That's why we recommend writing and running
136
+ unit tests when adding and modifying features. This allows us to program in
137
+ isolation without a complex setup, and has the added benefit of producing
138
+ well-tested business logic.
139
+
140
+ 1. Clone this repository
141
+ 2. Navigate to the project directory, and `yarn install`
142
+ 3. To begin making changes, `yarn run dev`
143
+ 4. To commit changes, run `yarn run cm`
144
+
145
+ When creating tests, place the test file "next to" the file you're testing.
146
+ [For example](https://github.com/OHIF/Viewers/blob/master/src/utils/index.test.js):
147
+
148
+ ```js
149
+ // File
150
+ index.js;
151
+
152
+ // Test for file
153
+ index.test.js;
154
+ ```
155
+
156
+ As you add and modify code, `jest` will watch for uncommitted changes and run
157
+ your tests, reporting the results to your terminal. Make a pull request with
158
+ your changes to `master`, and a core team member will review your work. If you
159
+ have any questions, please don't hesitate to reach out via a GitHub issue.
160
+
161
+ ## Contributors
162
+
163
+ Thanks goes to these wonderful people
164
+ ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
165
+
166
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
167
+ <!-- prettier-ignore -->
168
+ <table><tr><td align="center"><a href="https://github.com/swederik"><img src="https://avatars3.githubusercontent.com/u/607793?v=4" width="100px;" alt="Erik Ziegler"/><br /><sub><b>Erik Ziegler</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=swederik" title="Code">💻</a> <a href="#infra-swederik" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td><td align="center"><a href="https://github.com/evren217"><img src="https://avatars1.githubusercontent.com/u/4920551?v=4" width="100px;" alt="Evren Ozkan"/><br /><sub><b>Evren Ozkan</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=evren217" title="Code">💻</a></td><td align="center"><a href="https://github.com/galelis"><img src="https://avatars3.githubusercontent.com/u/2378326?v=4" width="100px;" alt="Gustavo André Lelis"/><br /><sub><b>Gustavo André Lelis</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=galelis" title="Code">💻</a></td><td align="center"><a href="http://dannyrb.com/"><img src="https://avatars1.githubusercontent.com/u/5797588?v=4" width="100px;" alt="Danny Brown"/><br /><sub><b>Danny Brown</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=dannyrb" title="Code">💻</a> <a href="#infra-dannyrb" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td><td align="center"><a href="https://github.com/all-contributors/all-contributors-bot"><img src="https://avatars3.githubusercontent.com/u/46843839?v=4" width="100px;" alt="allcontributors[bot]"/><br /><sub><b>allcontributors[bot]</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=allcontributors" title="Documentation">📖</a></td><td align="center"><a href="https://www.linkedin.com/in/siliconvalleynextgeneration/"><img src="https://avatars0.githubusercontent.com/u/1230575?v=4" width="100px;" alt="Esref Durna"/><br /><sub><b>Esref Durna</b></sub></a><br /><a href="#question-EsrefDurna" title="Answering Questions">💬</a></td><td align="center"><a href="https://github.com/diego0020"><img src="https://avatars3.githubusercontent.com/u/7297450?v=4" width="100px;" alt="diego0020"/><br /><sub><b>diego0020</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=diego0020" title="Code">💻</a></td></tr><tr><td align="center"><a href="https://github.com/dlwire"><img src="https://avatars3.githubusercontent.com/u/1167291?v=4" width="100px;" alt="David Wire"/><br /><sub><b>David Wire</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=dlwire" title="Code">💻</a></td><td align="center"><a href="https://github.com/jfmedeiros1820"><img src="https://avatars1.githubusercontent.com/u/2211708?v=4" width="100px;" alt="João Felipe de Medeiros Moreira"/><br /><sub><b>João Felipe de Medeiros Moreira</b></sub></a><br /><a href="https://github.com/OHIF/Viewers/commits?author=jfmedeiros1820" title="Tests">⚠️</a></td></tr></table>
169
+
170
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
171
+
172
+ This project follows the
173
+ [all-contributors](https://github.com/all-contributors/all-contributors)
174
+ specification. Contributions of any kind welcome!
175
+
176
+ ## License
177
+
178
+ MIT © [OHIF](https://github.com/OHIF)
179
+
180
+ <!--
181
+ Links:
182
+ -->
183
+
184
+ <!-- prettier-ignore-start -->
185
+ [npm-url]: https://npmjs.org/package/ohif-viewer
186
+ [npm-downloads-image]: https://img.shields.io/npm/dm/ohif-viewer.svg?style=flat-square
187
+ [npm-version-image]: https://img.shields.io/npm/v/ohif-viewer.svg?style=flat-square
188
+ [docker-pulls-img]: https://img.shields.io/docker/pulls/ohif/viewer.svg?style=flat-square
189
+ [docker-image-url]: https://hub.docker.com/r/ohif/viewer
190
+ [all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square
191
+ [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
192
+ [license-url]: LICENSE
193
+ <!-- DOCS -->
194
+ [react-url]: https://reactjs.org/
195
+ [pwa-url]: https://developers.google.com/web/progressive-web-apps/
196
+ [ohif-viewer-url]: https://www.npmjs.com/package/ohif-viewer
197
+ [configuration-url]: https://docs.ohif.org/configuring/
198
+ [extensions-url]: https://docs.ohif.org/extensions
199
+ <!-- Misc. -->
200
+ [react-viewer]: https://github.com/OHIF/Viewers/tree/react
201
+ <!-- Issue Boilerplate -->
202
+ [bugs]: https://github.com/OHIF/Viewers/labels/bug
203
+ [requests-feature]: https://github.com/OHIF/Viewers/labels/enhancement
204
+ [good-first-issue]: https://github.com/OHIF/Viewers/labels/good%20first%20issue
205
+ [google-group]: https://groups.google.com/forum/#!forum/cornerstone-platform
206
+
207
+ <!-- prettier-ignore-end -->
package/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "name": "@ohif/app",
3
+ "version": "3.0.0",
4
+ "productVersion": "3.4.0",
5
+ "description": "OHIF Viewer",
6
+ "author": "OHIF Contributors",
7
+ "license": "MIT",
8
+ "repository": "OHIF/Viewers",
9
+ "main": "dist/index.umd.js",
10
+ "module": "src/index.js",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "engines": {
15
+ "node": ">=14",
16
+ "npm": ">=6",
17
+ "yarn": ">=1.16.0"
18
+ },
19
+ "proxy": "http://localhost:8042",
20
+ "scripts": {
21
+ "build:viewer": "cross-env NODE_ENV=production yarn run build",
22
+ "build:dev": "cross-env NODE_ENV=development yarn run build",
23
+ "build:aws": "cross-env NODE_ENV=development APP_CONFIG=config/aws_static.js yarn run build && gzip -9 -r dist",
24
+ "build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/ APP_CONFIG=config/netlify.js QUICK_BUILD=false yarn run build",
25
+ "build:viewer:qa": "cross-env NODE_ENV=production APP_CONFIG=config/google.js yarn run build",
26
+ "build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=false yarn run build",
27
+ "build": "node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
28
+ "dev": "cross-env NODE_ENV=development webpack serve --config .webpack/webpack.pwa.js",
29
+ "dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=/dicom-web PROXY_DOMAIN=http://localhost:8042 APP_CONFIG=config/docker_nginx-orthanc.js webpack serve --config .webpack/webpack.pwa.js",
30
+ "dev:dcm4chee": "cross-env NODE_ENV=development APP_CONFIG=config/local_dcm4chee.js webpack serve --config .webpack/webpack.pwa.js",
31
+ "dev:static": "cross-env NODE_ENV=development APP_CONFIG=config/local_static.js webpack serve --config .webpack/webpack.pwa.js",
32
+ "dev:viewer": "yarn run dev",
33
+ "preinstall": "node preinstall.js",
34
+ "start": "yarn run dev",
35
+ "test:e2e": "cypress open",
36
+ "test:e2e:ci": "percy exec -- cypress run --config video=false --record --browser chrome --spec 'cypress/integration/visual-regression/**/*'",
37
+ "test:e2e:local": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'",
38
+ "test:e2e:dist": "start-server-and-test test:e2e:serve http://localhost:3000 test:e2e:ci",
39
+ "test:e2e:serve": "cross-env APP_CONFIG=config/e2e.js yarn start",
40
+ "test:unit": "jest --watchAll",
41
+ "test:unit:ci": "jest --ci --runInBand --collectCoverage",
42
+ "ci:generateSuccessVersion": "node -p -e \"require('./package.json').version\" > success_version.txt"
43
+ },
44
+ "files": [
45
+ "dist",
46
+ "README.md"
47
+ ],
48
+ "dependencies": {
49
+ "@babel/runtime": "^7.20.13",
50
+ "@ohif/core": "^3.0.0",
51
+ "@ohif/extension-cornerstone": "^3.0.0",
52
+ "@ohif/extension-cornerstone-dicom-seg": "^3.0.0",
53
+ "@ohif/extension-cornerstone-dicom-sr": "^3.0.0",
54
+ "@ohif/extension-cornerstone-dicom-rt": "^3.0.0",
55
+ "@ohif/extension-default": "^3.0.0",
56
+ "@ohif/extension-dicom-pdf": "^3.0.1",
57
+ "@ohif/extension-dicom-video": "^3.0.1",
58
+ "@ohif/extension-dicom-microscopy": "^3.0.0",
59
+ "@ohif/extension-test": "0.0.1",
60
+ "@ohif/i18n": "^1.0.0",
61
+ "@ohif/mode-basic-dev-mode": "^3.0.0",
62
+ "@ohif/mode-test": "^0.0.1",
63
+ "@ohif/mode-longitudinal": "^3.0.0",
64
+ "@ohif/mode-microscopy": "^3.0.0",
65
+ "@ohif/ui": "^2.0.0",
66
+ "@types/react": "^17.0.38",
67
+ "classnames": "^2.3.2",
68
+ "core-js": "^3.16.1",
69
+ "cornerstone-math": "^0.1.9",
70
+ "@cornerstonejs/dicom-image-loader": "^0.6.8",
71
+ "@cornerstonejs/codec-charls": "^1.2.3",
72
+ "@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
73
+ "@cornerstonejs/codec-openjpeg": "^1.2.2",
74
+ "@cornerstonejs/codec-openjph": "^2.4.2",
75
+ "dcmjs": "^0.29.5",
76
+ "detect-gpu": "^4.0.16",
77
+ "dicom-parser": "^1.8.9",
78
+ "dotenv-webpack": "^1.7.0",
79
+ "hammerjs": "^2.0.8",
80
+ "history": "^5.3.0",
81
+ "i18next": "^17.0.3",
82
+ "i18next-browser-languagedetector": "^3.0.1",
83
+ "lodash.isequal": "4.5.0",
84
+ "oidc-client": "1.11.5",
85
+ "prop-types": "^15.7.2",
86
+ "query-string": "^6.12.1",
87
+ "react": "^17.0.2",
88
+ "react-dom": "^17.0.2",
89
+ "react-dropzone": "^10.1.7",
90
+ "react-i18next": "^12.2.2",
91
+ "react-resize-detector": "^6.7.6",
92
+ "react-router": "^6.8.1",
93
+ "react-router-dom": "^6.8.1"
94
+ },
95
+ "devDependencies": {
96
+ "@babel/plugin-proposal-private-methods": "^7.18.6",
97
+ "@percy/cypress": "^3.1.1",
98
+ "cypress": "^12.6.0",
99
+ "cypress-file-upload": "^3.5.3",
100
+ "glob": "^8.0.3",
101
+ "identity-obj-proxy": "3.0.x",
102
+ "lodash": "^4.17.21",
103
+ "tailwindcss": "3.2.4",
104
+ "terser-webpack-plugin": "^5.1.1",
105
+ "webpack": "^5.50.0",
106
+ "webpack-bundle-analyzer": "^4.4.2",
107
+ "webpack-cli": "^4.7.2",
108
+ "webpack-merge": "^5.7.3"
109
+ }
110
+ }