仔细阅读了有关同类问题的多个线程后,我仍然不知道我的 dicom 加载问题是怎么回事。
事情是这样的:我有一个由 193 个 .dcm 文件组成的 dicom 数据集,这些文件在我的服务器上以文本文件形式列出。 .dcm 文件位于同一服务器上。
这是我用来获取每个 .dcm 文件的位置并将它们加载到卷中的代码:
$.ajax({
url:'files/T1.txt',
success: function (data) {
var tmpdata=data.toString();
var filenames=tmpdata.split('\n');
T1slice = new X.renderer2D();
T1slice.container = 'T12D';
T1slice.orientation = 'Z';
T1slice.init()
T1volume= new X.volume();
T1volume.file = filenames.sort().map(function(v) {return v;});
T1slice.add(T1volume);
T1slice.render();
}
});//end of ajax query
我在控制台中收到消息,告诉我每个 .dcm 文件都打开得很好(或者至少我认为它是这么说的)
GET http://localhost/titan2.0/files/VG/t1_axial_stea...echo1/t1_axial_stealth-post-12_echo1_I000192.dcm 200 OK 1.67s loader.js (line 241)
然后我收到以下错误消息:
Unknown number of bits allocated - using default: 32 bits parserDCM.js (line 316)
TypeError: first_image_data is null
this._slices = object._children[this._orientationIndex]._children;
renderer2D.js (line 657)
TypeError: object._children[this._orientationIndex] is undefined
this._slices = object._children[this._orientationIndex]._children;
renderer2D.js (line 657)
任何帮助将不胜感激。
最佳答案
尝试将图像拖放到 http://slicedrop.com 中
如果它确实有效,则您的代码可能有问题。
Slicedrop 在 github 上开源:https://github.com/slicedrop/slicedrop.github.com
关于dicom - XTK 加载 dicom 文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22356911/