@cornerstonejs/adapters 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/@cornerstonejs/adapters.es.js +3472 -28871
  2. package/dist/@cornerstonejs/adapters.es.js.map +1 -1
  3. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/Angle.d.ts +44 -0
  4. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/Bidirectional.d.ts +49 -0
  5. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/CobbAngle.d.ts +44 -0
  6. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/MeasurementReport.d.ts +53 -0
  7. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/PlanarFreehandROI.d.ts +30 -0
  8. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/RectangleROI.d.ts +30 -0
  9. package/dist/@cornerstonejs/dts/adapters/Cornerstone3D/index.d.ts +21 -0
  10. package/dist/@cornerstonejs/dts/index.d.ts +3 -0
  11. package/package.json +10 -35
  12. package/src/{index.js → index.ts} +0 -0
  13. package/dist/@cornerstonejs/adapters.js +0 -30195
  14. package/dist/@cornerstonejs/adapters.js.map +0 -1
  15. package/src/adapters/Cornerstone/Angle.js +0 -92
  16. package/src/adapters/Cornerstone/ArrowAnnotate.js +0 -106
  17. package/src/adapters/Cornerstone/Bidirectional.js +0 -187
  18. package/src/adapters/Cornerstone/CircleRoi.js +0 -109
  19. package/src/adapters/Cornerstone/CobbAngle.js +0 -96
  20. package/src/adapters/Cornerstone/EllipticalRoi.js +0 -149
  21. package/src/adapters/Cornerstone/FreehandRoi.js +0 -82
  22. package/src/adapters/Cornerstone/Length.js +0 -80
  23. package/src/adapters/Cornerstone/MeasurementReport.js +0 -352
  24. package/src/adapters/Cornerstone/RectangleRoi.js +0 -92
  25. package/src/adapters/Cornerstone/Segmentation.js +0 -118
  26. package/src/adapters/Cornerstone/Segmentation_3X.js +0 -632
  27. package/src/adapters/Cornerstone/Segmentation_4X.js +0 -1543
  28. package/src/adapters/Cornerstone/cornerstone4Tag.js +0 -1
  29. package/src/adapters/Cornerstone/index.js +0 -27
  30. package/src/adapters/Cornerstone3D/ArrowAnnotate.js +0 -155
  31. package/src/adapters/Cornerstone3D/Bidirectional.js +0 -196
  32. package/src/adapters/Cornerstone3D/CobbAngle.js +0 -125
  33. package/src/adapters/Cornerstone3D/CodingScheme.js +0 -16
  34. package/src/adapters/Cornerstone3D/EllipticalROI.js +0 -204
  35. package/src/adapters/Cornerstone3D/Length.js +0 -113
  36. package/src/adapters/Cornerstone3D/MeasurementReport.js +0 -445
  37. package/src/adapters/Cornerstone3D/PlanarFreehandROI.js +0 -137
  38. package/src/adapters/Cornerstone3D/Probe.js +0 -106
  39. package/src/adapters/Cornerstone3D/cornerstone3DTag.js +0 -1
  40. package/src/adapters/Cornerstone3D/index.js +0 -26
  41. package/src/adapters/VTKjs/Segmentation.js +0 -223
  42. package/src/adapters/VTKjs/index.js +0 -7
  43. package/src/adapters/helpers.js +0 -19
  44. package/src/adapters/index.js +0 -11
@@ -0,0 +1,44 @@
1
+ declare class Angle {
2
+ static toolType: string;
3
+ static utilityToolType: string;
4
+ static TID300Representation: any;
5
+ static isValidCornerstoneTrackingIdentifier: (TrackingIdentifier: any) => boolean;
6
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): {
7
+ description: any;
8
+ sopInstanceUid: any;
9
+ annotation: {
10
+ annotationUID: any;
11
+ metadata: {
12
+ toolName: any;
13
+ referencedImageId: any;
14
+ FrameOfReferenceUID: any;
15
+ label: string;
16
+ };
17
+ };
18
+ finding: any;
19
+ findingSites: any;
20
+ };
21
+ static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
22
+ point1: {
23
+ x: any;
24
+ y: any;
25
+ };
26
+ point2: {
27
+ x: any;
28
+ y: any;
29
+ };
30
+ point3: {
31
+ x: any;
32
+ y: any;
33
+ };
34
+ point4: {
35
+ x: any;
36
+ y: any;
37
+ };
38
+ rAngle: any;
39
+ trackingIdentifierTextValue: string;
40
+ finding: any;
41
+ findingSites: any;
42
+ };
43
+ }
44
+ export default Angle;
@@ -0,0 +1,49 @@
1
+ declare class Bidirectional {
2
+ static toolType: string;
3
+ static utilityToolType: string;
4
+ static TID300Representation: any;
5
+ static isValidCornerstoneTrackingIdentifier: (TrackingIdentifier: any) => boolean;
6
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): {
7
+ description: any;
8
+ sopInstanceUid: any;
9
+ annotation: {
10
+ annotationUID: any;
11
+ metadata: {
12
+ toolName: any;
13
+ referencedImageId: any;
14
+ FrameOfReferenceUID: any;
15
+ label: string;
16
+ };
17
+ };
18
+ finding: any;
19
+ findingSites: any;
20
+ };
21
+ static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
22
+ longAxis: {
23
+ point1: {
24
+ x: any;
25
+ y: any;
26
+ };
27
+ point2: {
28
+ x: any;
29
+ y: any;
30
+ };
31
+ };
32
+ shortAxis: {
33
+ point1: {
34
+ x: any;
35
+ y: any;
36
+ };
37
+ point2: {
38
+ x: any;
39
+ y: any;
40
+ };
41
+ };
42
+ longAxisLength: any;
43
+ shortAxisLength: any;
44
+ trackingIdentifierTextValue: string;
45
+ finding: any;
46
+ findingSites: any;
47
+ };
48
+ }
49
+ export default Bidirectional;
@@ -0,0 +1,44 @@
1
+ declare class CobbAngle {
2
+ static toolType: string;
3
+ static utilityToolType: string;
4
+ static TID300Representation: any;
5
+ static isValidCornerstoneTrackingIdentifier: (TrackingIdentifier: any) => boolean;
6
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): {
7
+ description: any;
8
+ sopInstanceUid: any;
9
+ annotation: {
10
+ annotationUID: any;
11
+ metadata: {
12
+ toolName: any;
13
+ referencedImageId: any;
14
+ FrameOfReferenceUID: any;
15
+ label: string;
16
+ };
17
+ };
18
+ finding: any;
19
+ findingSites: any;
20
+ };
21
+ static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
22
+ point1: {
23
+ x: any;
24
+ y: any;
25
+ };
26
+ point2: {
27
+ x: any;
28
+ y: any;
29
+ };
30
+ point3: {
31
+ x: any;
32
+ y: any;
33
+ };
34
+ point4: {
35
+ x: any;
36
+ y: any;
37
+ };
38
+ rAngle: any;
39
+ trackingIdentifierTextValue: string;
40
+ finding: any;
41
+ findingSites: any;
42
+ };
43
+ }
44
+ export default CobbAngle;
@@ -0,0 +1,53 @@
1
+ export default class MeasurementReport {
2
+ static MEASUREMENT_BY_TOOLTYPE: {};
3
+ static CORNERSTONE_TOOL_CLASSES_BY_UTILITY_TYPE: {};
4
+ static CORNERSTONE_TOOL_CLASSES_BY_TOOL_TYPE: {};
5
+ static getCornerstoneLabelFromDefaultState(defaultState: any): any;
6
+ static generateDatasetMeta(): {
7
+ FileMetaInformationVersion: {
8
+ Value: ArrayBufferLike[];
9
+ vr: string;
10
+ };
11
+ TransferSyntaxUID: {
12
+ Value: string[];
13
+ vr: string;
14
+ };
15
+ ImplementationClassUID: {
16
+ Value: any[];
17
+ vr: string;
18
+ };
19
+ ImplementationVersionName: {
20
+ Value: string[];
21
+ vr: string;
22
+ };
23
+ };
24
+ static generateDerivationSourceDataset: (instance: any) => any;
25
+ static getSetupMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, toolType: any): {
26
+ defaultState: {
27
+ description: any;
28
+ sopInstanceUid: any;
29
+ annotation: {
30
+ annotationUID: any;
31
+ metadata: {
32
+ toolName: any;
33
+ referencedImageId: any;
34
+ FrameOfReferenceUID: any;
35
+ label: string;
36
+ };
37
+ };
38
+ finding: any;
39
+ findingSites: any;
40
+ };
41
+ NUMGroup: any;
42
+ SCOORDGroup: any;
43
+ ReferencedSOPSequence: any;
44
+ ReferencedSOPInstanceUID: any;
45
+ ReferencedFrameNumber: any;
46
+ };
47
+ static generateReport(toolState: any, metadataProvider: any, worldToImageCoords: any, options: any): any;
48
+ /**
49
+ * Generate Cornerstone tool state from dataset
50
+ */
51
+ static generateToolState(dataset: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, hooks: any): {};
52
+ static registerTool(toolClass: any): void;
53
+ }
@@ -0,0 +1,30 @@
1
+ declare class PlanarFreehandROI {
2
+ static toolType: string;
3
+ static utilityToolType: string;
4
+ static TID300Representation: any;
5
+ static isValidCornerstoneTrackingIdentifier: (TrackingIdentifier: any) => boolean;
6
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): {
7
+ description: any;
8
+ sopInstanceUid: any;
9
+ annotation: {
10
+ annotationUID: any;
11
+ metadata: {
12
+ toolName: any;
13
+ referencedImageId: any;
14
+ FrameOfReferenceUID: any;
15
+ label: string;
16
+ };
17
+ };
18
+ finding: any;
19
+ findingSites: any;
20
+ };
21
+ static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
22
+ points: any;
23
+ area: number;
24
+ perimeter: number;
25
+ trackingIdentifierTextValue: string;
26
+ finding: any;
27
+ findingSites: any;
28
+ };
29
+ }
30
+ export default PlanarFreehandROI;
@@ -0,0 +1,30 @@
1
+ declare class RectangleROI {
2
+ static toolType: string;
3
+ static utilityToolType: string;
4
+ static TID300Representation: any;
5
+ static isValidCornerstoneTrackingIdentifier: (TrackingIdentifier: any) => boolean;
6
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): {
7
+ description: any;
8
+ sopInstanceUid: any;
9
+ annotation: {
10
+ annotationUID: any;
11
+ metadata: {
12
+ toolName: any;
13
+ referencedImageId: any;
14
+ FrameOfReferenceUID: any;
15
+ label: string;
16
+ };
17
+ };
18
+ finding: any;
19
+ findingSites: any;
20
+ };
21
+ static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
22
+ points: any;
23
+ area: any;
24
+ perimeter: any;
25
+ trackingIdentifierTextValue: string;
26
+ finding: any;
27
+ findingSites: any;
28
+ };
29
+ }
30
+ export default RectangleROI;
@@ -0,0 +1,21 @@
1
+ import MeasurementReport from "./MeasurementReport";
2
+ import Bidirectional from "./Bidirectional";
3
+ import Angle from "./Angle";
4
+ import CobbAngle from "./CobbAngle";
5
+ import RectangleROI from "./RectangleROI";
6
+ import PlanarFreehandROI from "./PlanarFreehandROI";
7
+ declare const Cornerstone3D: {
8
+ Bidirectional: typeof Bidirectional;
9
+ CobbAngle: typeof CobbAngle;
10
+ Angle: typeof Angle;
11
+ Length: any;
12
+ EllipticalROI: any;
13
+ RectangleROI: typeof RectangleROI;
14
+ ArrowAnnotate: any;
15
+ Probe: any;
16
+ PlanarFreehandROI: typeof PlanarFreehandROI;
17
+ MeasurementReport: typeof MeasurementReport;
18
+ CodeScheme: any;
19
+ CORNERSTONE_3D_TAG: any;
20
+ };
21
+ export default Cornerstone3D;
@@ -0,0 +1,3 @@
1
+ import adaptersSR from "./adapters";
2
+ export { adaptersSR };
3
+ export default adaptersSR;
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "name": "@cornerstonejs/adapters",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Adapters for Cornerstone3D to/from formats including DICOM SR and others",
5
- "src": "src/index.js",
6
- "main": "src/index.js",
5
+ "src": "src/index.ts",
6
+ "main": "src/index.ts",
7
7
  "files": [
8
- "dist",
9
- "src"
8
+ "dist"
10
9
  ],
11
10
  "directories": {
12
11
  "example": "examples",
13
12
  "build": "dist"
14
13
  },
15
14
  "exports": {
16
- ".": "./dist/@cornerstonejs/adapters.js",
17
- "./es": "./dist/@cornerstonejs/adapters.es.js"
15
+ ".": "./dist/@cornerstonejs/adapters.es.js"
18
16
  },
17
+ "types": "./dist/@cornerstonejs/dts/index.d.ts",
19
18
  "publishConfig": {
20
19
  "access": "public"
21
20
  },
22
21
  "scripts": {
23
22
  "test": "jest --testTimeout 60000",
24
- "build": "rollup -c",
23
+ "build": "rollup -c rollup.config.mjs",
24
+ "build:all": "yarn build",
25
25
  "build:examples": "npm run build && npx cpx 'dist/**/*.{js,map}' examples/js",
26
26
  "start": "rollup -c -w",
27
27
  "format": "prettier --write 'src/**/*.js' 'test/**/*.js'",
@@ -37,37 +37,12 @@
37
37
  "url": "https://github.com/cornerstonejs/cornerstone3D-beta/issues"
38
38
  },
39
39
  "homepage": "https://github.com/cornerstonejs/cornerstone3D-beta/blob/main/packages/adapters/README.md",
40
- "devDependencies": {
41
- "@babel/core": "^7.16.12",
42
- "@babel/preset-env": "^7.16.11",
43
- "@babel/register": "^7.13.0",
44
- "acorn": "^7.1.0",
45
- "acorn-jsx": "^5.2.0",
46
- "eslint": "^8.17.0",
47
- "eslint-config-prettier": "^8.5.0",
48
- "follow-redirects": "^1.10.0",
49
- "husky": "^1.3.1",
50
- "jest": "^27.5.1",
51
- "lint-staged": "^8.2.1",
52
- "prettier": "^2.6.2",
53
- "rollup": "^1.31.1",
54
- "rollup-plugin-babel": "^4.3.3",
55
- "rollup-plugin-commonjs": "^9.3.4",
56
- "rollup-plugin-json": "^3.1.0",
57
- "rollup-plugin-node-builtins": "^2.1.2",
58
- "rollup-plugin-node-globals": "^1.4.0",
59
- "rollup-plugin-node-resolve": "^4.2.4",
60
- "unzipper": "^0.10.9",
61
- "xml2js": "^0.4.23"
62
- },
63
40
  "dependencies": {
64
41
  "@babel/runtime-corejs2": "^7.17.8",
65
42
  "dcmjs": "^0.29.4",
66
43
  "gl-matrix": "^3.4.3",
67
44
  "lodash.clonedeep": "^4.5.0",
68
- "loglevelnext": "^3.0.1",
69
- "ndarray": "^1.0.19",
70
- "pako": "^2.0.4"
45
+ "ndarray": "^1.0.19"
71
46
  },
72
- "gitHead": "4bf312b91b14fad16638d488064a0a6c097e3514"
47
+ "gitHead": "7381a5c8235939b7e23fd371da5c21d607accbe2"
73
48
  }
File without changes