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.

cornerstoneTools.init() returns undefined

See original GitHub issue

Hello !

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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dannyrbcommented, Jul 20, 2019

I’ll keep this open until the docs are updated so we don’t forget. Thanks again for creating this issue!

0reactions
fomin-maxcommented, Nov 10, 2019

Please also check this example, I came across it from the official documentation

Read more comments on GitHub >

github_iconTop 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 >

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