larvitar 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +2 -2
  2. package/dist/larvitar.js +5 -3
  3. package/dist/larvitar.js.map +1 -1
  4. package/package.json +6 -2
  5. package/.github/workflows/build-docs.yml +0 -59
  6. package/.github/workflows/codeql-analysis.yml +0 -71
  7. package/.github/workflows/deploy.yml +0 -37
  8. package/.vscode/settings.json +0 -4
  9. package/CODE_OF_CONDUCT.md +0 -76
  10. package/MIGRATION.md +0 -25
  11. package/bundler/webpack.common.js +0 -27
  12. package/bundler/webpack.dev.js +0 -23
  13. package/bundler/webpack.prod.js +0 -19
  14. package/decs.d.ts +0 -12
  15. package/imaging/MetaDataReadable.ts +0 -42
  16. package/imaging/MetaDataTypes.ts +0 -3491
  17. package/imaging/dataDictionary.json +0 -21866
  18. package/imaging/imageAnonymization.ts +0 -135
  19. package/imaging/imageColormaps.ts +0 -217
  20. package/imaging/imageContours.ts +0 -196
  21. package/imaging/imageIo.ts +0 -251
  22. package/imaging/imageLayers.ts +0 -121
  23. package/imaging/imageLoading.ts +0 -299
  24. package/imaging/imageParsing.ts +0 -444
  25. package/imaging/imagePresets.ts +0 -156
  26. package/imaging/imageRendering.ts +0 -1091
  27. package/imaging/imageReslice.ts +0 -87
  28. package/imaging/imageStore.ts +0 -487
  29. package/imaging/imageTags.ts +0 -609
  30. package/imaging/imageTools.js +0 -708
  31. package/imaging/imageUtils.ts +0 -1079
  32. package/imaging/loaders/commonLoader.ts +0 -275
  33. package/imaging/loaders/dicomLoader.ts +0 -66
  34. package/imaging/loaders/fileLoader.ts +0 -71
  35. package/imaging/loaders/multiframeLoader.ts +0 -435
  36. package/imaging/loaders/nrrdLoader.ts +0 -630
  37. package/imaging/loaders/resliceLoader.ts +0 -205
  38. package/imaging/monitors/memory.ts +0 -151
  39. package/imaging/monitors/performance.ts +0 -34
  40. package/imaging/parsers/ecg.ts +0 -54
  41. package/imaging/parsers/nrrd.js +0 -485
  42. package/imaging/tools/README.md +0 -27
  43. package/imaging/tools/custom/4dSliceScrollTool.js +0 -146
  44. package/imaging/tools/custom/BorderMagnifyTool.js +0 -99
  45. package/imaging/tools/custom/contourTool.js +0 -1884
  46. package/imaging/tools/custom/diameterTool.js +0 -141
  47. package/imaging/tools/custom/editMaskTool.js +0 -141
  48. package/imaging/tools/custom/ellipticalRoiOverlayTool.js +0 -534
  49. package/imaging/tools/custom/polygonSegmentationMixin.js +0 -245
  50. package/imaging/tools/custom/polylineScissorsTool.js +0 -59
  51. package/imaging/tools/custom/rectangleRoiOverlayTool.js +0 -564
  52. package/imaging/tools/custom/seedTool.js +0 -342
  53. package/imaging/tools/custom/setLabelMap3D.ts +0 -242
  54. package/imaging/tools/custom/thresholdsBrushTool.js +0 -161
  55. package/imaging/tools/default.ts +0 -594
  56. package/imaging/tools/interaction.ts +0 -266
  57. package/imaging/tools/io.ts +0 -229
  58. package/imaging/tools/main.ts +0 -424
  59. package/imaging/tools/segmentation.ts +0 -532
  60. package/imaging/tools/segmentations.md +0 -38
  61. package/imaging/tools/state.ts +0 -74
  62. package/imaging/tools/strategies/eraseFreehand.js +0 -76
  63. package/imaging/tools/strategies/fillFreehand.js +0 -79
  64. package/imaging/tools/strategies/index.js +0 -2
  65. package/imaging/tools/types.d.ts +0 -243
  66. package/imaging/types.d.ts +0 -200
  67. package/imaging/waveforms/ecg.ts +0 -191
  68. package/index.ts +0 -431
  69. package/jsdoc.json +0 -52
  70. package/rollup.config.js +0 -51
  71. package/template/.gitkeep +0 -0
  72. package/tsconfig.json +0 -102
package/package.json CHANGED
@@ -6,13 +6,17 @@
6
6
  "medical",
7
7
  "cornerstone"
8
8
  ],
9
- "version": "2.0.4",
9
+ "version": "2.0.6",
10
10
  "description": "typescript library for parsing, loading, rendering and interacting with DICOM images",
11
11
  "repository": {
12
12
  "url": "https://github.com/dvisionlab/Larvitar.git",
13
13
  "type": "git"
14
14
  },
15
- "main": "index.ts",
15
+ "main": "dist/larvitar.js",
16
+ "types": "dist/index.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
16
20
  "scripts": {
17
21
  "coverage": "typescript-coverage-report",
18
22
  "generate-docs": "node_modules/.bin/jsdoc -c jsdoc.json",
@@ -1,59 +0,0 @@
1
- name: CI-docs
2
-
3
- on:
4
- pull_request:
5
- types:
6
- - opened
7
- - reopened
8
- - synchronize
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- # CLone repo at current branch
16
- - name: Clone repo
17
- uses: actions/checkout@v2
18
- with:
19
- persist-credentials: false
20
- ref: ${{ github.head_ref }}
21
- token: ${{ secrets.GIT_TOKEN }}
22
-
23
- # Setup node environment
24
- - name: Setup Node.js environment
25
- uses: actions/setup-node@v2
26
- with:
27
- node-version: "14"
28
-
29
- # Install node modules
30
- - name: Install node modules
31
- run: |
32
- yarn install
33
-
34
- # Clone template
35
- - name: Clone docdash template
36
- uses: actions/checkout@v2
37
- with:
38
- repository: clenemt/docdash
39
- path: ./template/docdash/
40
-
41
- # Install docdash node modules
42
- - name: Install node modules
43
- working-directory: ./template/docdash/
44
- run: |
45
- yarn install
46
-
47
- # Generate docs
48
- - name: Generate docs
49
- run: |
50
- yarn generate-docs
51
-
52
- # Commit docs on current branch (update pull request)
53
- - name: Commit docs
54
- uses: actions-js/push@master
55
- with:
56
- github_token: ${{ secrets.GITHUB_TOKEN }}
57
- message: "Update docs"
58
- branch: ${{ github.head_ref }}
59
- empty: true
@@ -1,71 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- push:
16
- branches: [ master ]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [ master ]
20
- schedule:
21
- - cron: '22 19 * * 0'
22
-
23
- jobs:
24
- analyze:
25
- name: Analyze
26
- runs-on: ubuntu-latest
27
- permissions:
28
- actions: read
29
- contents: read
30
- security-events: write
31
-
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- language: [ 'javascript' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37
- # Learn more:
38
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39
-
40
- steps:
41
- - name: Checkout repository
42
- uses: actions/checkout@v2
43
-
44
- # Initializes the CodeQL tools for scanning.
45
- - name: Initialize CodeQL
46
- uses: github/codeql-action/init@v1
47
- with:
48
- languages: ${{ matrix.language }}
49
- # If you wish to specify custom queries, you can do so here or in a config file.
50
- # By default, queries listed here will override any specified in a config file.
51
- # Prefix the list here with "+" to use these queries and those in the config file.
52
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
53
-
54
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
- # If this step fails, then you should remove it and run the build manually (see below)
56
- - name: Autobuild
57
- uses: github/codeql-action/autobuild@v1
58
-
59
- # ℹ️ Command-line programs to run using the OS shell.
60
- # 📚 https://git.io/JvXDl
61
-
62
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63
- # and modify them (or add more) to build your code if your project
64
- # uses a compiled language
65
-
66
- #- run: |
67
- # make bootstrap
68
- # make release
69
-
70
- - name: Perform CodeQL Analysis
71
- uses: github/codeql-action/analyze@v1
@@ -1,37 +0,0 @@
1
- # This is a basic workflow to help you get started with Actions
2
-
3
- name: CI-Release
4
-
5
- # Controls when the action will run. Triggers the workflow on push or pull request
6
- # events but only for the master branch
7
- on:
8
- release:
9
- types: [published]
10
-
11
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12
- jobs:
13
- # This workflow contains a single job called "build"
14
- build:
15
- # The type of runner that the job will run on
16
- runs-on: ubuntu-latest
17
-
18
- # Steps represent a sequence of tasks that will be executed as part of the job
19
- steps:
20
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21
- - uses: actions/checkout@v2
22
-
23
- # Setup node environment
24
- - name: Setup Node.js environment
25
- uses: actions/setup-node@v1.4.4
26
-
27
- # Clean examples and docs file
28
- - name: Clean examples and docs file
29
- run: |
30
- cd ${{ github.workspace }}
31
- rm -rf docs
32
-
33
- # Publish to npm
34
- - name: Publish to npm
35
- run: |
36
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
37
- npm publish
@@ -1,4 +0,0 @@
1
- {
2
- "prettier.arrowParens": "avoid",
3
- "prettier.trailingComma": "none"
4
- }
@@ -1,76 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, sex characteristics, gender identity and expression,
9
- level of experience, education, socio-economic status, nationality, personal
10
- appearance, race, religion, or sexual identity and orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at info@dvisionlab.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
-
73
- [homepage]: https://www.contributor-covenant.org
74
-
75
- For answers to common questions about this code of conduct, see
76
- https://www.contributor-covenant.org/faq
package/MIGRATION.md DELETED
@@ -1,25 +0,0 @@
1
- # Introduction
2
-
3
- This guide is primarily for user with prior Larvitar v0.x experience who want to learn about the new features and changes in Larvitar v1.x. While it looks like a lot has changed, a lot of what you know and love about Larvitar is still the same; but we wanted to be as thorough as possibile and provide detailed explanations or examples for every documented change.
4
-
5
- # Notable new features
6
-
7
- We chose to migrate all functions using callback to promise. Promises are JavaScript objects that represent an eventual completion or failure of an asynchronous operation. A promise is a returned object where you attach callbacks, instead of passing callbacks into a function. the place where you attach the callback after a successful completion of a task is called, .then(). inside this you pass a callback through.
8
-
9
- # Breaking changes
10
-
11
- - imageIo module:
12
- - *getCachedPixelData* now returns a promise which will resolve to a pixel data array or fail if an error occurs
13
- - imageParsing module
14
- - *readFiles* now returns a promise which will resolve to an image object list or fail if an error occurs
15
- - *readFile* now returns a promise which will resolve to an image object or fail if an error occurs
16
- - *dumpDataset* has been renamed to parseDataset [internal API]
17
- - *dumpFiles* has been renamed to parseFiles [internal API]
18
- - *dumpFile* has been renamed to parseFile [internal API]
19
- - imageRendering module
20
- - *renderImage* now returns a promise which will resolve when image is displayed
21
- - imageReslice module
22
- - *resliceImage* now returns a promise which will resolve when reslice data is available
23
- - tools/segmentation module
24
- - *addSegmentationMask* now returns a promise which will resolve when segmentation mask is added
25
- - *getActivelabelmapBuffer* now needs elementId (or its DOM HTMLElement) as param and returns the buffer parent object"
@@ -1,27 +0,0 @@
1
- module.exports = {
2
- devtool: "source-map", // or inline-source-map ?
3
- module: {
4
- rules: [
5
- // HTML
6
- {
7
- test: /\.(html)$/,
8
- use: ["html-loader"]
9
- },
10
- // JS
11
- {
12
- test: /\.js$/,
13
- exclude: /node_modules/,
14
- use: ["babel-loader"]
15
- },
16
- // typescript support
17
- {
18
- test: /\.tsx?$/,
19
- use: "ts-loader",
20
- exclude: /node_modules/
21
- }
22
- ]
23
- },
24
- resolve: {
25
- extensions: [".tsx", ".ts", ".js", ".d.ts"]
26
- }
27
- };
@@ -1,23 +0,0 @@
1
- const path = require("path");
2
- const { merge } = require("webpack-merge");
3
- const commonConfiguration = require("./webpack.common.js");
4
- const { CleanWebpackPlugin } = require("clean-webpack-plugin");
5
-
6
- module.exports = merge(commonConfiguration, {
7
- entry: path.resolve(__dirname, "../index.ts"),
8
- output: {
9
- path: path.resolve(__dirname, "../dist"),
10
- filename: "larvitar.js",
11
- library: "larvitar",
12
- libraryTarget: "umd"
13
- },
14
- mode: "development",
15
- plugins: [new CleanWebpackPlugin()],
16
- watch: true,
17
- watchOptions: {
18
- ignored: /node_modules/
19
- },
20
- optimization: {
21
- minimize: false
22
- }
23
- });
@@ -1,19 +0,0 @@
1
- const path = require("path");
2
- const { merge } = require("webpack-merge");
3
- const commonConfiguration = require("./webpack.common.js");
4
- const { CleanWebpackPlugin } = require("clean-webpack-plugin");
5
-
6
- module.exports = merge(commonConfiguration, {
7
- entry: path.resolve(__dirname, "../index.ts"),
8
- output: {
9
- path: path.resolve(__dirname, "../dist"),
10
- filename: "larvitar.js",
11
- library: "larvitar",
12
- libraryTarget: "umd"
13
- },
14
- mode: "production",
15
- plugins: [new CleanWebpackPlugin()],
16
- optimization: {
17
- minimize: false
18
- }
19
- });
package/decs.d.ts DELETED
@@ -1,12 +0,0 @@
1
- declare module "cornerstone-math";
2
- declare module "cornerstone-tools";
3
- declare module "cornerstone-wado-image-loader";
4
- declare module "cornerstone-web-image-loader";
5
- declare module "cornerstone-file-image-loader";
6
- declare module "dicom-character-set";
7
-
8
- declare global {
9
- interface Document {
10
- documentMode?: any;
11
- }
12
- }
@@ -1,42 +0,0 @@
1
- //human readable dictionary
2
- export type MetaDataReadable = {
3
- anonymized?: boolean;
4
- larvitarSeriesInstanceUID?: string;
5
- seriesUID?: string;
6
- instanceUID?: string;
7
- sopClassUID?: string;
8
- studyUID?: string;
9
- accessionNumber?: string;
10
- studyDescription?: string;
11
- patientName?: string;
12
- patientBirthdate?: string;
13
- seriesDescription?: string;
14
- seriesDate?: string;
15
- seriesModality?: string;
16
- intercept?: number | number[];
17
- slope?: number | number[];
18
- pixelSpacing?: [number, number];
19
- sliceThickness?: number | number[];
20
- imageOrientation?: [number, number, number, number, number, number];
21
- imagePosition?: [number, number] | [number, number, number] | number[];
22
- rows?: number;
23
- cols?: number;
24
- numberOfSlices?: number;
25
- numberOfFrames?: number;
26
- frameTime?: number;
27
- frameDelay?: number;
28
- rWaveTimeVector?: number[];
29
- isMultiframe?: boolean;
30
- waveform?: boolean;
31
- temporalPositionIdentifier?: number;
32
- numberOfTemporalPositions?: number;
33
- contentTime?: number;
34
- is4D?: boolean;
35
- windowCenter?: number | number[];
36
- windowWidth?: number | number[];
37
- minPixelValue?: number;
38
- maxPixelValue?: number;
39
- length?: number;
40
- repr?: string | null;
41
- mimeType?: string;
42
- };