question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when using cornerstoneTools and cornerstone as a module in a node.js project

See original GitHub issue

https://github.com/cornerstonejs/cornerstoneTools/blob/1f7d41d15c795dc99f8e395713cf9d63094f49b0/src/externalModules.js#L1

Hey, I am encountering some problems here when loading cornerstone and cornerstoneTools as a module with require or import. Then window.cornerstone is not available to cornerstoneTools.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
galeliscommented, Sep 20, 2018

@vsaase Hey Victor, Would you mind to provide me any log with errors or any other information that could help me to understand your issue?

I have the @vnext version set up with OHIF Standalone viewer and everything is working fine there as well.

Ideally, I added that line to prevent the code from breaking in case cornerstone is not present into external (and window)

1reaction
dannyrbcommented, Sep 20, 2018

@vsaase to @JamesAPetts’s point, just make sure you’re depending on an exact version, and not loosely in your NPM dependencies. We’ll cut a more stable release before too long, but until then, every new release has a chance to introduce a breaking change.

That being said, feedback on what is and is not working for the latest build is always appreciated ^_^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction · cornerstone-tools - Cornerstone.js
Cornerstone Tools is a JavaScript library that assists in annotating, segmenting, and measuring medical images. This library also provides a framework for ...
Read more >
npm - Snyk
To help you get started, we've selected a few cornerstone-tools examples, based on popular ways it is used in public projects. Secure your...
Read more >
Cornerstone Tools not loading built in tools - Stack Overflow
Im answering my own question here, I switched to imports and redid some of the code. the following seems to work fine so...
Read more >
cornerstone-tools - UNPKG
92, This module is distributed via [npm][npm-url] which is bundled with [node][node] and. 93, should be installed as one of your project's `dependencies`:....
Read more >
Questions about Cornerstone, Tools, Layouts and More
I have previously worked on a project developing a non-Javascript based DICOM ... At present, what would be the latest set of tools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found