dicomxtk

XTK Error while loading dicom files


After careful reading of several threads about the same kind of problems, I still don't know whats is going on with my dicom loading problem.

here is the thing: i have a dicom dataset constituted of 193 .dcm files which are listed on my server in a text files. The .dcm files are on the same server.

here is the code I use to get the location for each .dcm file and load them into a volume:

$.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

I get messages in the console telling me that every .dcm file was opened just fine (or at least I think that is what it says)

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) 

And then I get the following error messages:

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)

Any help would be greatly appreciated.


Solution

  • Try to drag and drop the images in http://slicedrop.com

    If it does work, there might be something wrong in your code.

    Slicedrop is open source on github: https://github.com/slicedrop/slicedrop.github.com