-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Improve ITKReader, testITKio and testITKReader #1379
Conversation
long and unsigned long images are saved as LONLLONG and ULONGLONG by itkMetaImageIO, so handle these types in ITKReader.
Correctly handle non existent image file in ITKReader and add corresponding test.
No need to initialize itk_image variable as it will be overwritten.
It seems that the build stalled on OSX. FYI, this code compiles and tests pass on macOS High Sierra (10.13.6) with "Apple LLVM version 8.0.0 (clang-800.0.42.1)". |
You can log in to Travis using your Github credentials and then restart your jobs. The job on OSX seems to pass now |
In Debug mode, -Wpedantic of gcc 8.2.1 warns about extra ";" after some ITK macros.
In Debug, gcc 8.2.1 [-Wimplicit-fallthrough] warns about the implicit fallthrough in the switch case. Add a more explicit message and a comment to silence the warning.
I added some small corrections to debug some warnings when compiled in Debug mode (with gcc 8.2.1 or clang 7.0.0. |
Thanks for the PR ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I've just few minor coding style issues.
All good. Ma y thanks. |
PR Description
Currently, when DGtal is configured with ITK, testITKio is failing.
This PR:
It compiles with gcc (8.2.1) and clang (7.0) and pass tests.
In Debug mode, gcc 8.2.1 produces some warnings. Some are specific to ITK. Another is due to the "implicit fallthrough" in the switch case line 71 of ITKReader.ih. I don't know if it was the expected behavior. If it is, a comment with "Falls through" (for example) should be added to silence gcc7 implicit-fallthrough warning (see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough ).
Checklist
cmake
mode (otherwise, Travis C.I. will fail).