Skip to content

Instantly share code, notes, and snippets.

@ivmartel
Last active October 20, 2023 07:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivmartel/7415ca9b21209e83b5e713d838529795 to your computer and use it in GitHub Desktop.
Save ivmartel/7415ca9b21209e83b5e713d838529795 to your computer and use it in GitHub Desktop.
DWV display example #1
<!DOCTYPE html>
<html>
<head>
<title>DWV display example #1</title>
<meta charset="UTF-8">
<!-- dwv -->
<script type="text/javascript" src="https://github.com/ivmartel/dwv/releases/download/v0.30.4/dwv-0.30.4.min.js"></script>
<!-- Launch the app -->
<script>
document.addEventListener('DOMContentLoaded', function (/*event*/) {
// create the dwv app
var app = new dwv.App();
// initialise with the id of the container div
app.init({
dataViewConfigs: {'*': [{divId: 'layerGroup0'}]}
});
// load dicom data
app.loadURLs(['https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm']);
});
</script>
</head>
<body>
<!-- Main container div -->
<div id="dwv">
<div id="layerGroup0"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment