larvitar 2.0.5 → 2.0.7
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.
- package/README.md +2 -2
- package/dist/imaging/imageRendering.d.ts +1 -71
- package/dist/imaging/imageStore.d.ts +5 -0
- package/dist/imaging/loaders/commonLoader.d.ts +4 -4
- package/dist/imaging/loaders/nrrdLoader.d.ts +1 -51
- package/dist/larvitar.js +13 -1
- package/dist/larvitar.js.map +1 -1
- package/imaging/tools/types.d.ts +19 -19
- package/imaging/types.d.ts +110 -2
- package/package.json +7 -2
- package/.github/workflows/build-docs.yml +0 -59
- package/.github/workflows/codeql-analysis.yml +0 -71
- package/.github/workflows/deploy.yml +0 -37
- package/.vscode/settings.json +0 -4
- package/CODE_OF_CONDUCT.md +0 -76
- package/MIGRATION.md +0 -25
- package/bundler/webpack.common.js +0 -27
- package/bundler/webpack.dev.js +0 -23
- package/bundler/webpack.prod.js +0 -19
- package/decs.d.ts +0 -12
- package/dist/imaging/MetaDataReadable.d.ts +0 -41
- package/dist/imaging/MetaDataTypes.d.ts +0 -3489
- package/imaging/dataDictionary.json +0 -21866
- package/imaging/imageAnonymization.ts +0 -135
- package/imaging/imageColormaps.ts +0 -217
- package/imaging/imageContours.ts +0 -196
- package/imaging/imageIo.ts +0 -251
- package/imaging/imageLayers.ts +0 -121
- package/imaging/imageLoading.ts +0 -299
- package/imaging/imageParsing.ts +0 -444
- package/imaging/imagePresets.ts +0 -156
- package/imaging/imageRendering.ts +0 -1091
- package/imaging/imageReslice.ts +0 -87
- package/imaging/imageStore.ts +0 -487
- package/imaging/imageTags.ts +0 -609
- package/imaging/imageTools.js +0 -708
- package/imaging/imageUtils.ts +0 -1079
- package/imaging/loaders/commonLoader.ts +0 -275
- package/imaging/loaders/dicomLoader.ts +0 -66
- package/imaging/loaders/fileLoader.ts +0 -71
- package/imaging/loaders/multiframeLoader.ts +0 -435
- package/imaging/loaders/nrrdLoader.ts +0 -630
- package/imaging/loaders/resliceLoader.ts +0 -205
- package/imaging/monitors/memory.ts +0 -151
- package/imaging/monitors/performance.ts +0 -34
- package/imaging/parsers/ecg.ts +0 -54
- package/imaging/parsers/nrrd.js +0 -485
- package/imaging/tools/custom/4dSliceScrollTool.js +0 -146
- package/imaging/tools/custom/BorderMagnifyTool.js +0 -99
- package/imaging/tools/custom/contourTool.js +0 -1884
- package/imaging/tools/custom/diameterTool.js +0 -141
- package/imaging/tools/custom/editMaskTool.js +0 -141
- package/imaging/tools/custom/ellipticalRoiOverlayTool.js +0 -534
- package/imaging/tools/custom/polygonSegmentationMixin.js +0 -245
- package/imaging/tools/custom/polylineScissorsTool.js +0 -59
- package/imaging/tools/custom/rectangleRoiOverlayTool.js +0 -564
- package/imaging/tools/custom/seedTool.js +0 -342
- package/imaging/tools/custom/setLabelMap3D.ts +0 -242
- package/imaging/tools/custom/thresholdsBrushTool.js +0 -161
- package/imaging/tools/default.ts +0 -594
- package/imaging/tools/interaction.ts +0 -266
- package/imaging/tools/io.ts +0 -229
- package/imaging/tools/main.ts +0 -427
- package/imaging/tools/segmentation.ts +0 -532
- package/imaging/tools/segmentations.md +0 -38
- package/imaging/tools/state.ts +0 -74
- package/imaging/tools/strategies/eraseFreehand.js +0 -76
- package/imaging/tools/strategies/fillFreehand.js +0 -79
- package/imaging/tools/strategies/index.js +0 -2
- package/imaging/waveforms/ecg.ts +0 -191
- package/index.ts +0 -431
- package/jsdoc.json +0 -52
- package/rollup.config.js +0 -51
- package/template/.gitkeep +0 -0
- package/tsconfig.json +0 -102
- /package/imaging/{MetaDataReadable.ts → MetaDataReadable.d.ts} +0 -0
- /package/imaging/{MetaDataTypes.ts → MetaDataTypes.d.ts} +0 -0
package/imaging/tools/types.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type ToolMouseKeys = {
|
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
type
|
|
61
|
+
type HandlePosition = {
|
|
62
62
|
active: boolean;
|
|
63
63
|
allowedOutsideImage?: boolean;
|
|
64
64
|
drawnIndependently?: boolean;
|
|
@@ -94,9 +94,9 @@ type BaseToolStateData = {
|
|
|
94
94
|
|
|
95
95
|
type AngleStateData = BaseToolStateData & {
|
|
96
96
|
handles: {
|
|
97
|
-
end:
|
|
98
|
-
middle:
|
|
99
|
-
start:
|
|
97
|
+
end: HandlePosition;
|
|
98
|
+
middle: HandlePosition;
|
|
99
|
+
start: HandlePosition;
|
|
100
100
|
textBox: HandleTextBox;
|
|
101
101
|
};
|
|
102
102
|
rAngle: number;
|
|
@@ -104,8 +104,8 @@ type AngleStateData = BaseToolStateData & {
|
|
|
104
104
|
|
|
105
105
|
type ArrowAnnotateStateData = BaseToolStateData & {
|
|
106
106
|
handles: {
|
|
107
|
-
end:
|
|
108
|
-
start:
|
|
107
|
+
end: HandlePosition;
|
|
108
|
+
start: HandlePosition;
|
|
109
109
|
textBox: HandleTextBox;
|
|
110
110
|
};
|
|
111
111
|
text: string;
|
|
@@ -113,10 +113,10 @@ type ArrowAnnotateStateData = BaseToolStateData & {
|
|
|
113
113
|
|
|
114
114
|
type BidirectionalStateData = BaseToolStateData & {
|
|
115
115
|
handles: {
|
|
116
|
-
end:
|
|
117
|
-
perpendicularEnd:
|
|
118
|
-
perpendicularStart:
|
|
119
|
-
start:
|
|
116
|
+
end: HandlePosition;
|
|
117
|
+
perpendicularEnd: HandlePosition;
|
|
118
|
+
perpendicularStart: HandlePosition;
|
|
119
|
+
start: HandlePosition;
|
|
120
120
|
textBox: HandleTextBox;
|
|
121
121
|
};
|
|
122
122
|
isCreating: boolean;
|
|
@@ -138,20 +138,20 @@ type EllipticalRoiStateData = BaseToolStateData & {
|
|
|
138
138
|
variance: number;
|
|
139
139
|
};
|
|
140
140
|
handles: {
|
|
141
|
-
end:
|
|
141
|
+
end: HandlePosition;
|
|
142
142
|
initialRotation: number;
|
|
143
|
-
start:
|
|
143
|
+
start: HandlePosition;
|
|
144
144
|
textBox: HandleTextBox;
|
|
145
145
|
};
|
|
146
146
|
unit: string;
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
type FreehandRoiStateData =
|
|
149
|
+
type FreehandRoiStateData = BaseToolStateData & {
|
|
150
150
|
area: number;
|
|
151
151
|
canComplete: boolean;
|
|
152
152
|
handles: {
|
|
153
|
-
points:
|
|
154
|
-
textBox:
|
|
153
|
+
points: number[];
|
|
154
|
+
textBox: HandleTextBox;
|
|
155
155
|
invalidHandlePlacement: boolean;
|
|
156
156
|
};
|
|
157
157
|
highlight: boolean;
|
|
@@ -163,8 +163,8 @@ type FreehandRoiStateData = ToolStateData & {
|
|
|
163
163
|
|
|
164
164
|
type LengthStateData = BaseToolStateData & {
|
|
165
165
|
handles: {
|
|
166
|
-
end:
|
|
167
|
-
start:
|
|
166
|
+
end: HandlePosition;
|
|
167
|
+
start: HandlePosition;
|
|
168
168
|
textBox: HandleTextBox;
|
|
169
169
|
};
|
|
170
170
|
length: number;
|
|
@@ -186,9 +186,9 @@ type RectangleRoiStateData = BaseToolStateData & {
|
|
|
186
186
|
variance: number;
|
|
187
187
|
};
|
|
188
188
|
handles: {
|
|
189
|
-
end:
|
|
189
|
+
end: HandlePosition;
|
|
190
190
|
initialRotation: number;
|
|
191
|
-
start:
|
|
191
|
+
start: HandlePosition;
|
|
192
192
|
textBox: HandleTextBox;
|
|
193
193
|
};
|
|
194
194
|
unit: string;
|
package/imaging/types.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { vec2 } from "cornerstone-core";
|
|
2
2
|
import { DataSet } from "dicom-parser";
|
|
3
|
-
import { DEFAULT_VIEWPORT } from "./imageStore";
|
|
4
|
-
import { NrrdSeries } from "./loaders/nrrdLoader";
|
|
5
3
|
import { MetaDataTypes } from "./MetaDataTypes";
|
|
6
4
|
import { MetaDataReadable } from "./MetaDataReadable";
|
|
7
5
|
|
|
@@ -16,6 +14,68 @@ import { MetaDataReadable } from "./MetaDataReadable";
|
|
|
16
14
|
| Array
|
|
17
15
|
| undefined; // null or undefined is only for nrrd*/
|
|
18
16
|
|
|
17
|
+
export type DEFAULT_VIEWPORT = {
|
|
18
|
+
loading: number;
|
|
19
|
+
ready: boolean;
|
|
20
|
+
minSliceId: number;
|
|
21
|
+
maxSliceId: number;
|
|
22
|
+
sliceId: number;
|
|
23
|
+
pendingSliceId?: number;
|
|
24
|
+
minTimeId: number;
|
|
25
|
+
maxTimeId: number;
|
|
26
|
+
timeId: number;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
timestamps: number[];
|
|
29
|
+
timeIds: number[];
|
|
30
|
+
rows: number;
|
|
31
|
+
cols: number;
|
|
32
|
+
spacing_x: number;
|
|
33
|
+
spacing_y: number;
|
|
34
|
+
thickness: number;
|
|
35
|
+
minPixelValue: number;
|
|
36
|
+
maxPixelValue: number;
|
|
37
|
+
isColor: boolean;
|
|
38
|
+
isMultiframe: boolean;
|
|
39
|
+
isTimeserie: boolean;
|
|
40
|
+
isPDF: boolean;
|
|
41
|
+
imageIndex?: number;
|
|
42
|
+
imageId?: string;
|
|
43
|
+
numberOfSlices?: number;
|
|
44
|
+
numberOfTemporalPositions?: number;
|
|
45
|
+
timeIndex?: number;
|
|
46
|
+
viewport: {
|
|
47
|
+
scale: number;
|
|
48
|
+
rotation: number;
|
|
49
|
+
translation: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
};
|
|
53
|
+
voi: {
|
|
54
|
+
windowCenter: number;
|
|
55
|
+
windowWidth: number;
|
|
56
|
+
};
|
|
57
|
+
// redundant fields ?
|
|
58
|
+
rows: number;
|
|
59
|
+
cols: number;
|
|
60
|
+
spacing_x: number;
|
|
61
|
+
spacing_y: number;
|
|
62
|
+
thickness: number;
|
|
63
|
+
};
|
|
64
|
+
default: {
|
|
65
|
+
scale: number;
|
|
66
|
+
rotation: number;
|
|
67
|
+
translation: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
};
|
|
71
|
+
voi: {
|
|
72
|
+
windowCenter: number;
|
|
73
|
+
windowWidth: number;
|
|
74
|
+
invert: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
19
79
|
export type MetaData = MetaDataTypes & MetaDataReadable;
|
|
20
80
|
export interface Image extends cornerstone.Image {
|
|
21
81
|
render?: Function;
|
|
@@ -198,3 +258,51 @@ type StoreViewportOptions = {
|
|
|
198
258
|
tr_x?: number;
|
|
199
259
|
tr_y?: number;
|
|
200
260
|
};
|
|
261
|
+
|
|
262
|
+
export type NrrdInputVolume = {
|
|
263
|
+
header: {
|
|
264
|
+
sizes: number[];
|
|
265
|
+
"space directions": number[][]; // a property with a space in the name ?? Seriously ??
|
|
266
|
+
"space origin": [number, number];
|
|
267
|
+
kinds: string[];
|
|
268
|
+
type: string;
|
|
269
|
+
};
|
|
270
|
+
data: Uint16Array; // TODO-ts: other typed arrays ?
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export type NrrdSeries = {
|
|
274
|
+
currentImageIdIndex: number;
|
|
275
|
+
imageIds: string[];
|
|
276
|
+
instances: { [key: string]: Instance };
|
|
277
|
+
instanceUIDs: { [key: string]: string };
|
|
278
|
+
numberOfImages: number;
|
|
279
|
+
seriesDescription: string;
|
|
280
|
+
seriesUID: string;
|
|
281
|
+
customLoader: string;
|
|
282
|
+
nrrdHeader: NrrdHeader;
|
|
283
|
+
bytes: number;
|
|
284
|
+
dataSet?: DataSet;
|
|
285
|
+
metadata?: MetaData;
|
|
286
|
+
ecgData?: number[];
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export type NrrdHeader = {
|
|
290
|
+
volume: Volume;
|
|
291
|
+
intercept: number;
|
|
292
|
+
slope: number;
|
|
293
|
+
repr: string;
|
|
294
|
+
phase: string;
|
|
295
|
+
study_description: string;
|
|
296
|
+
series_description: string;
|
|
297
|
+
acquisition_date: string;
|
|
298
|
+
[imageId: string]: string | number | Volume | NrrdInstance; // TODO-ts: fix this: we need just NrrdInstance
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export type NrrdInstance = {
|
|
302
|
+
instanceUID: string;
|
|
303
|
+
seriesDescription: string;
|
|
304
|
+
seriesModality: string;
|
|
305
|
+
patientName: string;
|
|
306
|
+
bitsAllocated: number;
|
|
307
|
+
pixelRepresentation: string;
|
|
308
|
+
};
|
package/package.json
CHANGED
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
"medical",
|
|
7
7
|
"cornerstone"
|
|
8
8
|
],
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.7",
|
|
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": "
|
|
15
|
+
"main": "dist/larvitar.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"imaging/**/*.d.ts"
|
|
20
|
+
],
|
|
16
21
|
"scripts": {
|
|
17
22
|
"coverage": "typescript-coverage-report",
|
|
18
23
|
"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
|
package/.vscode/settings.json
DELETED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -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
|
-
};
|
package/bundler/webpack.dev.js
DELETED
|
@@ -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
|
-
});
|
package/bundler/webpack.prod.js
DELETED
|
@@ -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,41 +0,0 @@
|
|
|
1
|
-
export type MetaDataReadable = {
|
|
2
|
-
anonymized?: boolean;
|
|
3
|
-
larvitarSeriesInstanceUID?: string;
|
|
4
|
-
seriesUID?: string;
|
|
5
|
-
instanceUID?: string;
|
|
6
|
-
sopClassUID?: string;
|
|
7
|
-
studyUID?: string;
|
|
8
|
-
accessionNumber?: string;
|
|
9
|
-
studyDescription?: string;
|
|
10
|
-
patientName?: string;
|
|
11
|
-
patientBirthdate?: string;
|
|
12
|
-
seriesDescription?: string;
|
|
13
|
-
seriesDate?: string;
|
|
14
|
-
seriesModality?: string;
|
|
15
|
-
intercept?: number | number[];
|
|
16
|
-
slope?: number | number[];
|
|
17
|
-
pixelSpacing?: [number, number];
|
|
18
|
-
sliceThickness?: number | number[];
|
|
19
|
-
imageOrientation?: [number, number, number, number, number, number];
|
|
20
|
-
imagePosition?: [number, number] | [number, number, number] | number[];
|
|
21
|
-
rows?: number;
|
|
22
|
-
cols?: number;
|
|
23
|
-
numberOfSlices?: number;
|
|
24
|
-
numberOfFrames?: number;
|
|
25
|
-
frameTime?: number;
|
|
26
|
-
frameDelay?: number;
|
|
27
|
-
rWaveTimeVector?: number[];
|
|
28
|
-
isMultiframe?: boolean;
|
|
29
|
-
waveform?: boolean;
|
|
30
|
-
temporalPositionIdentifier?: number;
|
|
31
|
-
numberOfTemporalPositions?: number;
|
|
32
|
-
contentTime?: number;
|
|
33
|
-
is4D?: boolean;
|
|
34
|
-
windowCenter?: number | number[];
|
|
35
|
-
windowWidth?: number | number[];
|
|
36
|
-
minPixelValue?: number;
|
|
37
|
-
maxPixelValue?: number;
|
|
38
|
-
length?: number;
|
|
39
|
-
repr?: string | null;
|
|
40
|
-
mimeType?: string;
|
|
41
|
-
};
|