I’m new to JavaScript.
To view DICOM images I want to use this DICOM Web Viewer by ivmartel:
https://github.com/ivmartel/dwv
I have downloaded it and installed it using YARN. I can test run it using yarn run test
.
But how can I implement it on my website?
I just wanted to use it here:
https://ivmartel.github.io/dwv/doc/stable/tutorial-examples.html
I just copied the codes existing here:
https://jsfiddle.net/ivmartel/kkp7ytk3/
But it looks like it can’t import dwv at all.
Code of my page looks like this:
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="dwv-develop/src/app/application.js"></script>
<title>
JavaScript to check existence of variable
</title>
</head>
<body>
<div id="dwv">
<div id="layerGroup0"></div>
</div>
<script>
var app = new dwv.App();
// initialise with the id of the container div
app.init({
dataViewConfigs: {'*': [{divId: 'layerGroup0'}]},
tools : {
WindowLevel: {}
} // or try "ZoomAndPan"
});
// activate tool once done loading
app.addEventListener('load', function () {
app.setTool('WindowLevel');
});
// load dicom data
app.loadURLs(['https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm']);// create the dwv app
</script>
</body>
</html>
How can I import dwv to make it work on my website?