-
Notifications
You must be signed in to change notification settings - Fork 224
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
Return status bug (incorrectly reported error) v1.0.20240202 #811
Comments
Is it possible that the bvector extraction is triggering the failed status code? |
As a suggestion, could you check your return status codes as part of your QA script to ensure all (valid) datasets return 0? |
@tomhampshire the dcm_qa script Converting this datasets directly with dcm2niix does return a valid exit code.
Without having access to exemplar data, it is hard to help diagnose your problem. I would certainly be careful with diffusion data acquired using foot first supine - BIDS/FSL bvec files are in image space, while Philips generates world space coordinates. See the validate bvec details. I would work with the Philips Clinical Scientist associated with your site to resolve this. You can always bisect the commits to the dcm2niix code base to determine the precise change that elicits the change in behavior. However, given the unusual nature of your images, a non-zero exit code may well be warranted as I have never validated this style of diffusion acquisition from this manufacturer. |
Hi @neurolabusc - thanks for your response. |
Hi - an update. We've found some DICOM data that can be linked to this issue and replicates the issue. |
Unable to replicate. Can you provide the precise command you are supplying? Does the problem persist when you compile dcm2niix locally (to ensure it matches your library versions)?
|
Hi. I believe the issue is actually with the python package. When installed with, for example,
I cannot find where this code is coming from, and am unable to make the patch work. If someone is able to point me in the right direction, I will supply a pull request. |
I am unfamiliar with dcm2niix's included python wrapper, but AFAICT it is in |
@captainnova - that's correct. This gets called from #!/path/to/.venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from dcm2niix import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main()) I would suggest that the final line is changed to |
On the assumption the above script is auto-generated by part of the build system, I'd suggest that the |
This pull request allows the Python console script to return the correct exit code from the dcm2niix executable: #815 |
That seems reasonable to me, but I do not understand exactly what the python build/packaging is doing either. Maybe @casperdcl would care to comment? |
Describe the bug
Using:
Chris Rorden's dcm2niiX version v1.0.20240202 GCC13.2.1 x86-64 (64-bit Linux)
Running dcm2niiX on a DICOM dataset produces an error status of (incorrectly) 1, whereas in:
Chris Rorden's dcm2niiX version v1.0.20230411 (JP2:OpenJPEG) (JP-LS:CharLS) GCC8.4.0 x86-64 (64-bit Linux)
the error status is (correctly) 0.
Only warnings are flagged, but the data are processed successfully in each case.
To reproduce
Steps to reproduce the behavior:
dcm2niix -p n -z y -b y -ba y -f %s_%p_%t_%d -o OUTPUT INPUT
We are using patient data to produce this error, so we don't have the permission to share it. We can help debug this problem remotely, if helpful. Here is the output of the generated .json sidecar:
and the bval file:
and the bvec file:
Expected behavior
An error code of 0 should be produced
Output log
NOTE: the above states a return code of 0, however, a return code of 1 is produced
Version
Chris Rorden's dcm2niiX version v1.0.20240202 GCC13.2.1 x86-64 (64-bit Linux)
Troubleshooting
The issue is not resolved using the latest commit of dcm2niix: e2ead4b
The text was updated successfully, but these errors were encountered: