cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.05k stars 597 forks source link

Allow implementations to register an image loader that bypasses the cornerstone cache #201

Open jdnarvaez opened 6 years ago

jdnarvaez commented 6 years ago

It would be nice if we could register an image loader that did not use the cornerstone image cache so that various levels of caching could be implemented by the consumer instead.

swederik commented 6 years ago

That's a very interesting idea... thanks for contributing!

jdnarvaez commented 6 years ago

My initial thought was to just allow there to be a registered 'content manager' that would handle all of the load image/load and cache image requests, but I didn't think there was an 'elegant' way to do that without simply making it seem like the load image logic is being short circuited. I've been using the method on my own for a few weeks and it seems to work, so I can create a PR for it for review and approval/rejection.

dannyrb commented 6 years ago

@jdnarvaez Thanks for adding information, and for a PR! Any/all help with these repositories are greatly appreciated (:

I've added some notes to your PR 👍

jdnarvaez commented 6 years ago

I'm not sure my current implementation of the content manager API would make sense, as much of it retrieves content from proprietary APIs but I could probably create one with a caching layer implemented for the CornerstoneWADOImageLoader if that would help clarify things, just might take a little time.