Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c322df482d | ||
|
|
5d0b80b801 | ||
|
|
002488dc8a | ||
|
|
a6c0be0797 | ||
|
|
f421d16e85 | ||
|
|
a5baa9228c | ||
|
|
23372fbfbd | ||
|
|
d9d9aa1728 | ||
|
|
b1657ac1ef | ||
|
|
ea45681d00 | ||
|
|
a97bd302f7 | ||
|
|
e1542f50f8 | ||
|
|
abdbe9a608 | ||
|
|
755da173ea | ||
|
|
8c5bd55f88 | ||
|
|
e98611fc24 | ||
|
|
fa0aa7f68e | ||
|
|
30902bc048 | ||
|
|
4b532183af | ||
|
|
58b3727a2e | ||
|
|
d48e29d1bb | ||
|
|
e47dcf27fc | ||
|
|
60f48fbdc0 | ||
|
|
9a5372766c | ||
|
|
e0cf337222 | ||
|
|
7db3bde95a | ||
|
|
b081e73297 | ||
|
|
ce72d8bb15 | ||
|
|
7ba2916cf5 | ||
|
|
4736ad5620 | ||
|
|
44f562e24c | ||
|
|
8683e1e8ff | ||
|
|
f86eb5e8f2 | ||
|
|
64fd724455 | ||
|
|
b2dfb6e0f7 | ||
|
|
7c043b46b4 | ||
|
|
62932b3e80 | ||
|
|
7a7b2774e6 | ||
|
|
1556b3bbf8 | ||
|
|
199db68674 | ||
|
|
d74b6fb826 | ||
|
|
aeac900496 | ||
|
|
835fec7f32 | ||
|
|
4c202ed064 | ||
|
|
e751e8fab8 | ||
|
|
ae795ea97d | ||
|
|
d90c70cab5 | ||
|
|
1a8fd13896 | ||
|
|
0026801b62 | ||
|
|
395315ea4c | ||
|
|
4664f673d6 | ||
|
|
a8c4534b33 | ||
|
|
e4a3510c86 | ||
|
|
d28f332312 | ||
|
|
37f60ba0af | ||
|
|
d64cdc429e | ||
|
|
e06e8304d3 | ||
|
|
0e862c69db | ||
|
|
fbdb61bcb2 | ||
|
|
3acea218fb | ||
|
|
a521ce31ce | ||
|
|
67e2fd39a3 | ||
|
|
253620650b | ||
|
|
31357ea9b5 | ||
|
|
b8baae7c25 | ||
|
|
5544c57c37 | ||
|
|
6b523cb50d | ||
|
|
579c2b41d1 | ||
|
|
9449ae4314 | ||
|
|
4386b5c960 | ||
|
|
fe3ee3010f | ||
|
|
ee5530183e | ||
|
|
413214786d | ||
|
|
0b62b720c5 | ||
|
|
c3fead1ca9 | ||
|
|
bc8d505a0a | ||
|
|
ab4067144f | ||
|
|
575d11ac5b | ||
|
|
aa53d3258c | ||
|
|
dc672bf38d | ||
|
|
65a855d99b | ||
|
|
99c1d0220d | ||
|
|
dab0b5e0e3 | ||
|
|
ea3f7d5657 | ||
|
|
3c812792bb | ||
|
|
ff21408440 | ||
|
|
fd720bd4d7 | ||
|
|
2279e555a3 | ||
|
|
91ee615aee | ||
|
|
f8d9bbef8a | ||
|
|
4fcf544abe | ||
|
|
2ba0e95fe8 | ||
|
|
91564bfa06 | ||
|
|
83e627e5c9 | ||
|
|
2fbbb4a8e2 | ||
|
|
c05058a0f5 | ||
|
|
2429294dda | ||
|
|
2234869b11 | ||
|
|
96686850cb | ||
|
|
35dc82e120 | ||
|
|
f5d6674b62 | ||
|
|
f3009c7a45 | ||
|
|
e8969fba11 | ||
|
|
f175d4b96b | ||
|
|
e250ac0c50 | ||
|
|
3e1e456cc2 | ||
|
|
e58ba39a60 | ||
|
|
b73ea99971 |
19
.babelrc
19
.babelrc
@ -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"
|
||||
]
|
||||
}
|
||||
@ -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:
|
||||
|
||||
11
.codecov.yml
11
.codecov.yml
@ -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
|
||||
|
||||
@ -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
39
.gitattributes
vendored
@ -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
40
.github/ISSUE_TEMPLATE/---bug-report.md
vendored
Normal 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**
|
||||
18
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/---feature-request.md
vendored
Normal 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!
|
||||
|
||||
### 👉 [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.
|
||||
15
.github/ISSUE_TEMPLATE/---support-question.md
vendored
Normal file
15
.github/ISSUE_TEMPLATE/---support-question.md
vendored
Normal 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
45
.jscsrc
@ -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
|
||||
}
|
||||
93
.jshintrc
93
.jshintrc
@ -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
|
||||
}
|
||||
}
|
||||
81
.netlify/build-deploy-preview.sh
Normal file
81
.netlify/build-deploy-preview.sh
Normal 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
0
publishStaticSite.sh → .netlify/publishStaticSite.sh
Executable file → Normal file
@ -4,6 +4,5 @@
|
||||
"proseWrap": "always",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
"singleQuote": true
|
||||
}
|
||||
|
||||
14
.releaserc
14
.releaserc
@ -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
14
.scripts/dev.sh
Normal 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...'
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -25,6 +25,6 @@
|
||||
{ "language": "javascriptreact", "autoFix": true }
|
||||
],
|
||||
"prettier.disableLanguages": [],
|
||||
"prettier.endOfLine": "lf"
|
||||
"prettier.endOfLine": "lf",
|
||||
"workbench.colorCustomizations": {}
|
||||
}
|
||||
|
||||
90
.webpack/webpack.common.js
Normal file
90
.webpack/webpack.common.js
Normal 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
|
||||
}
|
||||
};
|
||||
};
|
||||
4
LICENSE
4
LICENSE
@ -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
|
||||
|
||||
343
README.md
343
README.md
@ -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]
|
||||
[](#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]
|
||||
[](#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
8
aliases.config.js
Normal 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
50
babel.config.js
Normal 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"]
|
||||
};
|
||||
@ -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 -->
|
||||
|
||||
@ -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);
|
||||
|
||||
23
docs/latest/advanced/monorepos-a-crash-courese.md
Normal file
23
docs/latest/advanced/monorepos-a-crash-courese.md
Normal 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 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
8
eslintAliasesResolver.js
Normal file
8
eslintAliasesResolver.js
Normal 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 };
|
||||
};
|
||||
25
extensions/cornerstone/CHANGELOG.md
Normal file
25
extensions/cornerstone/CHANGELOG.md
Normal 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
|
||||
67
extensions/cornerstone/config/webpack.common.js
Normal file
67
extensions/cornerstone/config/webpack.common.js
Normal 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*/
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
64
extensions/cornerstone/config/webpack.prod.js
Normal file
64
extensions/cornerstone/config/webpack.prod.js
Normal 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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
};
|
||||
52
extensions/cornerstone/package.json
Normal file
52
extensions/cornerstone/package.json
Normal 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"
|
||||
}
|
||||
@ -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);
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -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
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
25
extensions/dicom-html/CHANGELOG.md
Normal file
25
extensions/dicom-html/CHANGELOG.md
Normal 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
|
||||
1
extensions/dicom-html/README.md
Normal file
1
extensions/dicom-html/README.md
Normal file
@ -0,0 +1 @@
|
||||
# @ohif/extension-dicom-html
|
||||
1
extensions/dicom-html/app.css
Normal file
1
extensions/dicom-html/app.css
Normal 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)}
|
||||
67
extensions/dicom-html/config/webpack.common.js
Normal file
67
extensions/dicom-html/config/webpack.common.js
Normal 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*/
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
64
extensions/dicom-html/config/webpack.prod.js
Normal file
64
extensions/dicom-html/config/webpack.prod.js
Normal 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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
};
|
||||
39
extensions/dicom-html/package.json
Normal file
39
extensions/dicom-html/package.json
Normal 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"
|
||||
}
|
||||
@ -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,
|
||||
25
extensions/dicom-microscopy/CHANGELOG.md
Normal file
25
extensions/dicom-microscopy/CHANGELOG.md
Normal 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
|
||||
67
extensions/dicom-microscopy/config/webpack.common.js
Normal file
67
extensions/dicom-microscopy/config/webpack.common.js
Normal 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*/
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
64
extensions/dicom-microscopy/config/webpack.prod.js
Normal file
64
extensions/dicom-microscopy/config/webpack.prod.js
Normal 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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
};
|
||||
39
extensions/dicom-microscopy/package.json
Normal file
39
extensions/dicom-microscopy/package.json
Normal 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"
|
||||
}
|
||||
@ -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;
|
||||
25
extensions/dicom-pdf/CHANGELOG.md
Normal file
25
extensions/dicom-pdf/CHANGELOG.md
Normal 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
|
||||
1
extensions/dicom-pdf/README.md
Normal file
1
extensions/dicom-pdf/README.md
Normal file
@ -0,0 +1 @@
|
||||
# @ohif/extension-dicom-pdf
|
||||
67
extensions/dicom-pdf/config/webpack.common.js
Normal file
67
extensions/dicom-pdf/config/webpack.common.js
Normal 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*/
|
||||
}),
|
||||
],
|
||||
};
|
||||
};
|
||||
64
extensions/dicom-pdf/config/webpack.prod.js
Normal file
64
extensions/dicom-pdf/config/webpack.prod.js
Normal 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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
};
|
||||
41
extensions/dicom-pdf/package.json
Normal file
41
extensions/dicom-pdf/package.json
Normal 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"
|
||||
}
|
||||
@ -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,
|
||||
@ -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);
|
||||
});
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": {
|
||||
"ie": "11"
|
||||
}
|
||||
}],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
}
|
||||
@ -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
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"react-app",
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect",
|
||||
},
|
||||
},
|
||||
}
|
||||
26
extensions/ohif-cornerstone-extension/.gitignore
vendored
26
extensions/ohif-cornerstone-extension/.gitignore
vendored
@ -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
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 80,
|
||||
"proseWrap": "always",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 9
|
||||
- 8
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
@ -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
@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": {
|
||||
"ie": "11"
|
||||
}
|
||||
}],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
}
|
||||
@ -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
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"react-app",
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect",
|
||||
},
|
||||
},
|
||||
}
|
||||
23
extensions/ohif-dicom-html-extension/.gitignore
vendored
23
extensions/ohif-dicom-html-extension/.gitignore
vendored
@ -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
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 80,
|
||||
"proseWrap": "always",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 9
|
||||
- 8
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
@ -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
@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": {
|
||||
"ie": "11"
|
||||
}
|
||||
}],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
}
|
||||
@ -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
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"react-app",
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect",
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -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
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 80,
|
||||
"proseWrap": "always",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
@ -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
Loading…
Reference in New Issue
Block a user