Closed mb3152 closed 1 year ago
Hi, Thanks for the report. I haven't seen this error before, but my guess is that it is about the scaling of the T1. I have not attempted to make karawun do anything clever with scaling, but it looks like I should add some basic checks.
I think the MR mode dicom requires non negative pixel values, so check the range of your T1 and scale/shift the values so that all pixels are greater than or equal to 0.
The different resolution of T1 and dwi should not matter. The brainlab view will be correct if the trk file overlays correctly on the T1 using mrview.
Thank you for the quick reply! That seemed to get rid of that issue, but now it just throws:
Exception handler: UnicodeDecodeError - 'utf-8' codec can't decode byte 0xc0 in position 443: invalid start byte
It produced output DICOMS but they look empty. Also, I should note I made the trk file in dsi studio. Not sure if that matters.
Would it help to have the files on your end? https://www.dropbox.com/s/72rt5bh1hg6630u/karawun.zip?dl=0
Using a trk file will be a problem. Karawun only supports tck files (mrtrix format). Chances are that the error is caused by the tck file reader not finding the expected header data. You can confirm by converting the nifti data without the associated tractography file.
Oh boy, huge facepalm! Seems to be working now. I should expect a single dicom for the tck file, and then a separate folder for the T1? Do any other dicom viewers support these outputs? I don't have access to a brain lab viewer right now. I tried loading it as a segmentation in 3D Slicer, but no luck. Thank you so much for your help!
Here are the new input/outputs
https://www.dropbox.com/scl/fo/qz2xpg8xjy6zqhcrabyqs/h?dl=0&rlkey=oqzux9l7p8qf1ic2i26eynprn
The number of dicoms sounds right. I'm not aware of any other viewer that can display the brainlab tractography files. In the future we aim to support the newer standards for tracts that are supported by more vendors, and those will probably be viewable by 3D slicer. I believe that the dicom segmentation standard supported by 3D slicer is about voxel segmentation, rather than the surface segmentation used by brainlab for streamlines.
Makes sense, I’ll track down a brain lab viewer and check these out. If I end up developing anything additional with your code I’ll do a PR incase you want it! Cheers.
Hi, this is such a great tool! I can't seem to get it to work for me, though
I want to overlay the trk on the T1. The T1 is aligned, but different resolution to the dwi. Not sure if that matters. Anyways, let me know if this error has been seen before?
However, it seems pydicom is not liking the write of this: