Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve UX of Script Tag Deployment/Usage #521

dannyrb opened this issue Jun 5, 2019 · 2 comments


Copy link

@dannyrb dannyrb commented Jun 5, 2019

One of our more popular use cases is dropping the viewer into an existing application, Google Colab, Python Notebook, or Codesandbox to provide a quick demonstration of something else, or a quick view of interesting imaging data.

Existing documentation for this approach lives here:

While it is currently easier than customizing and building the OHIF Viewer, it still has too many hurdles to provide the ease of use one would expect. These should be addressed so it truly feels "drop-in". We need to remember, and optimize for, the use cases and users that this approach makes sense for.

Existing Issues

  • Co-hosting, and configuring, the location of Cornerstone WebWorker scripts and codecs
    • We can improve this w/ the use of worker-loader in CornerstoneWADOImageLoader
  • Inclusion of global external dependencies
    • React, ReactDom, Stylesheets, etc.
  • Requiring React specific calls to attach our viewer to a DOM element
    • Provide a reasonable default id to attach to. Allow override w/ config when app bootstraps
  • Use hash routing for embedded scenarios to avoid history push state security issues (seems to occur more frequently when located in an iFrame)

@pieper has a good Google Colab playground for testing these requirements.


This comment has been minimized.

Copy link

@pieper pieper commented Jun 5, 2019

Here's an example that should be viewable by anyone:


This comment has been minimized.

Copy link
Member Author

@dannyrb dannyrb commented Aug 26, 2019

The bulk of this has been accomplished (thanks, @swederik!). If we find that hash routing is needed, we'll create a new issue.

@dannyrb dannyrb closed this Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.