While loading a JPEG-compressed image the pixel type of a gdcmBitmap object changes (from 12 bits allocated to 16).
See line gdcmBitmap.cxx:415.
This is done in a const method, Bitmap::TryJPEGCodec(), called by Bitmap::GetBuffer().
This behaviour raises problems when GDCM is used by ITK: in itkGDCMImageIO.cxx an image gets read, then GetBuffer
is called and afterwards the pixel type is checked for changes (only in Debug mode).
issue 325 is directly related to this.
I've got a customer with a DICOM series that hits this assert with ITK 4.13.
And the image appears doubled as in bug #325.
Do I assume correctly that the issue still exists in git master?
Hello. Could you share the image? Thanks.
Mathieu, did you fix this? Seems I no longer reproduce using ITK master from the other day!