Closed chrisgorgo closed 9 years ago
This is fixed in nibabel here: https://github.com/nipy/nibabel/pull/167
Hi, I'm using the master branch of nibabel (pulled today) and I am still getting this error. Is there any more information about my environment I can provide that could help?
Best, Chris
@amadeuskanaan you might be interested in this
Ah sorry, will look into it some more soon
Hi Moloney,
Were you able to figure out what the problem is with these data sets?
Best, Kanaan
With the nibabel master branch I get different errors, basically saying the PixelSpacing and ImageOrientationPatient values do not match, which is true.
The differences are small, but there is currently not any threshold for differences in the DICOM values. I have never seen a scanner produce different values for these tags within a series. Were these images somehow altered after coming off the scanner? Or are the images from different series?
@amadeuskanaan - Any more info here?
@chrisfilo @amadeuskanaan - Any update here?
Sorry @moloney, haven't had the chance to take a look. Will do soon. Thanks for your help.
Hi, Sorry for late reply. I just updated nibabel and dicom downloaded the files from this PR and run dcmstack on it. I'm still getting the same as you:
(devel)adenauer:/tmp/dcmstack_test$ dcmstack --dest-dir /tmp/test_kanaan --force-read --file-ext ".v2" test/
Traceback (most recent call last):
File "/scr/adenauer1/virtualenv/devel/bin/dcmstack", line 9, in <module>
load_entry_point('dcmstack==0.7.dev', 'console_scripts', 'dcmstack')()
File "build/bdist.linux-x86_64/egg/dcmstack/dcmstack_cli.py", line 315, in main
File "build/bdist.linux-x86_64/egg/dcmstack/dcmstack.py", line 851, in to_nifti
File "build/bdist.linux-x86_64/egg/dcmstack/dcmstack.py", line 757, in get_data
File "build/bdist.linux-x86_64/egg/dcmstack/dcmstack.py", line 664, in get_shape
dcmstack.dcmstack.InvalidStackError: The DICOM stack is not valid: Slice spacings are not consistent
The images are from the same series (part of longer session though, but the scanner dumps everything into one folder). They were not modified. Dcm2nii somehow manages to convert them though. I hope this helps.
Should be fixed in master, provided you are also using nibabel master. Please test it out.
I had fixed the stacking part previously, but now I also have the grouping working. Works on the provided test data set. Reopen if you still have issues.
I have a problem converting a set of dicom files:
Here you can find the DICOM files and expected nifti output (provided by dcm2nii) here: https://docs.google.com/uc?id=0B77zr9yIiKOTcDh4Y1hHdUdVUEE&export=download
Thanks in advance for looking into this!
Best, Chris