cornerstone3D icon indicating copy to clipboard operation
cornerstone3D copied to clipboard

[DONT MERGE] feat(webworker): Reworking Web Worker API and new WebWorkerManager

Open sedghi opened this issue 2 years ago • 2 comments

Most likely we won't merge this into main the diff is just easier to see to the main

We will merge this one first , and in cornerstone3D 2.0 we will move all decoders to the new manager as well to have central place to manage all.

Context

This PR reworks the web worker API and proposes a new set of methods to work with workers to make developers life so much easier to be able to run a function of the main thread

Changes & Results

  • adds webWorkerManager to the Core
  • Moves all the decoding in dicomImageLoader to use the new worker manager (previously done via worker-loader)

Testing

You should be able to follow the added documentation to easily write, register and execute a function in a way that makes a lot of sense.

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments, etc.)

  • [] I have run the yarn build:update-api to update the API documentation, and have committed the changes to this PR. (Read more here https://www.cornerstonejs.org/docs/contribute/update-api)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

sedghi avatar Nov 09 '23 22:11 sedghi

Deploy Preview for cornerstone-3d-docs ready!

Name Link
Latest commit 42b87b38cd284aa7a8b3dcdfd5d8a1426132ccc7
Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/654e4630a5cffc0009d46fa3
Deploy Preview https://deploy-preview-880--cornerstone-3d-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 09 '23 22:11 netlify[bot]

Will work on it here https://github.com/cornerstonejs/cornerstone3D/pull/1313 and will bring it to beta first

sedghi avatar Jun 11 '24 21:06 sedghi

I will close this in favor of the cornerstone 2.0 PR https://github.com/cornerstonejs/cornerstone3D/pull/1400

sedghi avatar Jul 24 '24 20:07 sedghi