cod-dicomweb-server 1.2.0 → 1.2.1

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 Francisco Hodge
3
+ Copyright (c) 2025 Gradient Health
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # Cod DicomWeb Server
2
+
3
+ A wadors server proxy that get data from a Cloud Optimized Dicom format.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Installation](#installation)
8
+ - [Usage](#usage)
9
+ - [Testing](#testing)
10
+ - [Contributing](#contributing)
11
+ - [License](#license)
12
+
13
+ ## Installation
14
+
15
+ To install this utility, follow these steps:
16
+
17
+ 1. **Clone the repository**:
18
+
19
+ ```bash
20
+ git clone https://github.com/gradienthealth/cod-dicomweb-server.git
21
+ cd cod-dicomweb-server
22
+ ```
23
+
24
+ 2. **Install dependencies**:
25
+
26
+ ```bash
27
+ yarn install
28
+ ```
29
+
30
+ 3. **Build the code**:
31
+
32
+ ```bash
33
+ yarn build
34
+ ```
35
+
36
+ Make sure you have [Node.js](https://nodejs.org/) installed on your machine.
37
+
38
+ ## Usage
39
+
40
+ 1. **Open the Target repo in the code editor where this package needs to use and add the package**:
41
+
42
+ ```bash
43
+ yarn add cod-dicomweb-server
44
+ ```
45
+
46
+ 2. **Use the methods of the package in any file in the target repo**:
47
+
48
+ ```javaScript
49
+ import { CodDicomWebServer, FetchType } from 'cod-dicomweb-server';
50
+
51
+ const server = CodDicomWebServer();
52
+ const wadorsUrl = 'https://storage.googleapis.com/<bucket name>/<bucket prefix which end with /dicomweb>/studies/<studyUid>/series/<seriesUid>/instances/<sopUid>/frames/<frameNumber>';
53
+ const imageId = '<image scheme>:' + wadorsUrl;
54
+
55
+ const result = await server.fetchCod( wadorsUrl,
56
+     imageId,
57
+     headers,
58
+     {
59
+         useSharedArrayBuffer: true,
60
+         fetchType: FetchType.BYTES_OPTIMIZED,
61
+     }
62
+ )
63
+
64
+ console.log(result);
65
+ ```
66
+
67
+ ## Testing
68
+
69
+ You need to install all the dependencies and build the code to run the tests.
70
+
71
+ ### Running Tests
72
+
73
+ ```bash
74
+ yarn test
75
+ ```
76
+
77
+ ### Test Coverage
78
+
79
+ ```bash
80
+ yarn coverage
81
+ ```
82
+
83
+ ### Benchmark tests
84
+
85
+ ```bash
86
+ yarn benchmark
87
+ ```
88
+
89
+ - The benchmark output will be displayed in the browser's debugger console.
90
+
91
+ ## Contributing
92
+
93
+ Contributions are welcome! Please follow these steps:
94
+
95
+ 1. Fork the repository.
96
+ 2. Create a new branch ( `git checkout -b feature/YourFeature` ).
97
+ 3. Make your changes and commit them ( `git commit -m 'Add some feature'` ).
98
+ 4. Push to the branch ( `git push origin feature/YourFeature` ).
99
+ 5. Open a Pull Request.
100
+
101
+ ## License
102
+
103
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
package/dist/16.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * cod-dicomweb-server v1.2.0
3
+ * cod-dicomweb-server v1.2.1
4
4
  * git+https://github.com/gradienthealth/cod-dicomweb-server.git
5
5
  *
6
6
  * Copyright (c) Adithyan Dinesh and project contributors.
package/dist/170.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * cod-dicomweb-server v1.2.0
3
+ * cod-dicomweb-server v1.2.1
4
4
  * git+https://github.com/gradienthealth/cod-dicomweb-server.git
5
5
  *
6
6
  * Copyright (c) Adithyan Dinesh and project contributors.
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * cod-dicomweb-server v1.2.0
3
+ * cod-dicomweb-server v1.2.1
4
4
  * git+https://github.com/gradienthealth/cod-dicomweb-server.git
5
5
  *
6
6
  * Copyright (c) Adithyan Dinesh and project contributors.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cod-dicomweb-server",
3
3
  "title": "COD Dicomweb server",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "private": false,
6
6
  "description": "A wadors server proxy that get data from a Cloud Optimized Dicom format.",
7
7
  "main": "dist/main.js",
@@ -31,7 +31,7 @@
31
31
  "coverage": "npm run test -- --coverage",
32
32
  "benchmark": "webpack serve --config webpack.config.bm.js",
33
33
  "prepare": "npm run build",
34
- "trypublish": "npm publish || true"
34
+ "publish:npm": "npm login && npm publish"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@babel/cli": "^7.26.4",