0
我試圖使用Javascript和XTK顯示3D圖像(卷)。我可以很好地查看卷,但在嘗試訪問卷尺寸時遇到問題。訪問javascript數組給出了未展示的結果
//Create a new volume
volume = new X.volume();
//Add data. Works fine, and I can see slice views and scroll through them
volume.file = 'http://...nrrd';
使用的下一行代碼,我可以在Firebug看到,「體」有一個叫保存我的形象的正確的尺寸大小爲3的「尺寸」屬性。
console.log(volume);
dimensions -> [200, 200, 396]
但是,如果我嘗試訪問陣列,例如像下面,我得到的[10,10,10]
console.log("dimensions", volume.dimensions);
dimensions -> [10, 10, 10]