-
-
Notifications
You must be signed in to change notification settings - Fork 661
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 #4604
Comments
Thank you for contributing an issue! 🙏 Welcome to the ITK community! 🤗👋☀️ We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜 This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it. |
I assume that this is not related to Python packaging, but to underlying GDCM code. Reproducing without data will probably be hard. Can you try anonymizing your DICOM file(s) and then sharing them? Use this or one of many other tools. |
I agree it is due to binded cpp or c code but I cannot share the dicom files. I know how to code cpp as well but I don't know how to debug a python binding. If there is a way I can help about this, I would be happy to do so |
Can you try C++ code from this example on your DICOM data? Does it also crash? |
Hi, could you please try with |
Also, image = itk.imread('path/to/dicom/dir/') |
this also failed |
I already tried but forgot to mention. The outcome is the same |
If you set up a debug build and get a backtrace, it will likely be evident where the issue exists. Please see Section 9.5.3 in The ITK Software Guide, Book 1 for guidance. |
Nice! It would be helpful to build as ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx Lines 623 to 1132 in 596ed5f
CC @malaterre |
I can see this in the command line output:
|
@Mr-Blue-Sky-Candy I expect that there is a line number associated with gdcmPixmapReader.cxx that has an |
I am already building Debug builds but as it is described in ITK software guide I switched to RelWithDebInfo build anyway. Unsurprisingly, the result is the same. |
@Mr-Blue-Sky-Candy there are no line numbers for the screenshot shared in the GDCM calls -- is |
I added |
The setting should be:
So GDCM with a Debug build is used. Examining with |
I am already running in qtcreator with gdb.
Actually there is. I will share a different view with |
Thanks, closer! You will need to step through the code in gdcmPixmapReader (set a breakpoint in QtCreater) to understand what content that is expected is not present. |
@malaterre any suggestions? |
@thewtex Curve module have been deprecated for years now. Without the actual DICOM DataSet there are plenty ways to create an illegal structure. @Mr-Blue-Sky-Candy If you cannot share the DICOM file, I suggest building with 'Debug', you should at least get the proper behavior for 'assert' and hopefully track the root issue (not symptom). |
I only get segmentation fault. I can share the code I wrote but not the Dicom series. The code I wrote works for all others but not for some particular CT scans. How can I help you resolve this?
The code I wrote is the following:
It gives segmentation fault at the line
names_generator.SetDirectory(folder)
This code also gives segmentation fault:
Pydicom is able to read it but its metadata is very messy and hard to format besides it cannot read other particular Dicom series of CT scans.
ITK version is 5.3 on both ubuntu 22 and archlinux
The text was updated successfully, but these errors were encountered: