cornerstoneTools.init() returns undefined
See original GitHub issueHello !
I am trying to create an angular application using cornerstone and cornerstoneTools and i am facing an issue when initializing corenerstonetools : the cornerstoneTools.init() function returns undefined.
import Hammer from 'hammerjs'
import * as cornerstone from 'cornerstone-core';
import * as cornerstoneMath from 'cornerstone-math';
import * as cornerstoneTools from 'cornerstone-tools';
class SomeComponent {
constructor() {
cornerstoneTools.external.Hammer = Hammer;
cornerstoneTools.external.cornerstone = cornerstone;
cornerstoneTools.external.cornerstoneMath = cornerstoneMath;
const csTools = cornerstoneTools.init(this.cornerStoneConfig); // <-- Undefined :
console.log(csTools);
}
}
Here is a small example showing what i am trying to do : stackblitz example
Any help would be appreciated and thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
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 >API Docs - Cornerstone Tools
pixelToCanvas is used to transform the points from pixel to canvas coordinates. Returns: undefined. Drawing.drawEllipse(context, element, corner1 ...
Read more >Cornerstone Tools v3 - JSFiddle - Code Playground - JSFiddle
Support the development of JSFiddle and get extra features ✌ ; class · "cornerstone-element" ; data-index · "0" ; oncontextmenu ·...
Read more >How to use the cornerstone-core.metaData function in ... - Snyk
metaData examples, based on popular ways it is used in public projects. ... OHIFComponentPlugin.js'; import cornerstoneTools from "cornerstone-tools"; ...
Read more >cornerstone-tools - UNPKG
toLowerCase().match(/(edge|trident)\\/(\\d+)/)\n ) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll keep this open until the docs are updated so we don’t forget. Thanks again for creating this issue!
Please also check this example, I came across it from the official documentation