-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: sample of public DICOMs with incomplete acquisition #733
Comments
Exit code 0 is for success, exit code 1 is the undefined error. Other exit codes are for clearly defined errors. Your problem is that the DICOM standard does not require instance number to be sequential or even unique. Therefore, while the sparse ordering of the instance numbers might give the user a clue, this could also be a completely valid DICOM. This also explains why the text outputs are warning not errors: they are unexpected and might provide the user with a clue for diagnosis, but are not clear violations of the standard.
Likewise, while the NIfTI standard requires all 2D slices in a 3D volume are equidistant, this is not a constraint for DICOM. Indeed, it is common for DICOM CT scans of the head to have fine slicing near the life-critical brain stem and coarse slicing for the cortex. In brief, since the DICOM images do not report the total number of images in a series and allow variable gaps between slices, it is hard to determine if files are missing or if a sparse volume was intended. This issue should vanish as we move to enhanced DICOM where an entire series is saved in a single file (or for Siemens an entire 3D volume) which prevents problems with copying some but not all files. |
Based on information in rordenlab/dcm2niix#733 (comment) > Exit code 0 is for success, exit code 1 is the undefined error. Handling of exit 1 as successful was added in 6ecd4a9 AKA 1.0.2~2^2~13
Thank you @neurolabusc for the detailed description. FWIW, I have submitted a fix to nipype to reflect the fact that exit 1 is also an error: yarikoptic/nipype@be5b908 . The question/issue was primarily to just find some dicoms which would make |
Since
|
As an aside, all errors except |
thanks for the example @neurolabusc , I will see if I could use it.
not sure if I follow really. What matters to me is that it is a failure - non-0 code means that execution did not succeed normally, even if potentially produced some files, and we should not just blindly ignore that. |
which would lead dcm2niix to exit with exit code 1, not 2. E.g. dicom files per slice for bold but having 1 complete volume and one partial, or alike leading to smth like
needed for testing nipy/heudiconv#695 which came up due to nipy/nipype#3592
The text was updated successfully, but these errors were encountered: