-
Notifications
You must be signed in to change notification settings - Fork 229
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
Segmentation fault with odd element length #775
Comments
This is a limitation with your DICOM images, not with dcm2niix. You can verify this by using another tool like dcmdump:
The issue is that an anonymization tool was not aware that the private tag 2005,140f is a Philips Private SQ. Perhaps the input image was saved as implicit VRs which can obscure this fact for tools that do not contain a complete DICOM dictionary. I can think of two solutions:
If you want to pursue option 2, you would change:
to read:
|
I have made a commit to the development branch so it will convert your images. This is based on the fact that your data is from Canon (nee Toshiba) rather than Philips. It does seem like the data includes a lot of stripped and retired tags, so I do still encourage you to ensure conversion with a image direct from the instrument. |
Thank you. |
* tag 'v1.0.20240202': (135 commits) Update submodules Refactor (rordenlab#791) gantry tilt tolerance (rordenlab#791) GE step description (rordenlab#790) PatientOrient -> Patient Position (rordenlab#786) Prevent shell expansion (rordenlab#789) Replace presumably accidental bitwise AND operations Update JasPer API calls for compatibility with newer versions of the library Update divest logic, reducing duplication and supporting new mode of operation Fix PhaseEncodingDirectionDisplayed for GE Update date GE Diffusion issue rordenlab#777 minor GE Diffusion issue rordenlab#777 Kludge for issue 775 (rordenlab#775) add docstrings better python wrapper I/O issue 769: Mildly relax the check for bvec components > 1. PRs (rordenlab#745; rordenlab#768) Edge cases (rordenlab#763, rordenlab#749) Code spell ...
When running "dcm2niix ~/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261", it shows an error with the following log. I tried with different dcm2niix arguments but the error was the same.
Compression will be faster with 'pigz' installed http://macappstore.org/pigz/
Chris Rorden's dcm2niiX version v1.0.20231111 (JP2:OpenJPEG) (JP-LS:CharLS) Clang15.0.0 x86-64 (64-bit MacOS)
Found 276 DICOM file(s)
Illegal DICOM tag 0069,005b (odd element length -4587521): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477593.597542.dcm
Illegal DICOM tag ffda,ffca (odd element length -3080285): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477601.475800.dcm
Illegal DICOM tag fff0,ffdd (odd element length 2359355): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477595.186512.dcm
Assuming final tag is Pixel Data (7fe0,0010) (issue 639)
Assuming final tag is Pixel Data (7fe0,0010) (issue 639)
Assuming final tag is Pixel Data (7fe0,0010) (issue 639)
Illegal DICOM tag fc89,fc6b (odd element length -63964073): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477581.401854.dcm
Assuming final tag is Pixel Data (7fe0,0010) (issue 639)
Illegal DICOM tag ffa8,ffba (odd element length -14090429): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477601.475791.dcm
Illegal DICOM tag fc44,fc36 (odd element length -62718873): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477577.894328.dcm
Illegal DICOM tag 001c,ffdd (odd element length -4718723): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477595.186507.dcm
Illegal DICOM tag fc6b,fc9b (odd element length -59114383): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477586.747558.dcm
Illegal DICOM tag 0042,004d (odd element length -3407915): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477593.597541.dcm
Illegal DICOM tag ffdd,0013 (odd element length 393195): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477595.186505.dcm
Illegal DICOM tag ff81,ff76 (odd element length -1245247): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477601.867695.dcm
Illegal DICOM tag ff93,ff5f (odd element length -4849723): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477601.837115.dcm
Illegal DICOM tag ffa6,ffa8 (odd element length -12058721): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477601.475793.dcm
Illegal DICOM tag ffcb,ffaa (odd element length -32178367): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477588.248646.dcm
Illegal DICOM tag fc5d,fc85 (odd element length -59114383): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477581.401842.dcm
Illegal DICOM tag 0052,0040 (odd element length 8912967): /Users/xuefeng/Downloads/1.2.392.200036.9116.2.6.1.37.2430222242.1668477554.629261/1.2.392.200036.9116.2.6.1.37.2430222242.1668477576.168972.dcm
Assuming final tag is Pixel Data (7fe0,0010) (issue 639)
Segmentation fault: 11
Version:
Chris Rorden's dcm2niiX version v1.0.20231111 (JP2:OpenJPEG) (JP-LS:CharLS) Clang15.0.0 x86-64 (64-bit MacOS)
v1.0.20231111
Error happens on both MacOS and Linux (Ubuntu 20.04), same dcm2niix version.
This DICOM series can be downloaded from https://drive.google.com/file/d/10D85yRRp18_QIdf93l3n3kaC0mNUggQ1/view?usp=sharing
Thank you very much!
The text was updated successfully, but these errors were encountered: