无法使用基石加载dicom图像

时间:2015-09-16 00:39:27

标签: dicom

我正在尝试使用基石库加载dicom图像。我收到一个错误 - 未捕获的异常:loadImage:没有imageId的图像加载器。 我的图像文件名为image-1.dcm。我究竟做错了什么?

这是我的代码:

<!DOCTYPE HTML>
<html>
<head>
    <!-- twitter bootstrap CSS stylesheet - not required by cornerstone -->
    <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

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

This is an example of the minimal use of cornerstone driven by javascript

<br>
<br>

In this example, javascript is used to image enable a div.

<br>
<br>


<div id="dicomImage" style="width:512px;height:512px;">
</div>

</div>
</body>

<!-- cornerstone depends on jQuery so it must be loaded first-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- include the cornerstone library -->
<script src="cornerstone-master/dist/cornerstone.js"></script>

<!-- include special code for these examples which provides images -->
<script src="cornerstone-master/example/exampleImageIdLoader.js"></script>

<script>

    $(document).ready(function() {
        var imageId = 'image-1';
        var element = document.getElementById('dicomImage');
        cornerstone.enable(element);
        cornerstone.loadImage(imageId).then(function(image) {
            cornerstone.displayImage(element, image);
        });
    });

</script>
</html>

1 个答案:

答案 0 :(得分:3)

您需要使用cornertoneWADOImageLoader来加载DICOM P10:

https://github.com/chafey/cornerstoneWADOImageLoader