A wadors server proxy that get data from a Cloud Optimized Dicom format.
npm install cod-dicomweb-serverA wadors server proxy that get data from a Cloud Optimized Dicom format.
- Installation
- Usage
- Testing
- Contributing
- License
To install this utility, follow these steps:
1. Clone the repository:
``bash`
git clone https://github.com/gradienthealth/cod-dicomweb-server.git
cd cod-dicomweb-server
2. Install dependencies:
`bash`
yarn install
3. Build the code:
`bash`
yarn build
Make sure you have Node.js installed on your machine.
1. Open the Target repo in the code editor where this package needs to use and add the package:
`bash`
yarn add cod-dicomweb-server
2. Use the methods of the package in any file in the target repo:
`javaScript
import { CodDicomWebServer, FetchType, clearPartialFiles } from 'cod-dicomweb-server';
const server = new CodDicomWebServer();
const wadorsUrl = "https://storage.googleapis.com/gradienthealth_cod_dicomweb_public_benchmark/v1/dicomweb/studies/1.2.826.0.1.3680043.8.498.25373200666081576206661715880670310913/series/1.2.826.0.1.3680043.8.498.17065113110917795618106606234460323040/instances/1.3.6.1.4.1.14519.5.2.1.7009.2403.109731662822930985185381565631/frames/1";
const headers = {};
const result = await server.fetchCod( wadorsUrl, headers, { useSharedArrayBuffer: true, fetchType: FetchType.BYTES_OPTIMIZED, });
console.log(result);
// This will clear the PartialFiles fetched through BYTES_OPTiMIZED mode from the OPFS.
await clearPartialFiles();
`
You need to install all the dependencies and build the code to run the tests.
`bash`
yarn test
`bash`
yarn coverage
`bash`
yarn benchmark
- The benchmark output will be displayed in the browser's debugger console.
You need to install all the dependencies and build the code to run the demo.
Also update the submodule using the command
`bash`
yarn update:submodule:cornerstone3D
`bash`
yarn demo:server
`bash`
yarn demo:client
Contributions are welcome! Please follow these steps:
1. Fork the repository.
2. Create a new branch ( git checkout -b feature/YourFeature ).git commit -m 'Add some feature'
3. Make your changes and commit them ( ).git push origin feature/YourFeature` ).
4. Push to the branch (
5. Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.