Compare commits

...

108 Commits

Author SHA1 Message Date
dannyrb
c322df482d chore(release): publish %s [skip ci]
- @ohif/extension-cornerstone@0.0.39-alpha.3
 - @ohif/extension-dicom-html@0.0.4-alpha.3
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.3
 - @ohif/extension-dicom-pdf@0.0.8-alpha.3
 - @ohif/extension-vtk@0.1.4-alpha.3
 - @ohif/core@0.11.1-alpha.3
 - @ohif/i18n@0.2.3-alpha.3
 - @ohif/ui@0.2.18-alpha.3
 - @ohif/viewer@0.0.22-alpha.4
2019-08-07 23:00:03 -04:00
dannyrb
5d0b80b801 Publish with canary tag 2019-08-07 22:54:02 -04:00
dannyrb
002488dc8a fix eslint issues caused by eslint 6 and our react-app config 2019-08-07 22:49:40 -04:00
dannyrb
a6c0be0797 chore(release): publish %s [skip ci]
- @ohif/extension-cornerstone@0.0.39-alpha.2
 - @ohif/extension-dicom-html@0.0.4-alpha.2
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.2
 - @ohif/extension-dicom-pdf@0.0.8-alpha.2
 - @ohif/extension-vtk@0.1.4-alpha.2
 - @ohif/core@0.11.1-alpha.2
 - @ohif/i18n@0.2.3-alpha.2
 - @ohif/ui@0.2.18-alpha.2
 - @ohif/viewer@0.0.22-alpha.3
2019-08-07 16:25:22 -04:00
dannyrb
f421d16e85 catch changes 2019-08-07 16:09:59 -04:00
dannyrb
a5baa9228c Fix build scripts 2019-08-07 16:06:44 -04:00
dannyrb
23372fbfbd Update package.jsons 2019-08-07 16:05:24 -04:00
dannyrb
d9d9aa1728 test lerna publish 2019-08-07 15:50:20 -04:00
dannyrb
b1657ac1ef chore(release): publish %s [skip ci]
- @ohif/viewer@0.0.22-alpha.2
2019-08-07 15:47:58 -04:00
dannyrb
ea45681d00 Add global prettier config 2019-08-07 15:22:39 -04:00
dannyrb
a97bd302f7 test version bump 2019-08-07 15:22:26 -04:00
dannyrb
e1542f50f8 chore(release): publish %s [skip ci]
- @ohif/extension-cornerstone@0.0.39-alpha.1
 - @ohif/extension-dicom-html@0.0.4-alpha.1
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.1
 - @ohif/extension-dicom-pdf@0.0.8-alpha.1
 - @ohif/extension-vtk@0.1.4-alpha.1
 - @ohif/core@0.11.1-alpha.1
 - @ohif/i18n@0.2.3-alpha.1
 - @ohif/ui@0.2.18-alpha.1
 - @ohif/viewer@0.0.22-alpha.1
2019-08-07 00:32:04 -04:00
dannyrb
abdbe9a608 Safer publish command 2019-08-07 00:24:27 -04:00
dannyrb
755da173ea ohif-core --> @ohif/core 2019-08-06 23:56:44 -04:00
dannyrb
8c5bd55f88 Remove unused/duplicate config files for projects/packages 2019-08-06 23:48:43 -04:00
dannyrb
e98611fc24 Redux testkit dep 2019-08-06 23:21:19 -04:00
dannyrb
fa0aa7f68e bump @ohif/core versions 2019-08-06 15:48:33 -04:00
dannyrb
30902bc048 Fix @ohif/ui versions 2019-08-06 15:37:44 -04:00
dannyrb
4b532183af Reduce duplicate code in @ohif/core 2019-08-06 15:03:43 -04:00
dannyrb
58b3727a2e Clean up ui and i18n config 2019-08-06 14:41:13 -04:00
dannyrb
d48e29d1bb Update UI project's docs 2019-08-06 14:31:01 -04:00
dannyrb
e47dcf27fc Clean duplicate code in UI project 2019-08-06 14:22:44 -04:00
dannyrb
60f48fbdc0 Tidy up project links 2019-08-06 13:58:43 -04:00
dannyrb
9a5372766c Clean up UI to set webpack scripts 2019-08-05 23:34:02 -04:00
dannyrb
e0cf337222 Remove old scripts 2019-08-05 23:28:12 -04:00
dannyrb
7db3bde95a Shift build command; satisfy default PWA build 2019-08-05 23:26:28 -04:00
dannyrb
b081e73297 Support for dev and dev:* commands 2019-08-05 23:15:07 -04:00
dannyrb
ce72d8bb15 Clean up primary readme 2019-08-05 22:32:36 -04:00
dannyrb
7ba2916cf5 chore(release): publish %s [skip ci]
- @ohif/extension-cornerstone@0.0.39-alpha.0
 - @ohif/extension-dicom-html@0.0.4-alpha.0
 - @ohif/extension-dicom-microscopy@0.0.9-alpha.0
 - @ohif/extension-dicom-pdf@0.0.8-alpha.0
 - @ohif/extension-vtk@0.1.4-alpha.0
 - @ohif/core@0.11.1-alpha.0
 - @ohif/i18n@0.2.3-alpha.0
 - @ohif/ui@0.2.18-alpha.0
 - @ohif/viewer@0.0.22-alpha.0
2019-08-05 14:45:09 -04:00
dannyrb
4736ad5620 Catch more updates 2019-08-05 14:44:45 -04:00
dannyrb
44f562e24c Adding note 2019-08-05 14:44:20 -04:00
dannyrb
8683e1e8ff Changing to scoped package names 2019-08-05 14:29:14 -04:00
dannyrb
f86eb5e8f2 Fix typo 2019-08-05 14:00:20 -04:00
dannyrb
64fd724455 Set default threshold 2019-08-05 13:52:02 -04:00
dannyrb
b2dfb6e0f7 Fix path; split PR and Merge unit tests into separate jobs 2019-08-05 13:04:27 -04:00
dannyrb
7c043b46b4 Try running with aliased folder 2019-08-05 12:54:23 -04:00
dannyrb
62932b3e80 Also upload core 2019-08-05 12:49:35 -04:00
dannyrb
7a7b2774e6 Try to see the contents of our cat'd file 2019-08-05 12:41:42 -04:00
dannyrb
1556b3bbf8 Fix filename 2019-08-05 12:37:01 -04:00
dannyrb
199db68674 Use home alias 2019-08-05 12:35:13 -04:00
dannyrb
d74b6fb826 long paths 2019-08-05 12:30:27 -04:00
dannyrb
aeac900496 Combine lines to reduce path 2019-08-05 12:26:29 -04:00
dannyrb
835fec7f32 Escape string literal 2019-08-05 12:23:10 -04:00
dannyrb
4c202ed064 tryfix syntax 2019-08-05 12:21:39 -04:00
dannyrb
e751e8fab8 Escape anchors 2019-08-05 12:12:27 -04:00
dannyrb
ae795ea97d Combine files before upload 2019-08-05 12:08:18 -04:00
dannyrb
d90c70cab5 Fix dir 2019-08-05 11:52:35 -04:00
dannyrb
1a8fd13896 Remove individual codecov calls 2019-08-05 11:52:09 -04:00
dannyrb
0026801b62 Use full string paths 2019-08-05 11:43:03 -04:00
dannyrb
395315ea4c Upload core and viewer 2019-08-05 11:39:10 -04:00
dannyrb
4664f673d6 Bump circleci version 2019-08-05 11:32:38 -04:00
dannyrb
a8c4534b33 Try using codecov orb 2019-08-05 11:07:14 -04:00
dannyrb
e4a3510c86 Simplify 2019-08-02 13:33:21 -04:00
dannyrb
d28f332312 Try fixing paths 2019-08-02 13:04:03 -04:00
dannyrb
37f60ba0af Generate example for codecov issue 2019-07-19 14:54:34 -04:00
dannyrb
d64cdc429e Shift back to calling codecov from root 2019-07-18 15:05:52 -04:00
dannyrb
e06e8304d3 Remove clear flag 2019-07-18 14:26:47 -04:00
dannyrb
0e862c69db Fix typo 2019-07-18 13:57:14 -04:00
dannyrb
fbdb61bcb2 Use recommended flags from issue comments for codecov 2019-07-18 13:52:27 -04:00
dannyrb
3acea218fb Trigger codecov after everything has finished running; these may not support flags 2019-07-18 13:40:31 -04:00
dannyrb
a521ce31ce Generate separate reports 2019-07-18 13:07:29 -04:00
dannyrb
67e2fd39a3 Add projects to split by flags 2019-07-18 12:53:24 -04:00
dannyrb
253620650b Try once relying on codecov yaml to split w/ flags 2019-07-18 12:43:03 -04:00
dannyrb
31357ea9b5 Run and report individually and in parallel 2019-07-18 10:26:33 -04:00
dannyrb
b8baae7c25 Get all platform unit tests to run 2019-07-17 14:57:50 -04:00
dannyrb
5544c57c37 Use cpx so our copying finishes? 2019-07-16 14:58:40 -04:00
dannyrb
6b523cb50d Add codecov flags 2019-07-16 14:51:04 -04:00
dannyrb
579c2b41d1 Set path and enable workspaces 2019-07-16 14:27:22 -04:00
dannyrb
9449ae4314 Try alternative jest transform 2019-07-16 14:23:41 -04:00
dannyrb
4386b5c960 Run version command instead of calling node directly 2019-07-16 14:14:34 -04:00
dannyrb
fe3ee3010f Try alternative jest-canvas-mock location and version file syntax 2019-07-16 14:06:02 -04:00
dannyrb
ee5530183e Lower version to match circleci image 2019-07-16 13:43:55 -04:00
dannyrb
413214786d Change copy syntax; try running tests on viewers from root for circleci 2019-07-16 13:31:52 -04:00
dannyrb
0b62b720c5 Attempt to fix ticks/escapes 2019-07-16 13:24:46 -04:00
dannyrb
c3fead1ca9 We need to pull cornerstone-wado-image-loader files from hoisted node_modules 2019-07-16 13:11:16 -04:00
dannyrb
bc8d505a0a We may have figured it out johnny, boy 2019-07-16 12:57:37 -04:00
dannyrb
ab4067144f and again 2019-07-16 12:50:33 -04:00
dannyrb
575d11ac5b Annd let's try again 2019-07-16 12:42:40 -04:00
dannyrb
aa53d3258c Try bash -l instead of exec bash 2019-07-16 12:19:51 -04:00
dannyrb
dc672bf38d Try swapping bash with a new shell 2019-07-16 12:11:21 -04:00
dannyrb
65a855d99b try again to set bin path 2019-07-16 11:12:19 -04:00
dannyrb
99c1d0220d Follow deploy log output advice 2019-07-16 10:43:01 -04:00
dannyrb
dab0b5e0e3 More agressive with modifying PATH 2019-07-16 10:35:06 -04:00
dannyrb
ea3f7d5657 Export node_modules path 2019-07-16 10:01:33 -04:00
dannyrb
3c812792bb Try to use global gitbook-cli 2019-07-16 09:55:34 -04:00
dannyrb
ff21408440 push workspace enabled to initial command; remove second yarn install; use npx to call gitbook cli commands 2019-07-16 09:42:43 -04:00
dannyrb
fd720bd4d7 Attempt to fix deploy preview build 2019-07-16 09:32:14 -04:00
dannyrb
2279e555a3 First attempt at a netlify deploy preview 2019-07-16 09:24:24 -04:00
dannyrb
91ee615aee Shift links to bottom of doc 2019-07-15 15:56:07 -04:00
dannyrb
f8d9bbef8a Rename example extension folder 2019-07-15 15:51:36 -04:00
dannyrb
4fcf544abe Begin providing basic readme info 2019-07-15 15:51:24 -04:00
dannyrb
2ba0e95fe8 Specify additional lerna config props 2019-07-15 15:51:10 -04:00
dannyrb
91564bfa06 Shift docs to root 2019-07-15 15:50:47 -04:00
dannyrb
83e627e5c9 Fix ESM symlink build for Viewers 2019-07-15 13:03:29 -04:00
dannyrb
2fbbb4a8e2 Push changes up to switch PCs 2019-07-11 13:12:37 -04:00
dannyrb
c05058a0f5 Better entrypoint for extensions 2019-07-09 12:56:08 -04:00
dannyrb
2429294dda Provide WebPack build options for microscopy, vtk, and ui 2019-07-09 12:39:15 -04:00
dannyrb
2234869b11 Add Webpack Stylus loader 2019-07-09 12:38:12 -04:00
dannyrb
96686850cb Target for UMD bundle 2019-07-09 12:37:58 -04:00
dannyrb
35dc82e120 Resolve viewer's modules 2019-07-09 12:37:02 -04:00
dannyrb
f5d6674b62 Make it possible to pass in extensions as App props 2019-07-08 10:18:03 -04:00
dannyrb
f3009c7a45 Consolidate how/where we specify file/module type entrypoints 2019-07-08 09:38:16 -04:00
dannyrb
e8969fba11 Split packages into platform and extensions 2019-07-08 00:41:25 -04:00
dannyrb
f175d4b96b Commit changes before a long weekend 2019-07-05 22:58:25 -04:00
dannyrb
e250ac0c50 Begin updating dependent libraries to use sync'd webpack builds w/ watches 2019-07-05 13:28:49 -04:00
dannyrb
3e1e456cc2 Move @babel dependencies up to workspace root 2019-07-04 20:35:30 -04:00
dannyrb
e58ba39a60 more shifting 2019-07-04 16:19:28 -04:00
dannyrb
b73ea99971 init 2019-07-04 16:12:43 -04:00
860 changed files with 64075 additions and 50384 deletions

View File

@ -1,19 +0,0 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"ie": "11"
}
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-regenerator",
"@babel/plugin-transform-runtime"
]
}

View File

@ -1,4 +1,4 @@
version: 2
version: 2.1
### ABOUT
#
@ -9,17 +9,26 @@ version: 2
# create pull request previews and to update `https://docs.ohif.org`
###
orbs:
codecov: codecov/codecov@1.0.5
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:10.15.1
- image: circleci/node:10.16.0
working_directory: ~/repo
jobs:
build_and_test:
PR_UNIT_TESTS:
<<: *defaults
steps:
# Download and cache dependencies
- checkout
# Enable yarn workspaces
- run: yarn config set workspaces-experimental true
# Checkout code and ALL Git Tags
- checkout:
post:
- git fetch --all
- restore_cache:
name: Restore Yarn and Cypress Package Cache
keys:
@ -35,19 +44,100 @@ jobs:
paths:
- ~/.cache ## Cache yarn and Cypress
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Build & Test
- run: yarn build:package:ci
# https://www.viget.com/articles/using-junit-on-circleci-2-0-with-jest-and-eslint/
# RUN TESTS
- run:
name: 'JavaScript Test Suite'
command: yarn test:unit:ci
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
# Store result
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit
name: "JavaScript Test Suite"
command: yarn run test:unit:ci
# PLATFORM/VIEWER
- run:
name: "VIEWER: Combine report output"
command: |
viewerCov="/home/circleci/repo/platform/viewer/coverage"
touch "${viewerCov}/reports"
cat "${viewerCov}/clover.xml" >> "${viewerCov}/reports"
echo "\<<\<<\<< EOF" >> "${viewerCov}/reports"
cat "${viewerCov}/lcov.info" >>"${viewerCov}/reports"
echo "\<<\<<\<< EOF" >> "${viewerCov}/reports"
- codecov/upload:
file: "/home/circleci/repo/platform/viewer/coverage/reports"
flags: "viewer"
# PLATFORM/CORE
- run:
name: "CORE: Combine report output"
command: |
coreCov="/home/circleci/repo/platform/core/coverage"
touch "${coreCov}/reports"
cat "${coreCov}/clover.xml" >> "${coreCov}/reports"
echo "\<<\<<\<< EOF" >> "${coreCov}/reports"
cat "${coreCov}/lcov.info" >> "${coreCov}/reports"
echo "\<<\<<\<< EOF" >> "${coreCov}/reports"
- codecov/upload:
file: "/home/circleci/repo/platform/core/coverage/reports"
flags: "core"
MERGE_UNIT_TESTS:
<<: *defaults
steps:
# Enable yarn workspaces
- run: yarn config set workspaces-experimental true
# Checkout code and ALL Git Tags
- checkout:
post:
- git fetch --all
- restore_cache:
name: Restore Yarn and Cypress Package Cache
keys:
# when lock file changes, use increasingly general patterns to restore cache
- yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-v1-{{ .Branch }}-
- yarn-packages-v1-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
paths:
- ~/.cache ## Cache yarn and Cypress
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
# RUN TESTS
- run:
name: "JavaScript Test Suite"
command: yarn run test:unit:ci
# PLATFORM/VIEWER
- run:
name: "VIEWER: Combine report output"
command: |
viewerCov="/home/circleci/repo/platform/viewer/coverage"
touch "${viewerCov}/reports"
cat "${viewerCov}/clover.xml" >> "${viewerCov}/reports"
echo "\<<\<<\<< EOF" >> "${viewerCov}/reports"
cat "${viewerCov}/lcov.info" >>"${viewerCov}/reports"
echo "\<<\<<\<< EOF" >> "${viewerCov}/reports"
- codecov/upload:
file: "/home/circleci/repo/platform/viewer/coverage/reports"
flags: "viewer"
# PLATFORM/CORE
- run:
name: "CORE: Combine report output"
command: |
coreCov="/home/circleci/repo/platform/core/coverage"
touch "${coreCov}/reports"
cat "${coreCov}/clover.xml" >> "${coreCov}/reports"
echo "\<<\<<\<< EOF" >> "${coreCov}/reports"
cat "${coreCov}/lcov.info" >> "${coreCov}/reports"
echo "\<<\<<\<< EOF" >> "${coreCov}/reports"
- codecov/upload:
file: "/home/circleci/repo/platform/core/coverage/reports"
flags: "core"
# Persist :+1:
- persist_to_workspace:
root: ~/repo
@ -167,7 +257,7 @@ jobs:
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Build & Test
- run:
name: 'Build Demo Site, Upload SourceMaps, Send Deploy Notification'
name: "Build Demo Site, Upload SourceMaps, Send Deploy Notification"
command: |
yarn build:demo:ci
perl -i -pe 's#</head>#`cat .circleci/rollbar.html` #e' build/index.html
@ -214,7 +304,7 @@ workflows:
# PULL REQUESTS
pull_requests:
jobs:
- build_and_test:
- PR_UNIT_TESTS:
filters:
branches:
ignore:
@ -225,13 +315,13 @@ workflows:
# MERGE TO MASTER
cut_release:
jobs:
- build_and_test:
- MERGE_UNIT_TESTS:
filters:
branches:
only: master
- e2e_test:
requires:
- build_and_test
- MERGE_UNIT_TESTS
# Update NPM
- npm_publish:
requires:

View File

@ -9,4 +9,15 @@ coverage:
project:
default:
threshold: 0.10%
core:
flags: core
viewer:
flags: viewer
patch: off
flags:
core:
paths:
- platform/core
viewer:
paths:
- platform/viewer

View File

@ -1,5 +1,10 @@
{
"extends": ["react-app", "eslint:recommended", "plugin:react/recommended"],
"extends": [
"react-app",
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"env": {
"jest": true

39
.gitattributes vendored
View File

@ -1,39 +0,0 @@
# These settings are for any web project
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf
# Windows forced line-endings
/.idea/* text eol=crlf
#
## These files are binary and should be left untouched
#
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
*.ez binary
*.bz2 binary
*.swp binary

40
.github/ISSUE_TEMPLATE/---bug-report.md vendored Normal file
View File

@ -0,0 +1,40 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: 'Bug Report :bug:'
assignees: ''
---
**Before Creating an issue**
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you search existing issues?
**Describe the bug**
*A clear and concise description of what the bug is.*
**Steps To Reproduce**
1. [First Step]
2. [Second Step]
3. ...
```
Please use code blocks to show formatted errors or code snippets
```
**Expected behavior**
*A clear and concise description of what you expected to happen.*
**Environment**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**

View File

@ -0,0 +1,18 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
## Awesome, do you have an idea? 😍
If you have a **feature request, improvement or idea**, check [our official roadmap](https://github.com/OHIF/react-viewerbase/projects) to see if it is already planned!
### 👉 &nbsp; [Go to Roadmap](https://github.com/OHIF/react-viewerbase/projects)
If your feature request isn't there, continue with this issue and we can discuss it 🤟
Please include the reasons why you think your change should be made, and any supporting evidence that helps us asses its value and priority.

View File

@ -0,0 +1,15 @@
---
name: "\U0001F917 Support Question"
about: "I have a question \U0001F4AC"
title: ''
labels: question
assignees: ''
---
We are a small team with limited resources. Your question is much more likely to be answered if it is [a good question](https://stackoverflow.com/help/how-to-ask)
**Description**
Questions can often be answered by our documentation. Unable to find an answer in our docs? We'll try to help. In the meantime, if you answer your own question, please respond with the answer here so that others may benefit as well. Better yet, open a PR to expand our docs ^_^

45
.jscsrc
View File

@ -1,45 +0,0 @@
{
"requireCurlyBraces": {
"keywords": [ "if", "else", "for", "while", "do" ],
"allExcept" : ["return" , "continue", "break"]
},
"requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return" ],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideParentheses": true,
"disallowKeywordsOnNewLine": ["else"],
"disallowNewlineBeforeBlockStatements": true,
"requirePaddingNewLinesAfterUseStrict": true,
"requirePaddingNewLinesAfterBlocks": {
"allExcept": ["inCallExpressions", "inArrayExpressions", "inProperties"]
},
"requireObjectKeysOnNewLine": true,
"requireSemicolons": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterComma": true,
"requireSpaceBeforeObjectValues": true,
"requireSpacesInsideObjectBrackets": "all",
"requireLineBreakAfterVariableAssignment": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowKeywords": [ "with" ],
"disallowMultipleLineBreaks": true,
"requireLineFeedAtFileEnd": true,
"disallowSpaceAfterObjectKeys": true,
"disallowQuotedKeysInObjects": true,
"disallowMultipleSpaces": true,
"disallowVar": true,
"validateLineBreaks": "LF",
"validateIndentation": 4,
"validateQuoteMarks": {
"mark": "'",
"escape": true
},
"validateParameterSeparator": ", ",
"requireDollarBeforejQueryAssignment": true
}

View File

@ -1,93 +0,0 @@
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : false, // true: Require {} for every new block or scope
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"latedef" : false, // true: Require variables/functions to be defined before being used
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
"noempty" : true, // true: Prohibit use of empty blocks
"nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` and `--`
"quotmark" : false, // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
// "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unused" : "vars", // Unused variables:
// true : all variables, last function parameter
// "vars" : all variables only
// "strict" : all variables, all function parameters
"strict" : false, // true: Requires all functions run in ES5 Strict Mode
"maxparams" : false, // {int} Max number of formal params allowed per function
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
"maxstatements" : false, // {int} Max number statements per function
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
"maxlen" : false, // {int} Max number of characters per line
"varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed.
// Relaxing
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
"es5" : true, // true: Allow ES5 syntax (ex: getters and setters)
"esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`)
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
// (ex: `for each`, multiple try/catch, function expression…)
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
"funcscope" : false, // true: Tolerate defining variables inside control statements
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
"iterator" : false, // true: Tolerate using the `__iterator__` property
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
"laxcomma" : false, // true: Tolerate comma-first style coding
"loopfunc" : false, // true: Tolerate functions being defined in loops
"multistr" : false, // true: Tolerate multi-line strings
"noyield" : false, // true: Tolerate generator functions with no yield statement in them.
"notypeof" : false, // true: Tolerate invalid typeof operator values
"proto" : false, // true: Tolerate using the `__proto__` property
"scripturl" : false, // true: Tolerate script-targeted URLs
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // true: Tolerate using this in a non-constructor function
// Environments
"browser" : true, // Web Browser (window, document, etc)
"browserify" : false, // Browserify (node.js code in the browser)
"couch" : false, // CouchDB
"devel" : false, // Development/debugging (alert, confirm, etc)
"dojo" : false, // Dojo Toolkit
"jasmine" : false, // Jasmine
"jquery" : true, // jQuery
"mocha" : false, // Mocha
"mootools" : false, // MooTools
"node" : false, // Node.js
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
"phantom" : false, // PhantomJS
"prototypejs" : false, // Prototype and Scriptaculous
"qunit" : false, // QUnit
"rhino" : false, // Rhino
"shelljs" : false, // ShellJS
"typed" : false, // Globals for typed array constructions
"worker" : false, // Web Workers
"wsh" : false, // Windows Scripting Host
"yui" : false, // Yahoo User Interface
"globals" : {
"require": true,
"Package": true // Meteor Package definition
}
}

View File

@ -0,0 +1,81 @@
#!/bin/bash
# Set directory to location of this script
# https://stackoverflow.com/a/3355423/1867984
cd "$(dirname "$0")"
# Helpful to verify which versions we're using
yarn -v
node -v
# Install GitBook CLI
echo 'Installing Gitbook CLI'
yarn global add gitbook-cli
npm install -g gitbook-cli
echo 'Running Gitbook installation'
# Generate all version's GitBook output
# For each directory in /docs ...
cd ./../docs/
for D in *; do
if [ -d "${D}" ]; then
echo "Generating output for: ${D}"
cd "${D}"
# Clear previous output, generate new
rm -rf _book
node /opt/buildhome/.nvm/versions/node/v10.16.0/lib/node_modules/gitbook-cli/bin/gitbook.js install
node /opt/buildhome/.nvm/versions/node/v10.16.0/lib/node_modules/gitbook-cli/bin/gitbook.js build
cd ..
fi
done
# Move CNAME File into `latest`
cp CNAME ./latest/_book/CNAME
# Create a history folder in our latest version's output
mkdir ./latest/_book/history
# Move each version's files to latest's history folder
for D in *; do
# If it's a directory
if [ -d "${D}" ]; then
# If the directory name starts with `v` (v1, v2, etc.)
if [ "${D}" == v* ] ; then
echo "Moving ${D} to the latest version's history folder"
mkdir "./latest/_book/history/${D}"
cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}"
fi
fi
done
cd ..
# Build and copy the PWA Viewer into the demo directory
mkdir ./docs/latest/_book/demo/
# Install build deps and all monorepo package dependencies. Yarn Workspaces
# should also symlink all projects appropriately
yarn install --no-ignore-optional --pure-lockfile
# Navigate to our Viewer project
cd ./platform/viewer/
# Create a Versions File
# node -p -e '"export default "' + require(\"./../package.json\").version + '";"' > src/version.js
yarn run version
# Copy over wado-image-loader codecs and worker file
cp ./../../node_modules/cornerstone-wado-image-loader/dist/*.min.js* public -v
# Build using react-scripts
# npx cross-env PUBLIC_URL=/demo REACT_APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build
# Build using WebPack
# TODO: consume public/config correctly instead of hardcode
npx webpack --config config/webpack.prod.js --mode production --env.production
# Copy output to the folder that is our publish target
npx cpx "dist/**/*" ./../../docs/latest/_book/demo --verbose
echo 'Nothing left to see here. Go home, folks.'

0
publishStaticSite.sh → .netlify/publishStaticSite.sh Executable file → Normal file
View File

View File

@ -4,6 +4,5 @@
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"endOfLine": "lf"
"singleQuote": true
}

View File

@ -1,14 +0,0 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"publishCmd": "mkdir tmp && echo ${nextRelease.version} > tmp/updated-version.txt"
}
]
]
}

14
.scripts/dev.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# https://github.com/shelljs/shelljs
# https://github.com/shelljs/shelljs#exclude-options
PROJECT=$1
if [ -z "$PROJECT" ]
then
# Default
npx lerna run dev:viewer
else
eval "npx lerna run dev:$PROJECT"
fi
read -p 'Press [Enter] key to continue...'

View File

@ -25,6 +25,6 @@
{ "language": "javascriptreact", "autoFix": true }
],
"prettier.disableLanguages": [],
"prettier.endOfLine": "lf"
}
"prettier.endOfLine": "lf",
"workbench.colorCustomizations": {}
}

View File

@ -0,0 +1,90 @@
const path = require("path");
const ExtractCssChunks = require("extract-css-chunks-webpack-plugin");
const SRC_DIR = path.join(__dirname, "../src");
const PUBLIC_DIR = path.join(__dirname, "../public");
const DIST_DIR = path.join(__dirname, "../dist");
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
return {
entry: {
app: `${SRC_DIR}/index.js`
},
context: SRC_DIR,
module: {
rules: [
{
test: /\.jsx?$/,
exclude: [/node_modules/, /packages\\extension/],
loader: "babel-loader",
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: "upward",
presets: [
[
"@babel/preset-env",
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false
}
]
]
}
},
{
test: /\.css$/,
use: [
"style-loader",
ExtractCssChunks.loader,
{ loader: "css-loader", options: { importLoaders: 1 } },
{
loader: "postcss-loader",
options: {
config: {
path: "./postcss.config.js"
}
}
}
]
},
/**
* This allows us to include web workers in our bundle, and VTK.js
* web workers in our bundle. While this increases bundle size, it
* cuts down on the number of includes we need for `script tag` usage.
*/
{
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
{
loader: "worker-loader",
options: { inline: true, fallback: false }
}
]
},
/**
* This is exclusively used by `vtk.js` to bundle glsl files.
*/
{
test: /\.glsl$/i,
include: /vtk\.js[\/\\]Sources/,
loader: "shader-loader"
}
]
},
resolve: {
// Which directories to search when resolving modules
modules: [
path.resolve(__dirname, "../node_modules"),
path.resolve(__dirname, "../../../node_modules"),
SRC_DIR
],
// Attempt to resolve these extensions in order.
extensions: [".js", ".jsx", ".json", "*"],
// symlinked resources are resolved to their real path, not their symlinked location
symlinks: true
}
};
};

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License
Copyright (c) 2015 Open Health Imaging Foundation
Copyright (c) 2018 Open Health Imaging Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

345
README.md
View File

@ -1,8 +1,8 @@
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<div align="center">
<h1>ohif-viewer</h1>
<p><strong>ohif-viewer</strong> is a zero-footprint medical image viewer provided by the <a href="http://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>
<h1>OHIF Medical Imaging Viewer</h1>
<p><strong>The OHIF Viewer</strong> is a zero-footprint medical image viewer provided by the <a href="http://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>
</div>
@ -19,218 +19,174 @@
<hr />
[![CircleCI][circleci-image]][circleci-url]
[![codecov][codecov-image]][codecov-url]
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
[![code style: prettier][prettier-image]][prettier-url]
[![semantic-release][semantic-image]][semantic-url]
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
[![Pulls][docker-pulls-img]][docker-image-url]
[![MIT License][license-image]][license-url]
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
> ATTENTION: If you are looking for Version 1 (the Meteor Version) of this
> repository, it lives on
> [the `v1.x` branch](https://github.com/OHIF/Viewers/tree/v1.x)
[![Netlify Status][netlify-image]][netlify-url]
[![CircleCI][circleci-image]][circleci-url]
[![codecov][codecov-image]][codecov-url]
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors)
## Why?
## What?
Building a web based medical imaging viewer from scratch is time intensive, hard
to get right, and expensive. Instead of re-inventing the wheel, you can use the
OHIF Viewer as a rock solid platform to build on top of. The Viewer is a
[React][react-url] [Progressive Web Application][pwa-url] that can be embedded
in existing applications via it's [packaged source
(ohif-viewer)][ohif-viewer-url] or hosted stand-alone. The Viewer exposes
[configuration][configuration-url] and [extensions][extensions-url] to support
workflow customization and advanced functionality at common integration points.
The OHIF Medical Imaging Viewer is for viewing medical images. It can retrieve and load images from most sources and formats; render sets in 2D, 3D, and reconstructed representations; allows for the manipulation, annotation, and serialization of observations; supports internationalization, OpenID Connect, offline use, hotkeys, and many more features.
If you're interested in using the OHIF Viewer, but you're not sure it supports
your use case [check out our docs](https://docs.ohif.org/). Still not sure, or
you would like to propose new features? Don't hesitate to
[create an issue](https://github.com/OHIF/Viewers/issues) or open a pull
request.
Almost everything offers some degree of customization and configuration. If it doesn't support something you need, we accept pull requests and have an ever improving Extension System.
## Getting Started
## Why Choose Us
This readme is specific to testing and developing locally. If you're more
interested in production deployment strategies,
[you can check out our documentation on publishing](https://docs.ohif.org/).
### Community & Experience
Want to play around before you dig in?
[Check out our LIVE Demo](https://viewer.ohif.org/)
The OHIF Viewer is a collaborative effort that has served as the basis for many active, production, and FDA Cleared medical imaging viewers. It benefits from our extensive community's collective experience, and from the sponsored contributions of individuals, research groups, and commercial organizations.
### Setup
### Built to Adapt
_Requirements:_
...
- [NodeJS & NPM](https://nodejs.org/en/download/)
- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
_Steps:_
### Support
1. Fork this repository
2. Clone your forked repository (your `origin`)
...
- `git clone git@github.com:YOUR_GITHUB_USERNAME/Viewers.git`
## Quick Start Deployment
3. Add `OHIF/Viewers` as a `remote` repository (the `upstream`)
> This is only one of many ways to configure and deploy the OHIF Viewer. To learn more about your options, and how to choose the best one for your requirements, check out [our deployment recipes and documentation](https://docs.ohif.org/deployment/).
- `git remote add upstream git@github.com:OHIF/Viewers.git`
The fastest and easiest way to get started is to include the OHIF Viewer with a script tag. In practice, this is as simple as:
### Developing Locally
In your cloned repository's root folder, run:
- Including the following dependencies with script tags:
- [React](https://unpkg.com/react@16/umd/react.production.min.js)
- [React Dom](https://unpkg.com/react-dom@16/umd/react-dom.production.min.js)
- The [OHIF Viewer](https://unpkg.com/ohif-viewer@0.19.5/dist/index.umd.js)
- Have an element with an ID of `root` on the page
- Configure the OHIF Viewer at `window.config`:
```js
// Restore dependencies
window.config = {
routerBasename: "/",
servers: {
dicomWeb: [
{
name: "DCM4CHEE",
qidoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
wadoRoot: "https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs",
qidoSupportsIncludeField: true,
imageRendering: "wadors",
thumbnailRendering: "wadors"
}
]
}
};
```
- Install the viewer: `window.OHIFStandaloneViewer.installViewer(window.config);`
This exact setup is demonstrated in this [CodeSandbox](https://codesandbox.io/s/ohif-viewer-script-tag-usage-c4u4t) and in our [Embedding The Viewer](https://docs.ohif.org/deployment/recipes/embedded-viewer.html) deployment recipe.
## Developing
### Requirements
- [Yarn 1.17.3+](https://yarnpkg.com/en/docs/install)
- [Node 8+](https://nodejs.org/en/)
- Yarn Workspaces should be enabled on your machine:
- `yarn config set workspaces-experimental true`
### Getting Started
1. [Fork this repository][how-to-fork]
2. [Clone your forked repository][how-to-clone]
- `git clone https://github.com/YOUR-USERNAME/Viewers.git`
3. Navigate to the cloned project's directory
4. Add this repo as a `remote` named `upstream`
- `git remote add upstream https://github.com/OHIF/Viewers.git`
5. `yarn install` to restore dependencies and link projects
#### To Develop
_From this repository's root directory:_
```bash
# Enable Yarn Workspaces
yarn config set workspaces-experimental true
# Restore dependencies
yarn install
// Stands up local server to host Viewer.
// Viewer connects to our public cloud PACS by default
yarn start
```
For more advanced local development scenarios, like using your own locally
hosted PACS and test data,
[check out our Essential: Getting Started](https://docs.ohif.org/essentials/getting-started.html)
guide.
## Commands
### E2E Tests
These commands are available from the root directory. Each project directory also supports a number of commands that can be found in their respective `README.md` and `project.json` files.
Using [Cypress](https://www.cypress.io/) to create End-to-End tests and check whether the application flow is performing correctly, ensuring that the integrated components are working as expected.
| Yarn Commands | Description |
| -------------------- | ------------------------------------------------------------- |
| **Develop** | |
| `dev` or `start` | Default development experience for Viewer |
| `dev:<package-name>` | Replace with `core`, `ui`, `i18n`, `cornerstone`, `vtk`, etc. |
| `test:unit` | Jest multi-project test runner; overall coverage |
| **Deploy** | |
| `build`* | Builds production output for our PWA Viewer |
| `build:package`* | Builds commonjs bundles for all projects |
#### Why Cypress?
Cypress is a next generation front end testing tool built for the modern web.
With Cypress is easy to set up, write, run and debug tests
\* - For more information on our different builds, check out our [Deploy Docs][deployment-docs]
It allow us to write different types of tests:
## Projects
- End-to-End tests
- Integration tests
- Unit tets
The OHIF Medical Image Viewing Platform is maintained as a
[`monorepo`][monorepo]. This means that this repository, instead of containing a
single project, contains many projects. If you explore our project structure,
you'll see the following:
All tests must be in `./cypress/integration` folder.
Commands to run the tests:
```js
// Open Cypress Dashboard that provides insight into what happened when your tests ran
yarn run cy
// Run all tests using Electron browser headless
yarn run cy:run
// Run all tests in CI mode
yarn run cy:run:ci
```bash
.
├── extensions #
│ ├── _example # Skeleton of example extension
│ ├── cornerstone # 2D images w/ Cornerstone.js
│ ├── dicom-html # Structured Reports as HTML in viewport
│ ├── dicom-microscopy # Whole slide microscopy viewing
│ ├── dicom-pdf # View DICOM wrapped PDFs in viewport
│ └── vtk # MPR and Volume support w/ VTK.js
├── platform #
│ ├── core # Business Logic
│ ├── i18n # Internationalization Support
│ ├── ui # React component library
│ └── viewer # Connects platform and extension projects
├── ... # misc. shared configuration
├── lerna.json # MonoRepo (Lerna) settings
├── package.json # Shared devDependencies and commands
└── README.md # This file
```
### Contributing
Want to better understand why and how we've structured this repository? Read
more about it in our [Architecture Documentation][ohif-architecture].
> Large portions of the Viewer's functionality are maintained in other
> repositories. To get a better understanding of the Viewer's architecture and
> "where things live", read
> [our docs on the Viewer's architecture](https://docs.ohif.org/advanced/architecture.html#diagram)
### Platform
It is notoriously difficult to setup multiple dependent repositories for
end-to-end testing and development. That's why we recommend writing and running
unit tests when adding and modifying features. This allows us to program in
isolation without a complex setup, and has the added benefit of producing
well-tested business logic.
These projects comprise the
1. Clone this repository
2. Navigate to the project directory, and `yarn install`
3. To begin making changes, `yarn run dev`
4. To commit changes, run `yarn run cm`
| Name | Description | Links |
| ------------------------------- | ----------- | ----- |
| [@ohif/core][platform-core] | | NPM |
| [@ohif/i18n][platform-i18n] | | NPM |
| [@ohif/viewer][platform-viewer] | | NPM |
| [@ohif/ui][platform-ui] | | NPM |
When creating tests, place the test file "next to" the file you're testing.
[For example](https://github.com/OHIF/Viewers/blob/master/src/utils/index.test.js):
### Extensions
```js
// File
index.js
This is a list of Extensions maintained by the OHIF Core team. It's possible to customize and configure these extensions, and you can even create your own. You can [read more about extensions here][ohif-extensions].
// Test for file
index.test.js
```
As you add and modify code, `jest` will watch for uncommitted changes and run
your tests, reporting the results to your terminal. Make a pull request with
your changes to `master`, and a core team member will review your work. If you
have any questions, please don't hesitate to reach out via a GitHub issue.
## Issues
_Looking to contribute? Look for the [Good First Issue][good-first-issue]
label._
### 🐛 Bugs
Please file an issue for bugs, missing documentation, or unexpected behavior.
[**See Bugs**][bugs]
### 💡 Feature Requests
Please file an issue to suggest new features. Vote on feature requests by adding
a 👍. This helps maintainers prioritize what to work on.
[**See Feature Requests**][requests-feature]
### ❓ Questions
For questions related to using the library, please visit our support community,
or file an issue on GitHub.
[Google Group][google-group]
## Roadmap
If you want to know what's planned for the very near future,
[check out our roadmap](https://ohif.canny.io/). The best way to influence when
and what is worked on is to contribute to the conversation by creating GitHub
issues, and contributing code through pull requests. OHIF's high level
priorities for the near future are:
- Feature parity with version 1
- Extension and configuration improvements with key integration partners
- Continued Developer Experience Improvements
- Segmentation Tools, and improved VTK.js support
More granular information will make it's way to the backlog as these items
become scoped for development by core maintainers.
> Don't hesitate to ask questions, propose features, or create pull requests.
> We're here, we're listening, and we're ready to build the best open source
> medical imaging viewer on the web.
#### Roadmap Generously Powered by Canny.io
<a href="https://ohif.canny.io/">
<img height="30" src="docs/latest/assets/img/canny-full.png" />
</a>
## Contributors
Thanks goes to these wonderful people
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<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>
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!
## License
MIT © [OHIF](https://github.com/OHIF)
| Name | Description | Links |
| -------------------------------------------------------------- | ----------- | ----- |
| [@ohif/extension-cornestone][extension-cornerstone] | | NPM |
| [@ohif/extension-dicom-html][extension-dicom-html] | | NPM |
| [@ohif/extension-dicom-microscopy][extension-dicom-microscopy] | | NPM |
| [@ohif/extension-dicom-pdf][extension-dicom-pdf] | | NPM |
| [@ohif/extension-vtk][extension-vtk] | | NPM |
## Acknowledgments
@ -254,12 +210,20 @@ Cancer Institute, Informatics Technology for Cancer Research (ITCR) program,
under a
[grant to Dr. Gordon Harris at Massachusetts General Hospital (U24 CA199460)](https://projectreporter.nih.gov/project_info_description.cfm?aid=8971104).
## License
MIT © [OHIF](https://github.com/OHIF)
<!--
Links:
-->
Links
-->
<!-- prettier-ignore-start -->
<!-- ROW -->
<!-- Badges -->
[lerna-image]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg
[lerna-url]: https://lerna.js.org/
[netlify-image]: https://api.netlify.com/api/v1/badges/a5d369ab-18a6-41c3-bcde-83805205ac7f/deploy-status
[netlify-url]: https://app.netlify.com/sites/ohif/deploys
[all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square
[contributing-url]: https://github.com/OHIF/Viewers/blob/react/CONTRIBUTING.md
[circleci-image]: https://circleci.com/gh/OHIF/Viewers.svg?style=svg
@ -278,18 +242,27 @@ Links:
[docker-image-url]: https://hub.docker.com/r/ohif/viewer
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
[license-url]: LICENSE
<!-- DOCS -->
<!-- Links -->
[monorepo]: https://en.wikipedia.org/wiki/Monorepo
[how-to-fork]: https://help.github.com/en/articles/fork-a-repo
[how-to-clone]: https://help.github.com/en/articles/fork-a-repo#step-2-create-a-local-clone-of-your-fork
[ohif-architecture]: https://docs.ohif.org/advanced/architecture.html
[ohif-extensions]: https://docs.ohif.org/advanced/architecture.html
[deployment-docs]: https://docs.ohif.org/deployment/
[react-url]: https://reactjs.org/
[pwa-url]: https://developers.google.com/web/progressive-web-apps/
[ohif-viewer-url]: https://www.npmjs.com/package/ohif-viewer
[configuration-url]: https://docs.ohif.org/essentials/configuration.html
[extensions-url]: https://docs.ohif.org/advanced/extensions.html
<!-- Misc. -->
[react-viewer]: https://github.com/OHIF/Viewers/tree/react
<!-- Issue Boilerplate -->
[bugs]: https://github.com/OHIF/Viewers/labels/bug
[requests-feature]: https://github.com/OHIF/Viewers/labels/enhancement
[good-first-issue]: https://github.com/OHIF/Viewers/labels/good%20first%20issue
[google-group]: https://groups.google.com/forum/#!forum/cornerstone-platform
<!-- Platform -->
[platform-core]: platform/core/README.md
[platform-i18n]: platform/i18n/README.md
[platform-ui]: platform/ui/README.md
[platform-viewer]: platform/viewer/README.md
<!-- Extensions -->
[extension-cornerstone]: extensions/cornerstone/README.md
[extension-dicom-html]: extensions/dicom-html/README.md
[extension-dicom-microscopy]: extensions/dicom-microscopy/README.md
[extension-dicom-pdf]: extensions/dicom-pdf/README.md
[extension-vtk]: extensions/vtk/README.md
<!-- prettier-ignore-end -->

8
aliases.config.js Normal file
View File

@ -0,0 +1,8 @@
/* Used by webpack, babel and eslint */
const path = require('path');
module.exports = {
'@codinsky/parse-js': path.resolve(__dirname, 'packages/parse/src'),
'@codinsky/curate': path.resolve(__dirname, 'packages/curate/src'),
};

50
babel.config.js Normal file
View File

@ -0,0 +1,50 @@
const aliases = require("./aliases.config");
const path = require("path");
module.exports = {
// https://babeljs.io/docs/en/options#babelrcroots
presets: [
[
"@babel/preset-env",
{
targets: {
ie: "11"
}
}
],
"@babel/preset-react"
],
babelrcRoots: ["./platform/*", "./extensions/*"],
plugins: [
"inline-react-svg",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-regenerator",
"@babel/plugin-transform-runtime",
[
"module-resolver",
{
// https://github.com/tleunen/babel-plugin-module-resolver/issues/338
// There seem to be a bug with module-resolver with a mono-repo setup:
// It doesn't resolve paths correctly when using root/alias combo, so we
// use this function instead.
resolvePath(sourcePath, currentFile, opts) {
// This will return undefined if aliases has no key for the sourcePath,
// in which case module-resolver will fallback on its default behaviour.
return aliases[sourcePath];
}
}
]
],
env: {
debug: {
sourceMaps: "inline",
retainLines: true
},
build: {
ignore: ["**/*.test.jsx", "**/*.test.js", "__snapshots__", "__tests__"]
}
}
// ignore: ["node_modules"]
};

View File

@ -12,17 +12,13 @@ architected, and the role each of it's dependent libraries plays.
## Overview
The [`OHIF/Viewers`](https://github.com/OHIF/Viewers/tree/react) repository
contains the source code for the OHIF Medical Imaging Viewer. It is effectively
a React
[progressive web app](https://developers.google.com/web/progressive-web-apps/)
(PWA) that combines the business logic housed in
[`OHIF/ohif-core`](https://github.com/OHIF/ohif-core) and the components in our
React Component library
[`OHIF/react-viewerbase`](https://github.com/OHIF/react-viewerbase). It provides
customization for common use cases through
[configuration](../essentials/configuration.md) and for adding functionality via
[extensions](./extensions.md).
The [`OHIF/Viewers`][viewers-project] project contains the source code for the
OHIF Medical Imaging Viewer. It is effectively a React [progressive web
app][pwa] (PWA) that combines the business logic housed in
[`OHIF/ohif-core`][core] and the components in our React Component library
[`OHIF/react-viewerbase`][component-library]. It provides customization for
common use cases through [configuration][configuration] and for adding
functionality via [extensions][extensions].
### Business Logic
@ -71,13 +67,13 @@ looking for ways to improve our extensibility ^\_^
This diagram is a conceptual illustration of how the Viewer is architected.
0. (optional) `extensions` can be registered with `ohif-core`'s extension
1. (optional) `extensions` can be registered with `ohif-core`'s extension
manager
1. `ohif-core` provides bussiness logic and a way for `viewer` to access
2. `ohif-core` provides bussiness logic and a way for `viewer` to access
registered extensions
1. The `viewer` composes and provides data to components from our component
3. The `viewer` composes and provides data to components from our component
library (`react-viewerbase`)
1. The `viewer` can be built and served as a stand-alone PWA, or as an
4. The `viewer` can be built and served as a stand-alone PWA, or as an
embeddable package
([`ohif-viewer`](https://www.npmjs.com/package/ohif-viewer))
@ -98,3 +94,16 @@ You can, but you will not be able to leverage as much of the existing code and
components. `ohif-core` could still be used for business logic, and to provide a
model for extensions. `react-viewerbase` would then become a guide for the
components you would need to recreate.
<!--
Links
-->
<!-- prettier-ignore-start -->
[viewers-project]: https://github.com/OHIF/Viewers
[pwa]: https://developers.google.com/web/progressive-web-apps/
[core]: https://github.com/OHIF/ohif-core
[component-library]: https://github.com/OHIF/react-viewerbase
[configuration]: ../essentials/configuration.md
[extensions]: ./extensions.m
<!-- prettier-ignore-end -->

View File

@ -197,9 +197,9 @@ would like included at startup.
_app.js_
```js
import { createStore, combineReducers } from 'redux';
import OHIF from 'ohif-core';
import OHIFCornerstoneExtension from 'ohif-cornerstone-extension';
import { createStore, combineReducers } from "redux";
import OHIF from "@ohif/core";
import OHIFCornerstoneExtension from "ohif-cornerstone-extension";
const combined = combineReducers(OHIF.redux.reducers);
const store = createStore(combined);

View File

@ -0,0 +1,23 @@
# MonoRepos: A Crash Course
- [Lerna][lerna]
Solutions:
## Semantic-Release
- [Semantic-Release](https://github.com/semantic-release/semantic-release/issues/193#issuecomment-462063871)
- [Multi-semantic-release](https://github.com/dhoulb/multi-semantic-release)
- [semantic-release-monorepo](https://github.com/Updater/semantic-release-monorepo)
# Netlify
- https://community.netlify.com/t/best-practices-for-deploying-sites-from-monorepos/818
<!--
Links
-->
<!-- prettier-ignore-start -->
[lerna]: https://github.com/lerna/lerna
<!-- prettier-ignore-end -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

8
eslintAliasesResolver.js Normal file
View File

@ -0,0 +1,8 @@
module.exports.interfaceVersion = 2;
module.exports.resolve = (source, file, aliases) => {
if (aliases[source]) {
return { found: true, path: aliases[source] };
}
return { found: false };
};

View File

@ -0,0 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.39-alpha.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.0.39-alpha.2...@ohif/extension-cornerstone@0.0.39-alpha.3) (2019-08-08)
**Note:** Version bump only for package @ohif/extension-cornerstone
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.39-alpha.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.0.39-alpha.1...@ohif/extension-cornerstone@0.0.39-alpha.2) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-cornerstone
## [0.0.39-alpha.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.0.39-alpha.0...@ohif/extension-cornerstone@0.0.39-alpha.1) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-cornerstone
## 0.0.39-alpha.0 (2019-08-05)
**Note:** Version bump only for package @ohif/extension-cornerstone

View File

@ -0,0 +1,67 @@
const path = require('path');
const webpack = require('webpack');
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return {
entry: {
app: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
resolve: {
extensions: ['.js', '.jsx', '.json', '*'],
symlinks: true,
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
},
],
],
},
},
{
test: /\.css$/,
use: [
'style-loader',
ExtractCssChunks.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js',
},
},
},
],
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new ExtractCssChunks({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
}),
],
};
};

View File

@ -0,0 +1,64 @@
const merge = require('webpack-merge');
const path = require('path');
const common = require('./webpack.common');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = common(env, argv);
return merge(commonConfig, {
mode: 'production',
stats: {
colors: false,
hash: true,
timings: true,
assets: true,
chunks: true,
chunkModules: true,
modules: true,
children: true,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
library: 'ohifCornerstoneExtension',
libraryTarget: 'umd',
filename: pkg.main,
auxiliaryComment: 'Test Comment',
},
module: {
rules: [
{
test: /\.(gif|jpe?g|png|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
{
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 50000,
},
},
],
},
],
},
});
};

View File

@ -0,0 +1,52 @@
{
"name": "@ohif/extension-cornerstone",
"version": "0.0.39-alpha.3",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"engines": {
"node": ">=8",
"npm": ">=5"
},
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "webpack --config config/webpack.prod.js -d",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"dev": "webpack --config config/webpack.prod.js -w -d",
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "^0.11.1-alpha.0",
"@ohif/ui": "^0.2.18-alpha.0",
"cornerstone-core": "^2.2.8",
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^3.1.0",
"cornerstone-wado-image-loader": "^2.2.3",
"dcmjs": "^0.3.8",
"dicom-parser": "^1.8.3",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0",
"react-redux": "^6.0.0",
"react-resize-detector": "^3.4.0",
"redux": "^4.0.1"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
"classnames": "^2.2.6",
"lodash.throttle": "^4.1.1",
"react-cornerstone-viewport": "0.1.30"
},
"gitHead": "a5baa9228c0eda0df880136bde4420d78e6f8706"
}

View File

@ -1,7 +1,7 @@
import CornerstoneViewport from 'react-cornerstone-viewport';
import OHIF from 'ohif-core';
import { connect } from 'react-redux';
import throttle from 'lodash.throttle';
import CornerstoneViewport from "react-cornerstone-viewport";
import OHIF from "@ohif/core";
import { connect } from "react-redux";
import throttle from "lodash.throttle";
const { setViewportActive, setViewportSpecificData } = OHIF.redux.actions;
@ -37,7 +37,7 @@ const mapStateToProps = (state, ownProps) => {
enableStackPrefetch: isActive,
//stack: viewportSpecificData.stack,
cineToolData: viewportSpecificData.cine,
viewport: viewportSpecificData.viewport,
viewport: viewportSpecificData.viewport
};
};
@ -64,8 +64,8 @@ const mapDispatchToProps = (dispatch, ownProps) => {
dispatch(
setViewportSpecificData(viewportIndex, {
// TODO: Hack to make sure our plugin info is available from the outset
plugin: 'cornerstone',
dom: enabledElement,
plugin: "cornerstone",
dom: enabledElement
})
);
},
@ -74,18 +74,18 @@ const mapDispatchToProps = (dispatch, ownProps) => {
const {
onAdded,
onRemoved,
onModified,
onModified
} = OHIF.measurements.MeasurementHandlers;
const actions = {
added: onAdded,
removed: onRemoved,
modified: throttle(event => {
return onModified(event);
}, 300),
}, 300)
};
return actions[action](event);
},
}
};
};

View File

@ -1,10 +1,10 @@
import React, { Component } from 'react';
import React, { Component } from "react";
import ConnectedCornerstoneViewport from './ConnectedCornerstoneViewport';
import OHIF from 'ohif-core';
import PropTypes from 'prop-types';
import cornerstone from 'cornerstone-core';
import handleSegmentationStorage from './handleSegmentationStorage.js';
import ConnectedCornerstoneViewport from "./ConnectedCornerstoneViewport";
import OHIF from "@ohif/core";
import PropTypes from "prop-types";
import cornerstone from "cornerstone-core";
import handleSegmentationStorage from "./handleSegmentationStorage.js";
const { StackManager } = OHIF.utils;
@ -18,7 +18,7 @@ cornerstone.metaData.addProvider(
StackManager.setMetadataProvider(metadataProvider);
const SOP_CLASSES = {
SEGMENTATION_STORAGE: '1.2.840.10008.5.1.4.1.1.66.4',
SEGMENTATION_STORAGE: "1.2.840.10008.5.1.4.1.1.66.4"
};
const specialCaseHandlers = {};
@ -28,11 +28,11 @@ specialCaseHandlers[
class OHIFCornerstoneViewport extends Component {
state = {
viewportData: null,
viewportData: null
};
static defaultProps = {
customProps: {},
customProps: {}
};
static propTypes = {
@ -40,17 +40,17 @@ class OHIFCornerstoneViewport extends Component {
displaySet: PropTypes.object,
viewportIndex: PropTypes.number,
children: PropTypes.node,
customProps: PropTypes.object,
customProps: PropTypes.object
};
static id = 'OHIFCornerstoneViewport';
static id = "OHIFCornerstoneViewport";
static init() {
console.log('OHIFCornerstoneViewport init()');
console.log("OHIFCornerstoneViewport init()");
}
static destroy() {
console.log('OHIFCornerstoneViewport destroy()');
console.log("OHIFCornerstoneViewport destroy()");
StackManager.clearStacks();
}
@ -72,15 +72,15 @@ class OHIFCornerstoneViewport extends Component {
frameIndex = 0
) {
if (!studies || !studies.length) {
throw new Error('Studies not provided.');
throw new Error("Studies not provided.");
}
if (!studyInstanceUid) {
throw new Error('StudyInstanceUID not provided.');
throw new Error("StudyInstanceUID not provided.");
}
if (!displaySetInstanceUid) {
throw new Error('StudyInstanceUID not provided.');
throw new Error("StudyInstanceUID not provided.");
}
// Create shortcut to displaySet
@ -89,7 +89,7 @@ class OHIFCornerstoneViewport extends Component {
);
if (!study) {
throw new Error('Study not found.');
throw new Error("Study not found.");
}
const displaySet = study.displaySets.find(set => {
@ -97,7 +97,7 @@ class OHIFCornerstoneViewport extends Component {
});
if (!displaySet) {
throw new Error('Display Set not found.');
throw new Error("Display Set not found.");
}
// Get stack from Stack Manager
@ -110,7 +110,7 @@ class OHIFCornerstoneViewport extends Component {
if (sopInstanceUid) {
const index = stack.imageIds.findIndex(imageId => {
const sopCommonModule = cornerstone.metaData.get(
'sopCommonModule',
"sopCommonModule",
imageId
);
if (!sopCommonModule) {
@ -124,7 +124,7 @@ class OHIFCornerstoneViewport extends Component {
stack.currentImageIdIndex = index;
} else {
console.warn(
'SOPInstanceUID provided was not found in specified DisplaySet'
"SOPInstanceUID provided was not found in specified DisplaySet"
);
}
}
@ -183,7 +183,7 @@ class OHIFCornerstoneViewport extends Component {
viewportData = {
studyInstanceUid,
displaySetInstanceUid,
stack,
stack
};
break;
@ -199,12 +199,12 @@ class OHIFCornerstoneViewport extends Component {
displaySetInstanceUid,
sopClassUids,
sopInstanceUid,
frameIndex,
frameIndex
} = displaySet;
if (sopClassUids && sopClassUids.length > 1) {
console.warn(
'More than one SOPClassUid in the same series is not yet supported.'
"More than one SOPClassUid in the same series is not yet supported."
);
}
@ -219,7 +219,7 @@ class OHIFCornerstoneViewport extends Component {
frameIndex
).then(viewportData => {
this.setState({
viewportData,
viewportData
});
});
}
@ -250,7 +250,7 @@ class OHIFCornerstoneViewport extends Component {
childrenWithProps = this.props.children.map((child, index) => {
return React.cloneElement(child, {
viewportIndex: this.props.viewportIndex,
key: index,
key: index
});
});
}

View File

@ -1,8 +1,8 @@
import * as dcmjs from 'dcmjs';
import * as dcmjs from "dcmjs";
import OHIF from 'ohif-core';
import cornerstone from 'cornerstone-core';
import cornerstoneTools from 'cornerstone-tools';
import OHIF from "@ohif/core";
import cornerstone from "cornerstone-core";
import cornerstoneTools from "cornerstone-tools";
const { StackManager } = OHIF.utils;
@ -56,7 +56,7 @@ function retrieveDicomData(wadoUri) {
// TODO: Authorization header depends on the server. If we ever have multiple servers
// we will need to figure out how / when to pass this information in.
return fetch(wadoUri, {
headers: OHIF.DICOMWeb.getAuthorizationHeader(),
headers: OHIF.DICOMWeb.getAuthorizationHeader()
}).then(response => response.arrayBuffer());
}
@ -91,7 +91,7 @@ async function handleSegmentationStorage(
if (displaySets.length > 1) {
console.warn(
'More than one display set with the same seriesInstanceUid. This is not supported yet...'
"More than one display set with the same seriesInstanceUid. This is not supported yet..."
);
}
@ -100,7 +100,7 @@ async function handleSegmentationStorage(
const results = parseSeg(arrayBuffer, imageIds);
if (!results) {
throw new Error('Fractional segmentations are not supported');
throw new Error("Fractional segmentations are not supported");
}
const { segMetadata, toolState } = results;
@ -123,7 +123,7 @@ async function handleSegmentationStorage(
return {
studyInstanceUid,
displaySetInstanceUid,
stack,
stack
};
}

View File

@ -0,0 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.4-alpha.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.0.4-alpha.2...@ohif/extension-dicom-html@0.0.4-alpha.3) (2019-08-08)
**Note:** Version bump only for package @ohif/extension-dicom-html
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.4-alpha.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.0.4-alpha.1...@ohif/extension-dicom-html@0.0.4-alpha.2) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-html
## [0.0.4-alpha.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.0.4-alpha.0...@ohif/extension-dicom-html@0.0.4-alpha.1) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-html
## 0.0.4-alpha.0 (2019-08-05)
**Note:** Version bump only for package @ohif/extension-dicom-html

View File

@ -0,0 +1 @@
# @ohif/extension-dicom-html

View File

@ -0,0 +1 @@
:root{--text-color-primary:#fff}.DicomHtmlViewport{padding:20px;overflow-y:scroll;width:100%;height:100%;color:#fff;color:var(--text-color-primary)}

View File

@ -0,0 +1,67 @@
const path = require('path');
const webpack = require('webpack');
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return {
entry: {
app: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
resolve: {
extensions: ['.js', '.jsx', '.json', '*'],
symlinks: true,
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
},
],
],
},
},
{
test: /\.css$/,
use: [
'style-loader',
ExtractCssChunks.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js',
},
},
},
],
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new ExtractCssChunks({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
}),
],
};
};

View File

@ -0,0 +1,64 @@
const merge = require('webpack-merge');
const path = require('path');
const common = require('./webpack.common');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = common(env, argv);
return merge(commonConfig, {
mode: 'production',
stats: {
colors: false,
hash: true,
timings: true,
assets: true,
chunks: true,
chunkModules: true,
modules: true,
children: true,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
library: 'ohifCornerstoneExtension',
libraryTarget: 'umd',
filename: pkg.main,
auxiliaryComment: 'Test Comment',
},
module: {
rules: [
{
test: /\.(gif|jpe?g|png|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
{
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 50000,
},
},
],
},
],
},
});
};

View File

@ -0,0 +1,39 @@
{
"name": "@ohif/extension-dicom-html",
"version": "0.0.4-alpha.3",
"description": "OHIF extension for rendering structured reports to HTML",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"engines": {
"node": ">=8",
"npm": ">=5"
},
"scripts": {
"dev": "webpack --config config/webpack.prod.js -w -d",
"build": "webpack --config config/webpack.prod.js -d",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "^0.11.1-alpha.0",
"dcmjs": "^0.3.3",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0"
},
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
},
"gitHead": "a5baa9228c0eda0df880136bde4420d78e6f8706"
}

View File

@ -1,14 +1,14 @@
import { MODULE_TYPES, utils } from 'ohif-core';
import { MODULE_TYPES, utils } from "@ohif/core";
// TODO: Should probably use dcmjs for this
const SOP_CLASS_UIDS = {
BASIC_TEXT_SR: '1.2.840.10008.5.1.4.1.1.88.11',
ENHANCED_SR: '1.2.840.10008.5.1.4.1.1.88.22',
COMPREHENSIVE_SR: '1.2.840.10008.5.1.4.1.1.88.33',
PROCEDURE_LOG_STORAGE: '1.2.840.10008.5.1.4.1.1.88.40',
MAMMOGRAPHY_CAD_SR: '1.2.840.10008.5.1.4.1.1.88.50',
CHEST_CAD_SR: '1.2.840.10008.5.1.4.1.1.88.65',
X_RAY_RADIATION_DOSE_SR: '1.2.840.10008.5.1.4.1.1.88.67'
BASIC_TEXT_SR: "1.2.840.10008.5.1.4.1.1.88.11",
ENHANCED_SR: "1.2.840.10008.5.1.4.1.1.88.22",
COMPREHENSIVE_SR: "1.2.840.10008.5.1.4.1.1.88.33",
PROCEDURE_LOG_STORAGE: "1.2.840.10008.5.1.4.1.1.88.40",
MAMMOGRAPHY_CAD_SR: "1.2.840.10008.5.1.4.1.1.88.50",
CHEST_CAD_SR: "1.2.840.10008.5.1.4.1.1.88.65",
X_RAY_RADIATION_DOSE_SR: "1.2.840.10008.5.1.4.1.1.88.67"
};
const sopClassUids = Object.values(SOP_CLASS_UIDS);
@ -16,14 +16,14 @@ const sopClassUids = Object.values(SOP_CLASS_UIDS);
// TODO: Handle the case where there is more than one SOP Class Handler for the
// same SOP Class
const OHIFDicomHtmlSopClassHandler = {
id: 'OHIFDicomHtmlSopClassHandler',
id: "OHIFDicomHtmlSopClassHandler",
type: MODULE_TYPES.SOP_CLASS_HANDLER,
sopClassUids,
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
const instance = series.getFirstInstance();
return {
plugin: 'html',
plugin: "html",
displaySetInstanceUid: utils.guid(),
wadoRoot: study.getData().wadoRoot,
wadoUri: instance.getData().wadouri,

View File

@ -0,0 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.9-alpha.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.0.9-alpha.2...@ohif/extension-dicom-microscopy@0.0.9-alpha.3) (2019-08-08)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.9-alpha.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.0.9-alpha.1...@ohif/extension-dicom-microscopy@0.0.9-alpha.2) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
## [0.0.9-alpha.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.0.9-alpha.0...@ohif/extension-dicom-microscopy@0.0.9-alpha.1) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
## 0.0.9-alpha.0 (2019-08-05)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy

View File

@ -0,0 +1,67 @@
const path = require('path');
const webpack = require('webpack');
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return {
entry: {
app: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
resolve: {
extensions: ['.js', '.jsx', '.json', '*'],
symlinks: true,
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
},
],
],
},
},
{
test: /\.css$/,
use: [
'style-loader',
ExtractCssChunks.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js',
},
},
},
],
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new ExtractCssChunks({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
}),
],
};
};

View File

@ -0,0 +1,64 @@
const merge = require('webpack-merge');
const path = require('path');
const common = require('./webpack.common');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = common(env, argv);
return merge(commonConfig, {
mode: 'production',
stats: {
colors: false,
hash: true,
timings: true,
assets: true,
chunks: true,
chunkModules: true,
modules: true,
children: true,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
library: 'ohifCornerstoneExtension',
libraryTarget: 'umd',
filename: pkg.main,
auxiliaryComment: 'Test Comment',
},
module: {
rules: [
{
test: /\.(gif|jpe?g|png|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
{
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 50000,
},
},
],
},
],
},
});
};

View File

@ -0,0 +1,39 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "0.0.9-alpha.3",
"description": "OHIF extension for Dicom Microscopy",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=8",
"npm": ">=5"
},
"scripts": {
"build": "webpack --config config/webpack.prod.js -d",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"dev": "webpack --config config/webpack.prod.js -w -d",
"start": "yarn run dev"
},
"files": [
"dist",
"README.md"
],
"peerDependencies": {
"@ohif/core": "^0.11.1-alpha.0",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
"classnames": "^2.2.6",
"dicom-microscopy-viewer": "^0.4.3"
},
"gitHead": "a5baa9228c0eda0df880136bde4420d78e6f8706"
}

View File

@ -1,13 +1,13 @@
import OHIF from 'ohif-core';
import OHIF from "@ohif/core";
const { utils } = OHIF;
const SOP_CLASS_UIDS = {
VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE: '1.2.840.10008.5.1.4.1.1.77.1.6',
VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE: "1.2.840.10008.5.1.4.1.1.77.1.6"
};
const DicomMicroscopySopClassHandler = {
id: 'DicomMicroscopySopClassHandlerPlugin',
id: "DicomMicroscopySopClassHandlerPlugin",
sopClassUids: [SOP_CLASS_UIDS.VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE],
getDisplaySetFromSeries(series, study, dicomWebClient) {
const instance = series.getFirstInstance();
@ -15,14 +15,14 @@ const DicomMicroscopySopClassHandler = {
// Note: We are passing the dicomweb client into each viewport!
return {
plugin: 'microscopy',
plugin: "microscopy",
displaySetInstanceUid: utils.guid(),
dicomWebClient,
sopInstanceUid: instance.getSOPInstanceUID(),
seriesInstanceUid: series.getSeriesInstanceUID(),
studyInstanceUid: study.getStudyInstanceUID(),
studyInstanceUid: study.getStudyInstanceUID()
};
},
}
};
export default DicomMicroscopySopClassHandler;

View File

@ -0,0 +1,25 @@
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.8-alpha.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.0.8-alpha.2...@ohif/extension-dicom-pdf@0.0.8-alpha.3) (2019-08-08)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.8-alpha.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.0.8-alpha.1...@ohif/extension-dicom-pdf@0.0.8-alpha.2) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
## [0.0.8-alpha.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.0.8-alpha.0...@ohif/extension-dicom-pdf@0.0.8-alpha.1) (2019-08-07)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
## 0.0.8-alpha.0 (2019-08-05)
**Note:** Version bump only for package @ohif/extension-dicom-pdf

View File

@ -0,0 +1 @@
# @ohif/extension-dicom-pdf

View File

@ -0,0 +1,67 @@
const path = require('path');
const webpack = require('webpack');
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return {
entry: {
app: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
resolve: {
extensions: ['.js', '.jsx', '.json', '*'],
symlinks: true,
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
},
],
],
},
},
{
test: /\.css$/,
use: [
'style-loader',
ExtractCssChunks.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js',
},
},
},
],
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new ExtractCssChunks({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
}),
],
};
};

View File

@ -0,0 +1,64 @@
const merge = require('webpack-merge');
const path = require('path');
const common = require('./webpack.common');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = common(env, argv);
return merge(commonConfig, {
mode: 'production',
stats: {
colors: false,
hash: true,
timings: true,
assets: true,
chunks: true,
chunkModules: true,
modules: true,
children: true,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
library: 'ohifCornerstoneExtension',
libraryTarget: 'umd',
filename: pkg.main,
auxiliaryComment: 'Test Comment',
},
module: {
rules: [
{
test: /\.(gif|jpe?g|png|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
{
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 50000,
},
},
],
},
],
},
});
};

View File

@ -0,0 +1,41 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "0.0.8-alpha.3",
"description": "OHIF extension for Dicom PDF",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "src/index.js",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=8",
"npm": ">=5"
},
"files": [
"dist",
"README.md"
],
"scripts": {
"dev": "webpack --config config/webpack.prod.js -w -d",
"build": "webpack --config config/webpack.prod.js -d",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "^0.11.1-alpha.0",
"dicom-parser": "^1.8.3",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
"classnames": "^2.2.6",
"lodash.isequal": "^4.5.0"
},
"gitHead": "a5baa9228c0eda0df880136bde4420d78e6f8706"
}

View File

@ -1,19 +1,19 @@
import { MODULE_TYPES, utils } from 'ohif-core';
import { MODULE_TYPES, utils } from "@ohif/core";
// TODO: Should probably use dcmjs for this
const SOP_CLASS_UIDS = {
ENCAPSULATED_PDF: '1.2.840.10008.5.1.4.1.1.104.1'
ENCAPSULATED_PDF: "1.2.840.10008.5.1.4.1.1.104.1"
};
const OHIFDicomPDFSopClassHandler = {
id: 'OHIFDicomPDFSopClassHandlerPlugin',
id: "OHIFDicomPDFSopClassHandlerPlugin",
type: MODULE_TYPES.SOP_CLASS_HANDLER,
sopClassUids: [SOP_CLASS_UIDS.ENCAPSULATED_PDF],
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
const instance = series.getFirstInstance();
return {
plugin: 'pdf',
plugin: "pdf",
displaySetInstanceUid: utils.guid(),
wadoRoot: study.getData().wadoRoot,
wadoUri: instance.getData().wadouri,

View File

@ -1,8 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import OHIF from 'ohif-core';
import OHIFComponentPlugin from './OHIFComponentPlugin.js';
import DicomPDFViewport from './DicomPDFViewport';
import React, { Component } from "react";
import PropTypes from "prop-types";
import OHIF from "@ohif/core";
import OHIFComponentPlugin from "./OHIFComponentPlugin.js";
import DicomPDFViewport from "./DicomPDFViewport";
const { DICOMWeb } = OHIF;
@ -18,25 +18,41 @@ class OHIFDicomPDFViewport extends Component {
error: null
};
static id = 'DicomPDFViewportPDF';
static id = "DicomPDFViewportPDF";
static init() {
console.log('DicomPDFViewport init()');
console.log("DicomPDFViewport init()");
}
static destroy() {
console.log('DicomPDFViewport destroy()');
console.log("DicomPDFViewport destroy()");
}
componentDidMount() {
const { displaySet } = this.props.viewportData;
const { studyInstanceUid, seriesInstanceUid, sopInstanceUid, wadoRoot, wadoUri, authorizationHeaders} = displaySet;
const {
studyInstanceUid,
seriesInstanceUid,
sopInstanceUid,
wadoRoot,
wadoUri,
authorizationHeaders
} = displaySet;
this.retrieveDicomData(studyInstanceUid, seriesInstanceUid, sopInstanceUid, wadoRoot, wadoUri, authorizationHeaders).then(byteArray => {
this.retrieveDicomData(
studyInstanceUid,
seriesInstanceUid,
sopInstanceUid,
wadoRoot,
wadoUri,
authorizationHeaders
).then(
byteArray => {
this.setState({
byteArray
});
}, error => {
},
error => {
this.setState({
error
});
@ -46,14 +62,23 @@ class OHIFDicomPDFViewport extends Component {
);
}
retrieveDicomData(studyInstanceUid, seriesInstanceUid, sopInstanceUid, wadoRoot, wadoUri, authorizationHeaders) {
retrieveDicomData(
studyInstanceUid,
seriesInstanceUid,
sopInstanceUid,
wadoRoot,
wadoUri,
authorizationHeaders
) {
// TODO: Passing in a lot of data we aren't using
// TODO: Authorization header depends on the server. If we ever have multiple servers
// we will need to figure out how / when to pass this information in.
return fetch(wadoUri, {
headers: authorizationHeaders
}).then(response => response.arrayBuffer()).then(arraybuffer => {
})
.then(response => response.arrayBuffer())
.then(arraybuffer => {
return new Uint8Array(arraybuffer);
});
}

View File

@ -1,14 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"ie": "11"
}
}],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
]
}

View File

@ -1,9 +0,0 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@ -1,16 +0,0 @@
{
"extends": [
"react-app",
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"env": {
"jest": true
},
"settings": {
"react": {
"version": "detect",
},
},
}

View File

@ -1,26 +0,0 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
node_modules
# builds
build
dist
.rpt2_cache
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
yalc.lock
.yalc

View File

@ -1,9 +0,0 @@
{
"trailingComma": "es5",
"printWidth": 80,
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"endOfLine": "lf"
}

View File

@ -1,4 +0,0 @@
language: node_js
node_js:
- 9
- 8

View File

@ -1,101 +0,0 @@
{
"name": "@ohif/extension-cornerstone",
"version": "0.0.38",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
"engines": {
"node": ">=8",
"npm": ">=5"
},
"scripts": {
"build": "rollup -c",
"prepublishOnly": "npm run build",
"start": "rollup -c -w",
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}"
},
"peerDependencies": {
"cornerstone-core": "^2.2.8",
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^3.1.0",
"cornerstone-wado-image-loader": "^2.2.3",
"dcmjs": "^0.3.8",
"dicom-parser": "^1.8.3",
"hammerjs": "^2.0.8",
"ohif-core": "^0.6.0",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0",
"react-redux": "^6.0.0",
"react-resize-detector": "^3.4.0",
"react-viewerbase": "^0.6.0",
"redux": "^4.0.1"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
"classnames": "^2.2.6",
"lodash.throttle": "^4.1.1",
"react-cornerstone-viewport": "0.1.30"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"cross-env": "^5.2.0",
"eslint": "5.13.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.11.1",
"gh-pages": "^2.0.1",
"husky": "^1.3.1",
"lint-staged": "^8.1.0",
"lodash.clonedeep": "^4.5.0",
"prettier": "^1.15.3",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"rollup": "^1.1.2",
"rollup-plugin-babel": "^4.2.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-url": "^2.1.0",
"stylelint": "^9.9.0",
"stylelint-config-recommended": "^2.1.0",
"stylus": "^0.54.5"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,json,css}": [
"prettier --single-quote --write",
"git add"
]
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"files": [
"dist",
"README.md"
],
"publishConfig": {
"access": "public"
}
}

View File

@ -1,68 +0,0 @@
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import external from 'rollup-plugin-peer-deps-external'
import postcss from 'rollup-plugin-postcss'
import resolve from 'rollup-plugin-node-resolve'
import url from 'rollup-plugin-url'
import pkg from './package.json'
// Deal with https://github.com/rollup/rollup-plugin-commonjs/issues/297
import builtins from 'rollup-plugin-node-builtins';
const globals = {
'react': 'React',
'react-dom': 'ReactDOM',
'react-redux': 'ReactRedux',
'react-resize-detector': 'ReactResizeDetector',
'react-viewerbase': 'reactViewerbase',
'prop-types': 'PropTypes',
'cornerstone-core': 'cornerstone',
'cornerstone-wado-image-loader': 'cornerstoneWADOImageLoader',
'cornerstone-math': 'cornerstoneMath',
'cornerstone-tools': 'cornerstoneTools',
'dcmjs': 'dcmjs',
'dicom-parser': 'dicomParser',
'ohif-core': 'OHIF',
'hammerjs': 'Hammer'
};
export default {
input: 'src/index.js',
output: [
{
file: pkg.main,
format: 'umd',
name: 'ohif-cornerstone-extension',
sourcemap: true,
globals
},
{
file: pkg.module,
format: 'es',
sourcemap: true,
globals
}
],
plugins: [
builtins(),
external(),
postcss({
modules: false
}),
url(),
babel({
exclude: 'node_modules/**',
externalHelpers: true,
runtimeHelpers: true
}),
resolve(),
commonjs({
include: 'node_modules/**',
namedExports: {
'node_modules/react-is/index.js': [
'isValidElementType'
]
}
})
],
external: Object.keys(pkg.peerDependencies || {}),
}

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"ie": "11"
}
}],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
]
}

View File

@ -1,9 +0,0 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@ -1,16 +0,0 @@
{
"extends": [
"react-app",
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"env": {
"jest": true
},
"settings": {
"react": {
"version": "detect",
},
},
}

View File

@ -1,23 +0,0 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
node_modules
# builds
build
dist
.rpt2_cache
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea

View File

@ -1,9 +0,0 @@
{
"trailingComma": "es5",
"printWidth": 80,
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"endOfLine": "lf"
}

View File

@ -1,4 +0,0 @@
language: node_js
node_js:
- 9
- 8

View File

@ -1,89 +0,0 @@
{
"name": "@ohif/extension-dicom-html",
"version": "0.0.3",
"description": "OHIF extension for rendering structured reports to HTML",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
"engines": {
"node": ">=8",
"npm": ">=5"
},
"scripts": {
"build": "rollup -c",
"prepublishOnly": "npm run build",
"start": "rollup -c -w",
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}"
},
"peerDependencies": {
"dcmjs": "^0.3.3",
"ohif-core": "^0.6.0",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"@svgr/rollup": "^4.1.0",
"babel-eslint": "^9.0.0",
"cross-env": "^5.2.0",
"eslint": "5.6.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.11.1",
"gh-pages": "^2.0.1",
"husky": "^1.3.1",
"lint-staged": "^8.1.0",
"lodash.clonedeep": "^4.5.0",
"prettier": "^1.15.3",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-scripts": "^2.1.2",
"rollup": "^0.68.2",
"rollup-plugin-babel": "^4.2.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^1.6.3",
"rollup-plugin-url": "^2.1.0",
"stylelint": "^9.9.0",
"stylelint-config-recommended": "^2.1.0",
"stylus": "^0.54.5"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,json,css}": [
"prettier --single-quote --write",
"git add"
]
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"files": [
"dist"
],
"publishConfig": {
"access": "public"
}
}

View File

@ -1,55 +0,0 @@
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import external from 'rollup-plugin-peer-deps-external'
import postcss from 'rollup-plugin-postcss'
import resolve from 'rollup-plugin-node-resolve'
import url from 'rollup-plugin-url'
import svgr from '@svgr/rollup'
import pkg from './package.json'
// Deal with https://github.com/rollup/rollup-plugin-commonjs/issues/297
import builtins from 'rollup-plugin-node-builtins';
const globals = {
'react': 'React',
'react-dom': 'ReactDOM',
'prop-types': 'PropTypes',
'ohif-core': 'OHIF',
'dcmjs': 'dcmjs'
};
export default {
input: 'src/index.js',
output: [
{
file: pkg.main,
format: 'umd',
name: 'ohif-dicom-pdf-extension',
sourcemap: true,
globals
},
{
file: pkg.module,
format: 'es',
sourcemap: true,
globals
}
],
plugins: [
builtins(),
external(),
postcss({
modules: false
}),
url(),
svgr(),
babel({
exclude: 'node_modules/**',
plugins: [ '@babel/external-helpers' ],
externalHelpers: true,
runtimeHelpers: true
}),
resolve(),
commonjs()
],
external: Object.keys(pkg.peerDependencies || {}),
}

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"ie": "11"
}
}],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
]
}

View File

@ -1,9 +0,0 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@ -1,16 +0,0 @@
{
"extends": [
"react-app",
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"env": {
"jest": true
},
"settings": {
"react": {
"version": "detect",
},
},
}

View File

@ -1,23 +0,0 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
node_modules
# builds
build
dist
.rpt2_cache
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea

View File

@ -1,9 +0,0 @@
{
"trailingComma": "es5",
"printWidth": 80,
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"endOfLine": "lf"
}

View File

@ -1,4 +0,0 @@
language: node_js
node_js:
- 9
- 8

Some files were not shown because too many files have changed in this diff Show More