无法使用cornerstone.js显示dicom图像

问题描述 投票:0回答:1

我正在尝试使用基石库显示Dicom图像。我使用了https://github.com/cornerstonejs/cornerstone/blob/master/example/jsminimal/index.html中的jsminimal示例代码。我包含的js文件是cornerstone.js和exampleImageIdLoader.js,它们来自上面的同一链接。

<!DOCTYPE HTML>
<html>
    <head>
        <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
    </head>
    <body>
        <div class="container">

            <h1>
                jsminimal/index.html
            </h1>

            <h3>This is an example of the minimal use of cornerstone driven by javascript</h3>

            <br>
            <br>

            <h3>In this example, javascript is used to image enable a div.</h3>

            <br>
            <br>

            <div id="dicomImage" style="width:512px;height:512px">
            </div>
        </div>
    </body>
    <script src="cornerstone.js"></script>
    <script>window.cornerstone || document.write('<script src="https://unpkg.com/[email protected]">\x3C/script>')</script>

    <script src="exampleImageIdLoader.js"></script>
    <script>
    const imageId = 'vhf.151.dcm';
    const element = document.getElementById('dicomImage');
    cornerstone.enable(element);
    cornerstone.loadImage(imageId).then(function(image) {
        cornerstone.displayImage(element, image);
    });
</script>
</html>

我面临的错误是:

错误:loadImageFromImageLoader:无图像加载器,用于imageId cornerstone.js:3361:11

loadImageFromImageLoader文件:/ cornerstone.js / cornerstone.js:3361的绝对路径

loadImage文件:/cornerstone.js的绝对路径> /cornerstone.js:3402

文件:/ html文件的绝对路径/imageViewer.html:35

javascript dicom cornerstonejs
1个回答
0
投票

尝试插入cornerstoneWADOImageLoader

文档:https://github.com/cornerstonejs/cornerstoneWADOImageLoader

© www.soinside.com 2019 - 2024. All rights reserved.