fourctv / dicomViewerLib

Angular 9+ DICOM Viewer Component and demo app
MIT License
41 stars 42 forks source link

core.js:6272 ERROR TypeError: cornerstoneTools.init is not a function #15

Closed yosra19 closed 4 years ago

yosra19 commented 4 years ago

i tired to this error ,while i fix the cornerstone version like you mention anny help please

MounikaAV commented 4 years ago

Facing the same issue, any update ?

fourctv commented 4 years ago

I updated the library and the demo app to Angular 10 and to the latest version of Cornerstone. Please see if the error persists.

re4388 commented 4 years ago

I faced a similar issue and the below steps are how I solved it.

Actually, the problem is more about mixing version information on source code and documentation, so it takes trial and error to figure it out.

  1. git clone this repo => git clone https://github.com/fourctv/dicomViewerLib.git
  2. npm install
  3. Install ng-dicomviewer, npm install ng-dicomviewer --save
  4. Refer to a closed issue (#17), we need to update 2 related error to this => import { DicomViewerModule } from 'ng-dicomviewer'.

At the time of writing, I can run the app up and no error.

Thanks again for the Author good work!! 👍

fourctv commented 4 years ago

Oh, now I know why you got this error. You need to build the library before trying to run the test application. So the steps to clone and run the test app are:

  1. git clone this repo => git clone https://github.com/fourctv/dicomViewerLib.git
  2. npm install
  3. build the library, npm run buildLib
  4. now run the test app, npm start

You have to run step 3 anytime you make changes to the library code.

I will update the docs.