2

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.

JLecoeur
  • 35
  • 5

1 Answers1

2

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

Nicolas
  • 2,191
  • 3
  • 29
  • 49
  • Good catch. It won't load in slicedrop. So it's possibly the dcm files that are corrupted or in the wrong format or whatnot... Any ideas how to investigate that further ? – JLecoeur Mar 12 '14 at 16:56
  • Certainly a bug in XTK then, is there any way you can share the dataset, or at least once slice of it? To debug it, you can just use the 'uncompiled' version of XTK. Something must be wrong in IO/parserDCM.js – Nicolas Mar 13 '14 at 12:26
  • Here is a link to a compressed archive containing the anonymized dicom: http://tinyurl.com/llvtgu8 – JLecoeur Mar 13 '14 at 13:37
  • So the problem is that the DICOM is encoded in BigEndian, which is not supported yet. It is on the TODO list but it might take sometimes before it gets in... Please feel free to contribute :) – Nicolas Mar 14 '14 at 20:12
  • 1
    Oh, I see... Well, I'd like to contribute for sure since I do use XTK intensively. I just feel like the current documentation is a little hard to apprehend and I am a little lost on how to help. Maybe you can suggest me a webpage or else where I can find how to help efficiently. – JLecoeur Mar 17 '14 at 20:15