Gcdm extracts some jpeg2000 pictures incorrectly
Cross-platform DICOM implementation
Brought to you by:
malat
We have problem with attached dicom image.
Dicom image has the following tags: bits allocated 16, bits stored 16, high bit 15.
Dicom image contains jpeg2000 picture with attribute "bits allocated 8"
Gcdm extracts picture incorrectly, see attached screenshot
I found that problem can be resolved in Bitmap::TryJPEG2000Codec.
Function has unused code
if( codec.GetPixelFormat() != GetPixelFormat() ) { // Because J2K support the full spectrum I do not see any issue // with the following: gdcm::Bitmap *i = (gdcm::Bitmap*)this; i->SetPixelFormat( codec.GetPixelFormat() ); }
This source code can resolve bug with problematic dicom image (after removing "#if 0").
[master d270de2] Add new dataset
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 SC16BitsAllocated_8BitsStoredJ2K.dcm
create mode 100644 SC16BitsAllocated_8BitsStoredJPEG.dcm
[release af2b041] Gcdm extracts some jpeg2000 pictures incorrectly
1 file changed, 7 insertions(+)
fixed. closing