BUG: code crashes when DICOM with 12 bits allocated is processed
PR Checklist
- [x] No API changes were made (or the changes have been approved)
- [x] No major design changes were made (or the changes have been approved)
- [ ] Added test (or behavior not changed)
- [ ] Updated API documentation (or API not changed)
- [ ] Added license to new files (if any)
- [ ] Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
- [ ] Added ITK examples for all new major features (if any)
Refer to the ITK Software Guide for further development details if necessary.
This PR maybe/probably should have been made against upstream.
This PR maybe/probably should have been made against upstream.
@dzenanz
I've tried malaterre/GDCM
by building with ITK_USE_SYSTEM_ITK as ON and linked External GDCM as you suggested it works fine for 12 bits allocated and NRRD file is generated without any issues
But I have few questions here, According to DICOM standard Bits allocated can be either 1 or multiples of 8 else it is invalid but here instead of throwing error the handling made in malaterre/GDCM proceed to NRRD generation is it acceptable.
If so, I have modified this PR according to malaterre/GDCM to change contents of gdcmRAWCodec.cxx and gdcmBitmap.cxx files please review it.
It would be ideal if @malaterre tagged a new version. Meanwhile, I will open a PR to update bundled GDCM from 3.2.1 to 3.2.2.
PR #5568 opened.